Aspire SqlServer integration doesn't actually create a database when calling AddDatabase

Is there an existing issue for this?

[x] I have searched the existing issues

Describe the bug
I create an SqlServer database as follows:
var builder = DistributedApplication.CreateBuilder(args);

var dbServer = builder.AddSqlServer("sql")
    .WithDataVolume()
    .WithLifetime(ContainerLifetime.Persistent);
var db = dbServer.AddDatabase("db");

builder.AddProject<Projects.Api>("api")
    .WithExternalHttpEndpoints()
    .WithReference(db)
    .WaitFor(db)
    .WithOtlpExporter();
builder.Build().Run();

Run the AppHost and access the api at https://localhost:7016/sql
The containers start as expected with all health checks showing green, but the app fails to connect to the database with an SQL exception saying it wasn't able to login to that specific database: Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'api-db'.
When I manually connect to the provisioned SQL Server container via Sql Server Management Studio I see that the database wasn't actually provisioned - in fact there are no databases other than the built-in ones.
This happens every time.
Expected Behavior
A database called db should be provisioned on the Sql Server instance and the Api
Steps To Reproduce
https://github.com/jimitndiaye/Aspire-Sql
Exceptions (if any)
Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open database "db" requested by the login. The login failed.
Login failed for user 'sa'.
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction)    at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, SqlCommand command, Boolean callerHasConnectionLock, Boolean asyncClose)    at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)    at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, TimeoutTimer timeout, Boolean withFailover)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)    at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, Func3 accessTokenCallback)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---
at Program.<>c.<<$>b__0_1>d.MoveNext() in C:\repos\Scratch\Aspire-Sql\Api\Program.cs:line 41
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Http.RequestDelegateFactory.g__ExecuteAwaited|133_0(Task`1 task, HttpContext httpContext)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
ClientConnectionId:b89aa583-4479-4ccd-befe-177524527384
Error Number:4060,State:1,Class:11
.NET Version info
9.0.100
Anything else?
Aspire Version: 9.0.0

`IResourceBuilder sqlServerSyncService = builder
.AddSqlServer(name: "sql-server", port: sqlServerPort)
.WithLifetime(ContainerLifetime.Persistent)
.WithDataVolume()
.WithContainerRuntimeArgs("--name", "sql-server", "-p", "1433:1433")
//.WithEndpoint(port: 1433, targetPort: 1433, ) does not work
;
IResourceBuilder databaseSyncService = sqlServerSyncService
.AddDatabase(name: "db", databaseName: "db")
;`
You have to bind the port manually. Which should be out of the box. So I think it's a bug.

@cx-seibel I can't say adding that line fixes it. I have a simple enough Program.cs:
using Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

var sql = builder.AddSqlServer("sql")
                 .WithLifetime(ContainerLifetime.Persistent)
                 .WithContainerRuntimeArgs("--name", "sql", "-p", "1433:1433"); // no difference with or without this

var db = sql.AddDatabase("database");

builder.AddProject<Projects.My_Project>("my-project")
    .WithReference(db)
    .WaitFor(db);

builder.Build().Run();

I can connect with SQL Server Management Studio, but don't see any databases:

Aspire doesn't create the database but this is a point of lots of confusion. We'll take another look at our database integrations and see if we can/should do this now.

Aspire doesn't create the database but this is a point of lots of confusion. We'll take another look at our database integrations and see if we can/should do this now.

I mean if you create a brand new SQL server container then call "AddDatabase" the expectation is that it would actually add a database, rather than just create a connection string to one. If it shouldn't create the database then maybe it should be called something different?
I haven't used the Postgresql integration but does that operate differently?

This isn't SQL Server specific, and yes its confusing and known. None of the database are auto created. This shows up as a big issue when you're not using existing tech that can create the db (like ef migrations)

Ah yes, that is confusing. But documented indirectly here. Maybe a future version could have an option to create the database? Would this be doable/desired? I'd be willing to look into creating a PR if so.

The database docs still need more work (see https://github.com/dotnet/docs-aspire/issues/2020).
Yes, we have all of the primitives in place now to make this a reality. Just need to iterate on the design a bit.


chore: 更新 lock 和 changelog 文件

👀 PR includes

✨ Feature

[ ] New feature

🎨 Enhance

[ ] Code style optimization
[ ] Refactoring
[ ] Change the UI
[ ] Improve the performance
[ ] Type optimization

🐛 Bugfix

[ ] Solve the issue and close #0

🔧 Chore

[ ] Test case
[ ] Docs / demos update
[ ] CI / workflow
[ ] Release version
[ ] Other ()

📝 Description
🖼 Screenshot

Before
After

❌
✅

🔗 Related issue link

🔍 Self-Check before the merge

[ ] Add or update relevant docs.
[ ] Add or update relevant demos.
[ ] Add or update test case.
[ ] Add or update relevant TypeScript definitions.

本地使用 git merge origin/latest --squash 保留一个 commit 吧


[Link Edge] [Sync WSA] The goal of the future version that I hope

Description of the new feature / enhancement
I think Winget need add more features like...
If become the best Package manager over the world？

The current situation：

[x] Winget-->MS store
[x] Winget-->win32 applications
[ ] Winget-->Install-Module and update Module of the PowerShell    (Repetitive functionality?)
[ ] Winget-->the app in WSL system    (Possible conflicts with other pack manager software?)
[ ] Winget-->Edge PWA     (save URL as desktop app）
[ ] Winget-->Edge extensions
[ ] Winget-->android app    (WSA)

extra
Proposed technical implementation details
Use some Interfaces for third-party programs/hardware like adb. sync the android app
Build a closer connection with the edge browser on Windows system and Winget

Like #1219
The wsa support goal

ff
ff

Maybe could be called super winget?
Apt has Super Cow Powers. Winget has Super Windows Powers too!

Description of the new feature / enhancement
I think Winget need add more features like... If become the best Package manager over the world？
The current situation：

[x]  Winget-->MS store
[x]  Winget-->win32 applications
[x]  Winget-->Install-Module and update Module of the PowerShell    (Repetitive functionality?-PowerShellGet)
[ ]  Winget-->the app in WSL system    (Possible conflicts with other pack manager software?)
[ ]  Winget-->Edge PWA     (save URL as desktop app）
[ ]  Winget-->Edge extensions
[ ]  Winget-->Android app    (WSA)
[ ]  Winget-->Manage games for other gaming platforms     (Just like GOG GALAXY does, sync games and accounts)
~Winget-->System core components and some hardware drivers~

Extra samples
PowerShell Module  -m -module show modules of Power Shell only

Also make alias from Import-Module Update-Module...  (PowerShellGet)

Edge extensions  -e -edge show extensions of Edge only
Proposed technical implementation details
Use some Interfaces for third-party programs/hardware like adb. sync the android app Maybe like...  Build a closer connection with the edge browser on Windows system and Winget
Game could fork likes GOG Like: PSN Steam uplay NS...

May have trouble some times

very interesting ideas.


reflect-metadata 0.1.9 triggers "read only property" TypeError

Compiling with 0.1.9 of reflect-metadata causes the following exception:
D:\Repos\inversify-basic-example\node_modules\inversify\lib\resolution\instantiation.js:14
        instance[propertyName] = injection;
                               ^
TypeError: Cannot assign to read only property 'warrior1' of object '#<EpicBattle>'

Downgrading to 0.1.8 corrects the issue.

Hi @tvsbrent thanks for reporting this. I will work on a fix ASAP but due to xmas it may take me a few of days.

No problem, I didn't expect such a quick response!

Done by ae38fdcb7499ce57513cc659d6c808fad0ba3c9f


fix: LF for linux scripts (.sh)

change line breaks to LF for unix scripts (*.sh)

Coverage remained the same at 80.155% when pulling 2c35773e81b0b01222a4b3c7cfea51d3b39c17f3 on stuartsaltzman:fix_build into f690f287cb4e7cd46daf3b4ec226622fd20ecded on TomPallister:develop.

@stuartsaltzman thanks! Sorry my bad I will remember this.


Doc: missing tracking snippets

We need to add all those snippets on the React doc website: https://github.com/algolia/instantsearch.js/blob/develop/docs/_includes/marketing.html

Fixed with #1783


fix validation logic

closes #793

I think the same kind of logic changes are required in each validation case

i submitted the commit for code review should be good to go now.


fix for #5 case-insensitive string comparison

I promised it yesterday but got carried away, so here it is
I just convert the input strings to uppercase, nothing more actually, this way we can keep the uppercase version of code strings, which is indeed good for readability

LGTM

Thanks alot @jbilcke :)

released as v1.5.1 to npm.


Can't access kubeless-ui non-localhost

kubeless-ui will run on localhost:3000. I'd like to access it through server IP like <IP_ADDRESS>:3000 .
Is there any way?
thanks

Hi @meysam001,
If you have deployed the UI using the k8s.yaml manifest present in this repository the Service will be deployed using the type NodePort (which means that it will only be accessible within the cluster). If you want to use a public IP to access the service you can change that type to use LoadBalancer or create an Ingress rule if you cluster has an Ingress controller. Be careful because if you do so the service will be publicly available and anyone could deploy functions in your cluster.


Error: not able to deploy contract at remote server

I try to set up the quorum network at my remote server using Docker according to "https://github.com/synechron-finlabs/quorum-maker/wik".
In order to access the Web UI, I changed the docker-compose.yml through adding the "ports" argument. For example:
  node1:
    container_name: node1
    image: syneblock/quorum-maker:2.6.0_2.6.5
    working_dir: /node1
    command: ["bash" , "start.sh"]
    volumes:
      - ./node1:/node1
      - ./node1:/home
      - ./node1:/master
    networks:
      vpcbr:
        ipv4_address: <IP_ADDRESS>
    ports:
        - 22002:22004

And then I accessed http:<my_server_ip>:22002 and succeed. However, I failed to upload the contract file.

The docker log is like this:
node1    | 2021/12/27 10:08:23 http: panic serving <IP_ADDRESS>:58522: interface conversion: interface {} is nil, not map[string]interface {}
node1    | goroutine 2432 [running]:
node1    | net/http.(*conn).serve.func1(0xc00018e960)
node1    | 	/usr/local/go/src/net/http/server.go:1801 +0x147
node1    | panic(0x8693a0, 0xc00020dce0)
node1    | 	/usr/local/go/src/runtime/panic.go:975 +0x3e9
node1    | github.com/synechron-finlabs/quorum-maker-nodemanager/contractcompiler.Compile(0xc0002b5f00, 0xf, 0xc0001d2cf0, 0x1, 0x1, 0x7ffcaee20f21, 0x16, 0xc000029300, 0xc0000a4240, 0xc0000a41e0, ...)
node1    | 	/go/src/github.com/synechron-finlabs/quorum-maker-nodemanager/contractcompiler/ContractCompiler.go:58 +0xdb1
node1    | github.com/synechron-finlabs/quorum-maker-nodemanager/service.(*NodeServiceImpl).deployContract(0xc000096260, 0xc0001d2cf0, 0x1, 0x1, 0xc0001d2cb0, 0x1, 0x1, 0x0, 0x7ffcaee20f21, 0x16, ...)
node1    | 	/go/src/github.com/synechron-finlabs/quorum-maker-nodemanager/service/NodeService.go:721 +0x307
node1    | github.com/synechron-finlabs/quorum-maker-nodemanager/service.(*NodeServiceImpl).DeployContractHandler(0xc000096260, 0x95f6c0, 0xc00019e620, 0xc00045ac00)
node1    | 	/go/src/github.com/synechron-finlabs/quorum-maker-nodemanager/service/NodeServiceHandler.go:401 +0x712
node1    | net/http.HandlerFunc.ServeHTTP(0xc000096a60, 0x95f6c0, 0xc00019e620, 0xc00045ac00)
node1    | 	/usr/local/go/src/net/http/server.go:2042 +0x44
node1    | github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000be000, 0x95f6c0, 0xc00019e620, 0xc00045a300)
node1    | 	/go/src/github.com/gorilla/mux/mux.go:210 +0xd3
node1    | net/http.serverHandler.ServeHTTP(0xc00019e000, 0x95f6c0, 0xc00019e620, 0xc00045a300)
node1    | 	/usr/local/go/src/net/http/server.go:2843 +0xa3
node1    | net/http.(*conn).serve(0xc00018e960, 0x960840, 0xc000062f40)
node1    | 	/usr/local/go/src/net/http/server.go:1925 +0x8ad
node1    | created by net/http.(*Server).Serve
node1    | 	/usr/local/go/src/net/http/server.go:2969 +0x36c

I see what the problem is. My contract file requires different compiler version. I found this by executing this command in the container of node1:
solc --combined-json abi,bin <my_filename>

Then I see the output is not JSON format with the version problem, so this line will panic.

I think it is neccesary to handle this exception and gracefully response to the web brower.


Documentation Binomial Coefficiant

Do the checklist before filing the issue:

[x] Do you have Node.js and all the relevant dev-dependencies installed?
[ ] Is this a bug fix?
[x] Is this an enhancement?
[ ] Is this a feature request?

NOTE: Provide a clear and concise description of the feature that needs to be added! Or if its a bug, then provide the necessary steps to reproduce it along with screenshots.

Provide a brief description of  M.nCr(), you can refer the implementation for the same here.
Also, follow the documentation format followed for other functions such as here.
Make sure to cover the edge cases, as well as the error cases. Add relevant links as well, pertaining to implementation and use of binomial coefficient.
The important thing here is to make user aware of what does this function do, and what is it's time complexity.
Here is the issue related to this-
#66

@nilshah98  @pbiswas101 can I take this issue?

@vsharma20v you're assigned


Documentation: make "Consul" section more objective

Just minor updates in doc. /cc @philips

Some language suggestions but adding the link is very helpful!

All fixed. Merging in greens and backporting to release branches. Thanks.


connect failed: cannot create new Sqladmin Service: unexpected end of JSON input

What happened?

installed crossplane v1.8.0 & provider-gcp v0.21.0
created MySQLInstance claim in namespace
get the following on CloudSQLInstance

Status:
  At Provider:
  Conditions:
    Last Transition Time:  2022-07-27T13:15:04Z
    Message:               connect failed: cannot create new Sqladmin Service: unexpected end of JSON input
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced
Events:
  Type     Reason                   Age                  From                                                 Message
  ----     ------                   ----                 ----                                                 -------
  Warning  CannotConnectToProvider  15s (x9 over 2m44s)  managed/cloudsqlinstance.database.gcp.crossplane.io  cannot create new Sqladmin Service: unexpected end of JSON input

Details:
apiVersion: database.gcp.crossplane.io/v1beta1
kind: CloudSQLInstance
metadata:
  name: test-crossplane
spec:
  forProvider:
    databaseVersion: POSTGRES_11
    region: eu-west1
    settings:
      tier: db-custom-1-3840
      dataDiskSizeGb: 20
  providerConfigRef:
    name: gcp-provider-config
  writeConnectionSecretToRef:
    name: test-connection
    namespace: crossplane-system

Hey @nataliyalevytska, thanks for raising this issue!
I believe that is because of misconfigured GCP credentials in your ProviderConfig. Have you fixed the error?

I am having this issue and have validated that my gcp credentials are formatted correctly in the secret

I'm experiencing this as well and can validate that my credentials are correct. Would the error output if the service account doesn't have the correct permissions for the project in gcp?


Unable to install with pip

$ pip install which
Collecting which
  Could not find a version that satisfies the requirement which (from versions: )
No matching distribution found for which

I was just trying to download which, but pip complains:

Could not find a version that satisfies the requirement which (from versions: )
No matching distribution found for which

After turning on --verbose I see that it find any links in https://pypi.python.org/simple/which/
What is the recommended solution to this? As a user, I cannot update the simple page for referenced links.

Update links on https://pypi.python.org/pypi/which and upload wheel there
pip install https://github.com/trentm/which should probably work

I believe only @trentm can do the first point.

pip install https://github.com/trentm/which should probably work

It doesn't for me at least.
I could "install" which manually by doing:
wget https://raw.githubusercontent.com/trentm/which/master/which.py -O ~/.local/lib/python2.7/site-packages/which.py

I don't have the bandwidth to maintain this module at all. Would someone like to take over maintenance or ownership of it? I'm happy to transfer it. See #7.


[Feature] Security-Handlers

btw. this is nearly finished

Great. I'll wait

Any Updates?

@arasabbasi Any updates on Encryption and access privileges support?

Do you want to help to implement it?

@arasabbasi I would like to help but don't have any experience on this. I am ready to work on it, If I will get some guidance.

Do we have any updates on this feature? I would like to prevent the text from being copyied, or maybe password pretect the pdf.

There is a pull request almost finished: #2959


Preferences tabs

The reset behaviour and interface buttons need to go. There should be a separate reset button for each tab that only affects that tab.

Fixed in e7145ae755747cc4d9b45ccbe7c5c1e1d03530ea


Refreshing the site on client-side navigation errors out

If you navigate to a different layout e.g. Jumas, the browser navigation is replaced by /jumas. If you try to refresh the page, you get an error because CloudFront doesn't know this location.
Is there a way to use anchors instead of paths, then we do deep linking when the page loads with an anchor?

@hammady
We need the HTML files for those routes, currently, we only have index.html
The reason why we have routes is Zero-JS support. CSR needs JS. but we have 2 nice features that could be helpful to us:

We can set a fallback page to index.html when an unknown route is visited. I could add a PR for that if needed.
If we are worried about the size of the output, we can use gzip or brotli compression (or both). This will be a significant size reduction. I tried it for wwpray and got about 86% reduction for gzip and 91% reduced size for brotli. I believe python simple HTTP server supports both to be served.

@hammady EDIT: I mean CloudFront, that was a mindless sentence lol

Yeah, the fallback needs to be done on CloudFront. Do we just generate identical files to index.html with the route names?
For compression, this is already handled by CF. Inspect any 200 response and you will notice the content-encoding: gzip header returned.

@hammady
Yes the fallback is better to be done in CloudFront because otherwise it will require JavaScript, those options are specified by Svelte Static Adapter
The compression will generate html.br files. Can we use brotli directly and ignore the rest? It's supported by every browser (Except IE and Opera Mini, those are not browsers)

Will test with the new merged PR. Let's disable compression on the app level as it is not used. It is the CDN concern.

@hammady The compression is disabled, seems that now the issue is "Access Denied", seems an S3 issue?

@fayez-nazzal the problem still happens because we now upload the other 2 layouts as files. What actually happens on CloudFront is that it interprets the paths as directory names then it tries to list their index.html which is not there.
We can solve this in 3 ways:

Modify the navigation such that switching the tabs replaces the address with a path ending with .html.
Creating directories on s3, then uploading the html files for the other layouts under those with a new name index.html.
Stripping out the .html suffix when uploading. I just tried this and it works! I will create a PR.


RAM allocation in VM-Sphere

Hi Pavel:
I believe you have suggested 16GB of RAM minimum for an all in one box?
Do you know if this applies to machines running in a VM environment?
We have a Development Portal running with the basic 5 user license.
We have this setup in a VMware Sphere environment with 4 cores and 12GB of RAM.
We recently have seen some performance issues when developing maps.
I asked our systems guys to bump us to 16GB.
But they said that when they looked at our RAM usage, over the past month, we're at only 5% of the 12GB.  Of course, this is an average usage over time.
Based on just Windows Task Manager, at 12GB, we're running at about 60% consumption when we're in there doing development work on larger maps.
What the systems folks just told me though is that in a VM environment, they've been told that too much RAM can slow things down.    We have seen on a virtualized IBM Maximo server that performance increased when we dropped the allocated RAM.
Do you have any experience or guidelines for defining how much RAM to allocate in a VM setting?
Thanks

These are surprising observations for me.
I forwarded your question to an ArcGIS Server QA engineer.  Here is his answer:
"I am unaware of this phenomena of reduced performance correlating with an increasing percentage of available RAM.  I have not tested this kind of scenario.  Straight up it doesn’t make sense, but apparently you can configure how memory is allocated between processing cores in a VM environment and it has dramatic performance implications: http://searchservervirtualization.techtarget.com/feature/Improve-VM-performance-with-server-memory-configuration   This would apply to any software stack and especially ours where we have lots of processes consuming lots of RAM."

Agreed, very counter intuitive.
We've heard rumors of a tool that helps determine the sweet spot for this sort of thing that we're looking into.
I do know that with our Dev Portal, at 10GB, we were running at about 60+% RAM utilization and having some issues.  Bumped the RAM to 12GB and the issues went away and RAM dropped to about 50%.  Had a similar issue on a virtualized ArcGIS Server.
We were seeing some issues this morning, again at about 61% consumption and that's what started this conversation with Systems.   They aren't 100% sold on the idea either but wanted to discuss it when I asked for bump in RAM.
Apparently one can do a lot of fine tuning with cores and processes and such.
I guess the bottom line is that it's a brave new VM world out there and each environment is unique based on a lot of factors.  (backbone, drives, OS's, etc... and that's before the software stack comes into it!)
I have a feeling it's going to be somewhat of a trial and error thing.
Thanks for the info.  That's an interesting read.


Cannot read properties of undefined (reading 'endsWith') when using @vercel/blob put function

I am currently using a NextJs route to handle a webhook that receives a file in Base64 format. I am trying to pass this file to the put function of the @vercel/blob package, but am encountering an error.
The code I am using is as follows:
    let stream = new PassThrough();
    stream.write(attachment.Content, 'base64');
    stream.end();

    await put(attachment.name, stream, {
      access: 'public',
    });

I have also tried using a Buffer instead of a stream:
    await put(attachment.name, Buffer.from(attachment.Content, 'base64'), {
      access: 'public',
    });

In both cases, I am getting the following error:

TypeError: Cannot read properties of undefined (reading 'endsWith')

It appears that there might be an issue with how I am passing the Base64 file to the put function, but I am unsure of how to resolve this. Any suggestions or guidance would be greatly appreciated.

I've resolved the issue. It was a mistake on my part - I was passing an undefined value as the file name, which was causing the error.


Automated framing in Steel

This PR merges automated framing inside the steel branch. Some parts are still WIP, but this at least unlocks work in parallel on libraries with the new effect.
Several files previously verifying with manual framing were not ported yet, and were moved to examples/steel/effects. These files are Steel.Channel.Simplex, Steel.Closure and Steel.MonotonicHigherReference. The old effects are also in examples/steel/effects
Path forward before a full merge to master:

Revive the old Steel effects with manual framing as a SteelX effect, with a polymonadic subcomp from SteelX to Steel following Aseem's proposal. This would enable manual framing on demand.
Reexpose files moved to examples/steel/effects by keeping the implementation as a SteelX, and performing a subcomp to give a Steel interface
Implement Steel.Effect and Steel.Effect.Atomic. Almost all of the missing parts are direct reflections from actions to the Steel(Atomic) effect(s). The easiest would also be to expose them as SteelX functions, and call an explicit lift.
Finish implementing Steel.Duplex.PCM to fit the interface of Steel.Channel.Duplex
Remove the last assumes in Steel.Duplex.PCM/Steel.Stepper due to universe difficulties with slprops/pts_to, and to implementations of actions using fictional separation logic
Implement sl_implies and the corresponding lemmas in Steel.Effect.Common
Restore examples in steel/examples for which verification was removed

Almost all items from the previous TODO list are done.
The only remaining part is to wrap up Steel.Duplex.PCM. It currently has two assumes for updates relying on fictional separation logic that need to be implemented. It also doesn't match completely the Steel.Duplex interface yet. I moved this file to "examples/steel" for now, so this is non-blocking.
During today's Steel meeting, we agreed to proceed as follows to merge this PR into steel, and then master: Some unifier changes which are also partially on this branch (such as https://github.com/FStarLang/FStar/pull/2152) need to land first in master. We will then merge master into steel, and solve conflicts on this branch before propagating upstream.

Thanks Aymeric! This is a great milestone ... congrats! I'm merging it now.


Send message to specific channel

I can't figure out how to send a message to a channel of my choice - I want the bot to send a message to #general-chat when it starts up but I can't find anything anywhere about to do that

Look here:
http://qeled.github.io/discordie/#/docs/Discordie?p=Discordie%23Channels&_k=v0s3ou
Then look here:
http://qeled.github.io/discordie/#/docs/IChannelCollection?_k=pp5kze
Then look here:
http://qeled.github.io/discordie/#/docs/ITextChannel?p=ITextChannel%23sendMessage&_k=nc4hqd
Good luck

Thanks but I've already read through all of that and none of it has helped

var channel = client.Channels.get(c => c.id == 'ID');
channel.sendMessage('Message');

Thank you so much - I was trying to do client.guild.Channels.get("ID")
Case closed, tyvm ❤


PathAssert, not PaintAssert, fixes #191

Fix #191.
I don't have API 23 installed so I can't run the tests, but that's what CI servers are for, right?

run the tests

tests?
who tests the testing framework?

Thanks!


./make.bash exec format error

What version of Go are you using (go version)?

$ go version
go version go1.14.6 linux/amd64

Does this issue reproduce with the latest release?
yes, 5cc030aa1996762e48ce446001078ce6447f105e
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/vagrant/.cache/go-build"
GOENV="/home/vagrant/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/vagrant/go/1.14.6"
GOPRIVATE=""
GOPROXY="https://goproxy.io,direct"
GOROOT="/home/vagrant/.goenv/versions/1.14.6"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/home/vagrant/.goenv/versions/1.14.6/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/vagrant/github.com/golang/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build373191007=/tmp/go-build -gno-record-gcc-switches"

What did you do?

build golang from source
What did you expect to see?
success
What did you see instead?
› ./make.bash
Building Go cmd/dist using /home/vagrant/.goenv/versions/1.14.6. (go1.14.6 linux/amd64)
Building Go toolchain1 using /home/vagrant/.goenv/versions/1.14.6.

You're trying to build 1.14.6 using 1.14.6 as the bootstrap compiler. Any chance the bootstrap compiler is the actual same directory as the directory you're trying to build? That might explain it.

I know what happen I think. In vagrant + ubuntu virtual machine with shared folder, mmap has problem， https://www.virtualbox.org/ticket/819 , make.bash panic at https://github.com/golang/go/blob/master/src/cmd/link/internal/ld/main.go#L318. vboxvfs share folder break me.

No problem. Closing.


NodeJS map is an object

Hello,
when receiving a map<string,string> field the value is an Object. If I convert a map back and forth with protobufs I get a custom protobufjs Map object. Is this something I can control or where can I find the implementation for this?

Can you be more specific about how you "convert a map back and forth with protobufs"? Are you describing a gRPC operation or a Protobuf.js operation?


Vim control keys

Yeah Vim is goated and the keys are better

Thanks for submitting the PR. I really like the idea of having VI keybindings within the GUI.


Automatic support for HyperlinkedModelSerializer?

By default, django-rest-polymorphic doesn't play well with DRF's HyperlinkedModelSerializer class. For example, using the example project in this repo as a base project, if you replace each of the serializers.ModelSerializers with serializers.HyperlinkedModelSerializer and add 'url' to the fields list for each model, then the app crashes whenever it attempts to serialized the responses.
Here's the stack trace after I've posted the example in the docs (http POST "http://localhost:8000/projects/" resourcetype="ArtProject" topic="Guernica" artist="Picasso") or try to get the current list of projects (http GET "http://localhost:8000/projects/") after posting at least once:
Internal Server Error: /projects/
Traceback (most recent call last):
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/relations.py", line 376, in to_representation
    url = self.get_url(value, self.view_name, request, format)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/relations.py", line 314, in get_url
    return self.reverse(view_name, kwargs=kwargs, request=request, format=format)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/reverse.py", line 50, in reverse
    url = _reverse(viewname, args, kwargs, request, format, **extra)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/reverse.py", line 63, in _reverse
    url = django_reverse(viewname, args=args, kwargs=kwargs, **extra)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/urls/base.py", line 88, in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/urls/resolvers.py", line 632, in _reverse_with_prefix
    raise NoReverseMatch(msg)
django.urls.exceptions.NoReverseMatch: Reverse for 'artproject-detail' not found. 'artproject-detail' is not a valid view function or pattern name.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/viewsets.py", line 95, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/views.py", line 494, in dispatch
    response = self.handle_exception(exc)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/views.py", line 454, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/views.py", line 491, in dispatch
    response = handler(request, *args, **kwargs)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/mixins.py", line 48, in list
    return Response(serializer.data)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/serializers.py", line 742, in data
    ret = super(ListSerializer, self).data
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/serializers.py", line 262, in data
    self._data = self.to_representation(self.instance)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/serializers.py", line 660, in to_representation
    self.child.to_representation(item) for item in iterable
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/serializers.py", line 660, in <listcomp>
    self.child.to_representation(item) for item in iterable
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_polymorphic/serializers.py", line 58, in to_representation
    ret = serializer.to_representation(instance)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/serializers.py", line 504, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/Users/brasmith/.virtualenvs/drf/lib/python3.6/site-packages/rest_framework/relations.py", line 391, in to_representation
    raise ImproperlyConfigured(msg % self.view_name)
django.core.exceptions.ImproperlyConfigured: Could not resolve URL for hyperlinked relationship using view name "artproject-detail". You may have failed to include the related model in your API, or incorrectly configured the `lookup_field` attribute on this field.

After seeing this in the stack trace:
django.urls.exceptions.NoReverseMatch: Reverse for 'artproject-detail' not found. 'artproject-detail' is not a valid view function or pattern name.

I realized I could fix this in each of the individual serializer classes by adding extra_kwargs to the Meta inner class like this:
        extra_kwargs = {
            'url': {'view_name': 'project-detail', 'lookup_field': 'pk'},
        }

How difficult would it be to add this behavior automatically to serializer classes that are mapped together in a PolymorphicSerializer but extend HyperlinkedModelSerializer instead of ModelSerializer?

this is fixed issue

Maybe it has been fixed in the past, but I am facing the same issue as of today with
django-rest-polymorphic==0.1.9
djangorestframework==3.12.2
django==3.1.3

I confirm the bug persists, although a quick fix for me was to change the basename to what it required.
djangorestframework==3.11.1
django-rest-polymorphic==0.1.9
django-polymorphic==3.0.0
django==3.1.2

I named my model MyModelThing. Initially, the basename was thing-mymodel and I passed
    extra_kwargs = {
            'url': {'view_name': 'thing-mymodel-detail', 'lookup_field': 'pk'},
        }

which failed but I found it was looking for mymodelthing-detail. And it works without passing any extra_kwargs.


IPAM creating range of size 1 for no good reason

Note the Size: 1 below, from https://github.com/weaveworks/weave/issues/1996#issuecomment-188381865
host1:~$ weave launch-router --init-peer-count=3
host2:~$ weave launch-router --init-peer-count=3 host1
host3:~$ weave launch-router --init-peer-count=3 host1 host2
host1:~$ weave run -ti alpine /bin/sh
host2:~$ weave run -ti alpine /bin/sh
host3:~$ weave run -ti alpine /bin/sh
host3:~$ weave report -f '{{json .IPAM.Entries}}' | jq .
[
  {
    "Version": 1,
    "IsKnownPeer": true,
    "Nickname": "host3",
    "Peer": "d2:e2:3d:cc:92:05",
    "Size": 524288,
    "Token": "<IP_ADDRESS>"
  },
  {
    "Version": 3,
    "IsKnownPeer": true,
    "Nickname": "host1",
    "Peer": "d6:2e:5b:f6:71:fa",
    "Size": 262144,
    "Token": "<IP_ADDRESS>"
  },
  {
    "Version": 0,
    "IsKnownPeer": true,
    "Nickname": "host2",
    "Peer": "8e:7c:37:fb:89:57",
    "Size": 262143,
    "Token": "<IP_ADDRESS>"
  },
  {
    "Version": 0,
    "IsKnownPeer": true,
    "Nickname": "host1",
    "Peer": "d6:2e:5b:f6:71:fa",
    "Size": 1,
    "Token": "<IP_ADDRESS>"
  }
]

(NB: it may take a while for this peer to get an up-to-date view, so if the above does not contain entries for all peers, then repeat until it does)

The problem is that host2 asks host1 to donate some space within the <IP_ADDRESS>-<IP_ADDRESS> range (broadcast addresses are excluded here). host1 splits its owned range into two halves and it donates the second half excluding the <IP_ADDRESS> broadcast address (because it does not belong to the asked range).
I suggest to fix it by including the broadcast addresses when asking for a donation.

SGTM

I think I might have fixed this in #2012 by accident.

Yep, it fixed the issue. Thanks.
I've added a test for this issue (https://github.com/weaveworks/weave/commit/02c1e386a4fd55888bc18e1e52120bdd18dd5cd4), so feel free to cherry-pick it into your branch (some IP alignment in expectations might be needed).

Closed by #2012.


Wondering why best STEP and LAYER parameter differs between real images

First of all, thank you for sharing great research! It's really inspiring.
I've been gone through the code and make tweaks and tested it with real images. Now I have two questions.

For real image editing (with or without t2i adapter), some images require less STEP, LAYER for MasaAttention, some requires more, and a few images cannot be generated correctly.

Maybe model knows some object really well (i.e. human) on its diverse settings, therefore it works well?
Especially, I'm wondering how can I improve on the real images that MasaCtrl doesn't work.

Using intermediate ref_latents works great. Could you refer me a paper that suggested this approach? I want to dig into it more.

Again, thank you for amazing work ☺

Hi @JinwooMcLee,

As for the step and layer control strategy hyperparameters, we found current STEP and LAYER can achieve better results than other control steps and layers in most cases.  You may adjust them slightly around the current STEP and LAYER to obtain the best editing results. Note that when editing with controllable diffusion models (T2I-Adapter, ControlNet), you may adjust the control steps and layers smaller,  since additional controls can faithfully guide the target layout.
As for the failure during real image editing, the noise obtained by DDIM inversion cannot reconstruct the source image faithfully in some cases, leading to an editing failure accordingly. Therefore, we try to alleviate this problem by directly querying the intermediate features (obtained from the DDIM inversion rather than the synthesis process). This operation is inspired by the previous Null-text Inversion [1], but we don't optimize the null text embedding. You may also try these improved diffusion-based inversion techniques [1, 2, 3] for better performance.

Related links:
[1] Null-text Inversion for Editing Real Images using Guided Diffusion Models
[2] Negative-prompt Inversion: Fast Image Inversion for Editing with Text-guided Diffusion Models
[3] Improving Tuning-Free Real Image Editing via Proximal Guidance

@ljzycmd
Thank you for detailed and clear explanation!


refactor plots for better integration with tracker

In sklearn-evaluation 0.8.2, I introduced two new methods to the SQL experiment tracker: log_confusion_matrix and log_classification_report. These two methods allow users to store plots in the SQLite database and retrieve them later.
However, unlike previous versions, we're not storing the actual plot in the database, but the statistics we need to re-create the plot. For example, to re-create a confusion matrix, we can store the numbers on each quadrant. The benefit of this approach is that we can serialize and unserialize the plots as objects and allow the user to combine them for better comparison. See this example.
Enabling this involves several changes in the plotting code since we need to split the part that computes the statistics to display from the code that generates the plot, and this has to be performed for each plot (so far, only confusion matrix and classification report have been refactored)
The purpose of this issue is to start refactoring other popular plots. We still need to support the old API (e.g., plot.confusion_matrix), but it should use the object-oriented API under the hood (e.g., plot.ConfusionMatrix)
The next one we can implement is the ROC curve. All classes should behave similarly; here are some pointers:

the class constructor should take the data needed to generate the plot (fpr and tpr as returned by roc_curve)
No need to implement __sub__ - not applicable for ROC. just raise a NotImplementedError with an appropriate error message
__add__ should create a new plot with overlapping ROC curves. This translates into users being able to do roc1 + roc2 to generated the overlapping plot
the _get_data  method should return the data needed to re-create the plot (example)
the from_dump class method should re-create a plot from a dumped json file (note that the dump method is implemented in the parent class

do we have examples already?
there are a few places where I think we should have examples (including the a + b thing):

experiment tracker: https://sklearn-evaluation.readthedocs.io/en/latest/user_guide/SQLiteTracker.html
ROC docstring

@yafimvo I think I saw 2 examples for ROC and the add, If there are no examples or the tracker one is missing (I don't remember seeing it), let's separate it, open a new issue, tag this one and add the missing examples

@edublancas
I added 2 examples here, one for plotting the roc, and another for roc1+roc2.
Let me know if these examples are OK and if it's the right place for them.

Ok, I see the example. I think it's ok. Let's wait for neelasha to finish migrating to Jupyter-book to decide where else we want examples


Added exclude to the options

This allows the user to exclude characters from the string, as proposed in #3.
Note: You must implicitly state the characters you want to remove, lowercase letters will not remove uppercase letters

great idea, ty for that.
i will merge if you remove the console.log-statements and add the option to the readme

Sorry, that was for debugging. Will do.

Done.


NotImplementedError: Image format not supported

导入自己的图片后，报错为图片格式不支持

Hi~dear Zfypassion,
What type of images are you using? In my fork you can use jpg and png formats
Susan

I have met the same problems, and finally I find the image should be input as nparray instead of its path


Adding missing dependencies.

@fcofdez thanks for taking the time on this. You have a free :beer: in the next PyMad :smile:


15 show search field for entries in drop down menu

I implemented the part of the frontend based on the queries I received as part of the output: https://github.com/tuwien-csd/damap-backend/issues/44
The user should be able to choose to search the ORCID database by name or ORCID ID or DMP list in the search box for their individual database.
I am including two images showing the queries I received in the search box.

@ZenoLC @clarascu branch is rebased with the next and tested within the solution of David's changes:: de/44-enable-adding-contributors-sourced-from-orcid


SASS Compilation Error

Change Detected...
material-dashboard.scss
Compilation Error
Error: File "c:\wamp64\www\assets\scss\material-dashboard\mixins\social-buttons.scss" not found
on line 18 of sass/c:\wamp64\www\assets\scss\material-dashboard.scss

@import "material-dashboard/mixins/social-buttons.scss";

---------^

Watching...

Hello @effao,
Thank you for using our products, I will ask you to download again the product, and try the same action to compile the SCSS because I checked in the downloadable archive and it looks good.

*also, please let us know your product version.
Best,
Stefan


Split helpers up to reduce bundle size

Closes #5.

Removes export * from './helpers' to reduce bundle size

This is a breaking change. There should be a major version bump to signal this change.

Splits each helper into its own file so they can be imported individually
Removed unused, undocumented randomHex helper
Updated docs to reflect the new way to use helpers

Using a default nextjs project, here's the savings in size:
Default NextJS (No js-lnurl)
Route (pages)                              Size     First Load JS
┌ ○ /                                      4.5 kB         78.4 kB
├   └ css/32586a8b0a8a958d.css             1.73 kB
├   /_app                                  0 B            73.9 kB

NextJS with current js-lnurl
  Route (pages)                              Size     First Load JS
┌ ○ /                                      37.6 kB         112 kB
├   └ css/32586a8b0a8a958d.css             1.73 kB
├   /_app                                  0 B            73.9 kB

NextJS with this PR's js-lnurl
  Route (pages)                              Size     First Load JS
┌ ○ /                                      18.9 kB        92.8 kB
├   └ css/32586a8b0a8a958d.css             1.73 kB
├   /_app                                  0 B            73.9 kB


manifest-list: Drop HTTP Content-Type sentence

As Adrian Colley points out in #390, clients may not be aquiring the manifest over HTTP.  In most cases, folks will know (from a Content-Type header, a descriptor media type, or other means) what type of blob they're dealing with before they look at the blob.  I expect client behavior like:

If you can verify the digest, ignore Content-Type. If you can't verify the digest,   respect the Content-Type and require it to match your expected media type (if any).

But in the absence of an HTTP-API spec I don't think we need to talk about this at all.
Fixes #390.

LGTM (though I'd also be happy to change this to a suggestion, e.g. "In the case of transferring images over HTTP clients COULD distinguish ..." or similar)

On Tue, Oct 18, 2016 at 07:46:35AM -0700, Jonathan Boulle wrote:

(though I'd also be happy to change this to a suggestion, e.g. "In
the case of transferring images over HTTP clients COULD distinguish
..." or similar)

I'm fine with that or the guidelines I quote in the topic post.
Either way, this sort of advice is not manifest-list specific.  We can
push it into media-types.md or the considerations.md that is in flight
with #340.  Would you like me to move it to media-types.md in this PR?

LGTM
I like @jonboulle's suggestion; lets do this in media-types.md

On Tue, Oct 18, 2016 at 09:07:21PM -0700, Brandon Philips wrote:

I like @jonboulle's suggestion…

“COULD distinguish” isn't much guidance ;).  Do you have specific
concerns with the “If you can verify…” language I quote in 1?  That
quote tries to set up the following behavior tree:

You know the media type ahead of time.
a. The Content-Type matches your expected media type.
Use your expected media type to select the appropriate blob
parser / validator.
b. The Content-Type does not match the expected media type.
i. You know the digest ahead of time.
Use your expected media type to select the appropriate blob
parser / validator.  Possibly warn about the mismatch.
ii. You don't know the digest ahead of time.
Error out citing the mismatch.
You don't know the media type ahead of time.
Use Content-Type to select the appropriate blob parser / validator.

Would you change any of those?  Recommend a different tree?  Just
rephrase the wording for that tree?

Do you have specific
concerns with the “If you can verify…” language I quote in [1]?

This seems fine. Please file a followup PR.


Document cargo risczero build

Prior discussion:

I think there's instructions for how to run the tool, but not good documentation about why it's necessary, what the limitations are, etc.

Current plan is to create a page on dev.risczero.com covering why one would want to use this (i.e. for reproducible build) and what it's functionality and limitations are.

Adding some more context on the requirements here:
Verifying image IDs by building from source is part of the security model for many zkVM applications. In particular, applications integrating with smart contracts will generally need to provide users with a process by which they can reproduce the image ID from source.
We need to have a workflow that we can provide zkVM app developers, and the app developers can provide the consumers of their code, to run this reproducible build. This workflow should be generic across projects, both using the Foundry template and not, and easy to follow.

Related to #1658

I think it's probably best to hold off on adding a dedicated page for this until we do some engineering re: #2075 -- until then, we don't have a good story for how foundry template users can access determinstic builds.
In the mean time, we have the terminology entry: https://dev.risczero.com/terminology#deterministic-builds


Add user - username validation

Error message is not enlightening.

username: filled with "a"

error message: "Invalid username. Usernames should start with a letter and only lowercase, alphanumeric and underscores are allowed"

Username "a" follows the rule but is not accepted.

If username with only 1 character can not be accepted, then the error message needs to be changed in this case.
Note: Username "aa" is accepted

The problem still occurs.

If the minimum number of characters of the username is 2, the error message should inform.

It will no longer be prioritized.


Feature Request: Darken inactive and other windows

There should be an option to darken inactive windows and windows of plugins like toggleterm, nvim-tree etc. This iwould be similar to material.nvim theme which is quite popular.

From what I understand, this is to darken the background of mvim-tree etc. right?

From what I understand, this is to darken the background of mvim-tree etc. right?

Or an inactive split, I did something similar for gruvbox some time back for reference.

Sounds great, I'll add it in soon


Fix errors/deprecations/warnings in julia 0.5

NOTE: this depends on a related PR getting merged in AxisAlgorithms: https://github.com/timholy/AxisAlgorithms.jl/pull/2
The package has several errors and warnings and it's basically broken on julia 0.5.
I tried to fix them all and now on my machine all tests pass without any complaint both on 0.4 and 0.5.
I had to do some very ugly things though, which I think is unavoidable since in julia 0.5 ambiguities lead to errors rather than warnings, which means tests were not passing.
This also introduces a dependency on Compat due to the use of MulFun which has been deprecated (introducing another error here) and super which has become supertype.

Thanks for tackling this!
I've been afk for about a month, so I've completely missed the release of 0.5 with all that entails. I'll hopefully be able to give this PR some love later this week - if possible, I'd like to avoid the @eval stuff, and enough other small things have changed that I'd like to give all of it some full review.

OK, I've been able to give this a closer look now; I'll add a few line comments in the places where I think we can improve.


Bump cargo to 0.2.0

Closes #808
Closes #1178

r? @wycats
(rust_highfive has picked a reviewer for you, use r? to override)

r? @brson
I'll tag this in git once it's merged

@bors: r+

:pushpin: Commit 30bc5a6 has been approved by brson

:hourglass: Testing commit 30bc5a6 with merge 83a6d0e...

:sunny: Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64

Thanks for this!

:+1:


Outdated, lots of emojis missing

There might have been new emojis added to Discord since this repo was last updated. It would be nice to know how you got this data, so that I can make an updated list

There might have been new emojis added to Discord since this repo was last updated

I've found some: the many color variations of the circle emojis are missing for example. This repo only has white_circle, black_circle, red_circle and large_blue_circle, from which large_blue_circle doesn't even exist anymore, and all the color variations are missing:

Ok I did it myself. If the developer ever comes back to this currently abandoned package and wants to update it, I suggest him to take this json file as a base. It's 100% complete (taken from Discord source code itself), easy to parse, and up to date (state 2020-05-08)

I can transfer this repository and the NPM package to you, if you want them.

Oh wow thanks for the generous offer! I don't use Javascript, nor NPM, but I suppose simply maintaining the emoji database in this package won't require monumental Javascript or NPM skills...
So yeah, if you want you can transfer the repo to me and I'll update it. Alternatively, you could just enable write access on this repo, then you wouldn't need to give off your repo?

Would love that!

You can transfer ownership to me if you want @Necktrox as i do development with Javascript
@kangalioo if you can point me to where you obtained that data, that would be great, cause then i can make a fetch each time to get said data and update it accordingly

I opened Discord in browser with devtools open and looked at the network requests made. I checked each .js file downloaded for mentions of an emoji name (e.g. "rotating_light"). https://discord.com/assets/5dc3de3390231d99c855.js was a match. Note the obfuscated file name though; I wouldn't be surprised if this file name changed regularly, and you have to repeat the devtools process every so often.
Now, deep inside this minified js file is hidden the JSON data from the gist I shared above. Note that the JSON data is obfuscated as well - it contains syntax errors at random places. What I did was extract the long minified JSON string, pretty-print it, and then manually fix the 10-20 syntax errors I encountered.

@kangalioo you weren't kidding.  "grinning" was actually found in that and it was definitely obfuscated.  Very smart idea / tool with how you obtained it.  How did you convert the "ðŸ˜€" to the actual number that you have in your data / GIST file?

You're probably looking at that file in your browser. The document uses UTF-8 I think, but the browser doesn't know that and tries to guess - its guess is wrong, and it shows garbled characters. Try downloading the file and opening in an editor. You might have to explicitly set the encoding to UTF-8 or something

That makes sense @kangalioo

What's your npm user, @kangalioo ?

I don't have one, though I could create one. However, I feel like eaaliprantis is probably a better person to overtake this package, as they do Javascript development and I don't.
What do you think @eaaliprantis?

@kangalioo i could take ownership of the project and enhance it further.  I just got a bit side-tracked.
@Necktrox i have my npm (just had to create one) at npmjs.com/eaaliprantis
But if you want, you can throw it under my friend at https://www.npmjs.com/~xcykrix as he does like making software / releases for his projects @xCykrix

I'm fine with whatever. Definitely an interesting project haha.

While I do not currently have an expected date or time for this, the project will be seeing updates in the future to bring this back to life. You can view the available milestones for a little bit of a brief overview and brainstorming I have done.

Closing this issue as it marks the official release of v2.0.0. It is functionally the same and should index correctly with any form of Intellisense. You can view the _snapshot.json for the complete index table, including the different diversities of emojis (skin tones, design, etc.)
This index will automatically create and update itself as changes are made by Discord, eventually to be automating releases to npm in the future. It pulls the latest js file with a scrape and search and manually extracts the emoji index.
If an emoji is incorrect or missing, please create another issue and we can investigate that together.
Thank you for the chance to let this be revived @Necktrox and thank you @kangalioo for opening the issue to have this happen. If you guys have any questions, feel free to drop on by at https://chat.amethyst.live/ for my Discord or open a discussion here.
Closing as this has been resolved by the latest commit(s).


Support Dual mode ble for android

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Akka actor metrics collection

Essentially, user level operators consist of multiple actors of Akka system. To support workflow advance scheduler or bottleneck analysis, we need to find ways to collect actor metrics of Akka actor. This can be done by the open source tool Kamon. I will try to include this tool and do some testS in Texera as my next step.

API:
'getActorProcessingTime(path:String): list[Map]'.

Map contains:1. count, 2. avg 3. min 4. max.
'getActorMailboxStats(path:String): list[Map]':
Map contains:1. count, 2. avg 3. min 4. max.  5. queue
time

1.Survey for akka monitoring and telemetry

Lightbend Telemetry

This tool can capture features related to akka. The drawback of the tool is that  it is not open source. which can not be modified to implement custom features.

Kamon
Preferred choice for akka  monitoring and telemetry. This project show up after the first one. It was well developed by open source commitee.
The general principle of the tool is  to use Java agent instrument code into JVM, and collect related metrics when certain APIs of akka system are executed.
For example, when an actor start processing message from other, receive() method will be executed. So we can inject a timer between the start and the end of this method to calculate the processing time of the actor.

2. APIs
When we execute a workflow, some  temporary worker(actor) will be created, in the worker, a reporter will store the metric data when the actor ends. The data can be get with the API:
def getActorProcessingTime: ListBuffer[MetricWrapper]
Example data is logged here:
 ActorId:ActorVirtualIdentity(Worker:WF4-CSVFileScan-operator-754ecd40-17b0-42b3-b533-9f8b5e085019-main-0)
 ActorPath:Amber/remote/akka/Amber@localhost:2552/user/$d/$b
-------------------
akka.actor.processing-time
Time Interval:[1630686266898,1630686266914](Unit:milliseconds)
Time : 15(Unit:milliseconds)
Value:Map(count -> 64, avg -> 0.102703, min -> 0.007872, max -> 3.309568, median -> 0.036096)(Unit:milliseconds)
MetricType:gauge
Tags:[path -> Amber/remote/akka/Amber@localhost:2552/user/$d/$b,system -> Amber,metricValueUnit -> milliseconds,timeStampUnit -> milliseconds,class -> edu.uci.ics.amber.engine.architecture.worker.WorkflowWorker,dispatcher -> akka.actor.default-dispatcher]
-------------------

Similarly, the mail box metrics can be get using
def getActorMailboxStats: ListBuffer[MetricWrapper]
 ActorId:ActorVirtualIdentity(Worker:WF4-CSVFileScan-operator-754ecd40-17b0-42b3-b533-9f8b5e085019-main-0)
 ActorPath:Amber/remote/akka/Amber@localhost:2552/user/$d/$b

 -------------------
akka.actor.mailbox-size
Time Interval:[1630686266898,1630686266914](Unit:milliseconds)
Time : 15(Unit:milliseconds)
Value:Map(count -> 93, avg -> 0, min -> 0, max -> 2, median -> 0)(Unit:milliseconds)
MetricType:gauge
Tags:[path -> Amber/remote/akka/Amber@localhost:2552/user/$d/$b,system -> Amber,metricValueUnit -> #,timeStampUnit -> milliseconds,class -> edu.uci.ics.amber.engine.architecture.worker.WorkflowWorker,dispatcher -> akka.actor.default-dispatcher]
-------------------
akka.actor.time-in-mailbox
Time Interval:[1630686266898,1630686266914](Unit:milliseconds)
Time : 15(Unit:milliseconds)
Value:Map(count -> 64, avg -> 0.186402, min -> 0.010368, max -> 4.128768, median -> 0.078848)(Unit:milliseconds)
MetricType:gauge
Tags:[path -> Amber/remote/akka/Amber@localhost:2552/user/$d/$b,system -> Amber,metricValueUnit -> milliseconds,timeStampUnit -> milliseconds,class -> edu.uci.ics.amber.engine.architecture.worker.WorkflowWorker,dispatcher -> akka.actor.default-dispatcher]
-------------------

3.Configuration
In application.conf, the default configuration file is like this:
kamon {
 metric.tick-interval=10s ## Control the length of time interval for metric collection
actors.doomsday-wildcard = on ## necessary, because we need to track all actors without any groups
instrumentation.akka.filters {
  actors.track {
    includes = ["**"]
    excludes = []
  }
}
  workerFlowWorkerReporter {
  metricsList=["akka.actor.processing-time","akka.actor.time-in-mailbox","akka.actor.mailbox-size"] ## If you need more metrics, it can be listed here
    time-unit = "ms" ## unit for metrics related to time (Set:[s, ms, µs, ns])
    information-unit = "b" ## time unit for metrics related to memory (Set:[b, kb, mb, gb])

    environment-tags {
      include-service = "no" ## if yes, the service name(e.g. Amber) will be included in worker's tag set
      include-host = "no"  ## if yes, the host name(e.g. Ubuntu) will be included in worker's tag set
      include-instance = "no"
      filter { ## necessary
        includes = ["**"]
        excludes = []
      }
    }
  }
}

4.How to implement more metrics
Actually there are more metrics that can be collected:

group discussion 1/13: this task is done


Added option to add softDelete routes from resource

Laravel allows models tohave softdeletes to not really remove from the database but just add a flag with date that the resource is removed.
This contribution allows a developer to create a resource route that supports softdeletes out of the box like so:
Route::resource('foo', 'FooController')->withSoftDeletes();

No plans to add this right now.


Cannot install logstash-input-websocket with 7.0.0-beta1

For all general issues, please provide the following details for fast resolution:

Version: 7.0.0-beta1
Operating System: osx
Steps to Reproduce:

#  ./bin/logstash-plugin install logstash-input-websocket
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/Users/alr/Downloads/stacks/7.0.0-beta1/logstash-7.0.0-beta1/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to constructor java.security.cert.CertificateFactory(java.security.cert.CertificateFactorySpi,java.security.Provider,java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Validating logstash-input-websocket
Installing logstash-input-websocket
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "addressable":
  In snapshot (Gemfile.lock):
    addressable (= 2.4.0)

  In Gemfile:
    logstash-input-websocket java was resolved to 4.0.4, which depends on
      ftw (~> 0.0.46) java was resolved to 0.0.46, which depends on
        addressable (~> 2.2.0) java

    json-schema (~> 2) java was resolved to 2.8.1, which depends on
      addressable (>= 2.4) java

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "logstash":
  In Gemfile:
    logstash-input-websocket java was resolved to 0.1.2, which depends on
      logstash (< 2.0.0, >= 1.4.0) java

Could not find gem 'logstash (< 2.0.0, >= 1.4.0)', which is required by gem 'logstash-input-websocket', in any of the sources.

Bundler could not find compatible versions for gem "logstash-core":
  In snapshot (Gemfile.lock):
    logstash-core (= 7.0.0)

  In Gemfile:
    logstash-core java

    logstash-core-plugin-api java was resolved to 2.1.16, which depends on
      logstash-core (= 7.0.0) java

    logstash-input-syslog java was resolved to 3.4.1, which depends on
      logstash-filter-grok java was resolved to 4.0.4, which depends on
        logstash-core (>= 5.6.0) java

    logstash-input-websocket java was resolved to 0.1.4, which depends on
      logstash-core (< 2.0.0, >= 1.4.0) java

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "logstash-core-plugin-api":
  In snapshot (Gemfile.lock):
    logstash-core-plugin-api (= 2.1.16)

  In Gemfile:
    logstash-devutils (~> 1) java was resolved to 1.3.6, which depends on
      logstash-core-plugin-api (<= 2.99, >= 2.0) java

    logstash-input-websocket java was resolved to 3.0.2, which depends on
      logstash-core-plugin-api (~> 1.0) java

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Like with #15, the problem is the ftw gem which only declares compatibility with addressable 2.3.x but other parts of Logstash require a more recent version of addressable. The ftw gem needs to be updated and I've asked about this in https://github.com/jordansissel/ruby-ftw/pull/38.

Any update on this issue? I have the same situation with logstash v7.0.1 and logstash-input-websocket v4.0.4.

The bad dependency in FTW was fixed in https://github.com/jordansissel/ruby-ftw/pull/43 and released in 0.0.49 of that gem so we're okay now. I verified that the plugin installs cleanly on Logstash 7.1.1 and 7.4.2.


Prompt window  and main window are not correctly aligned when using maxwidth settings

When using maxwidth option, the prompt window is not aligned.

As soon as we  filter out enough  items and the scrollbar is gone,  the prompt  window is aligned  with the  main window.
to reproduce:
import autoload 'scope/popup.vim' as sp
sp.OptionsSet({
  maxwidth: 140,
})

vim version: 9.1.429

Cannot reproduce. Are you using latest version of this plugin? What is the width of your terminal window? More info needed.
https://asciinema.org/connect/45e37ae2-dfce-4212-816a-85735b25fd7d

I can reproduce with this minimal vimrc file
vim9script
import autoload 'scope/popup.vim' as sp
sp.OptionsSet({
  maxheight: 30,
  maxwidth: 80,
})

Oddly enough if I remove the maxheight  settings the issue disapears.
vim: version 9.1.426
os: ubuntu 22.04

Yeah works. Thanks !


validate-bundle should support a configuration file

Is your feature request related to a problem? Please describe.
Our validation pipeline for InSight currently has a preset configuration file that hard-codes all validation parameters we want set against any given InSight bundle. We're using the validate tool currently, not the validate-bundle and we'd like to use the parallelization support present in the new v1.21.0 validate-bundle script but can't currently pass our configuration file to the validate-bundle script.
Describe the solution you'd like
Add ability to pass a configuration file to the validate-bundle script similar to how a configuration file is supported with the underlying validate script
Describe alternatives you've considered
Pass all parameters on the command-line to validate-bundle. This doesn't seem to work, as passing the parameters at the command line yields a usage statement back from validate-bundle:
$ validate-bundle -R pds4.bundle --spot-check-data 500 -t /path/to/my/bundle/bundle.xml

usage: validate-bundle -t </path/to/bundle.xml> [-n <num-groups>]

  Script to run Validate Tool on a bundle parallelizing across
  multiple cores. This script will split up the PDS4 products in
  the bundle into multiple groups, and run in parallel across
  multiple cores. By default,the software uses half the number of
  available cores on the machine, or the -n flag can be used to
  specify a custom number of cores.

  Dependencies:
      * GNU Parallels is installed (See https://www.gnu.org/software/parallel/)
      * Validate Tool is in your PATH
        % export PATH=${PATH}:/path/to/validate-x.x.x/bin

  Arguments:

  -t, --target-bundle  </path/to/bundle.xml>  Indicate the bundle to be validated
                                              by specifying the bundle.xml product.

  -n, --num-groups     <num-groups>           Optional argument to specify the number
                                              of groups and cores to use for the validation.
                                              Default: half the number of cores on the machine

Additional context
Given that the above command-line equivalent did not work, there may be an additional bug here regarding passing other validate flags to validate-bundle

@riverma what does your configuration file look like and how critical is it that it support a config file vs CLI options?

@riverma additionally, the intent of this script is not to support all capabilities of validate, but rather to support an operational validation of an archive. spot checking content validation is really more for testing purposes than an operational "run for the record" to validate that the archive is valid.
I would recommend running this as validate-bundle -t <path>

@riverma what does your configuration file look like and how critical is it that it support a config file vs CLI options?

Hi @jordanpadams - it's critical only if we can't leverage a command-line equivalent of the below configuration file:
validate.target = {{ data_delivery_folder }}
validate.report = {{ validate_tool_run_report_path }}
validate.rule = pds4.bundle
validate.spotCheckData = 500

Per your second comment, noted on the validate.spotCheckData field - thanks for mentioning that. I haven't tried sending in the validate.report or validate.rule flags via validate-bundle CLI, but we'd at a minimum need those two to be passable in the CLI version.

@riverma
validate.target = {{ data_delivery_folder }} >>> use the -t flag
validate.report = {{ validate_tool_run_report_path }} >>> see comments below
validate.rule = pds4.bundle >>> this is done by default
validate.spotCheckData = 500 >>> wontfix

Per the validation report, we can provide this, as a note, this software runs validate N number of times simultaneously and the output report takes all the reports from the N validate runs and consolidates them.


Support pip 8's hash checking mode

See https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode
It would be nice if pip-tools generated the hashes automatically in its output.
That would increase security without adding any overhead for the developer.

Yay! \o/

This looks really interesting. Is there currently a way of generating those lines in some way? Or does one currently really have to copy the hash from the download URL and manually paste it into the requirements.txt?

I've been using hashin for semi-automated hash generation, but pip hash will at least get you the hash to stdout.

@nvie The hash created by the hash checking mode is not identical to the MD5 hash generated and offered by PyPI download URLs. "Manually pasting" is basically the workflow that is expected for the hash checking feature, since it's basically part of the manual vetting process. You should use the hash subcommand as @ubernostrum indicated for that. I'm personally not convinced the hashin package is useful in that regard since it kind of defeats the purpose of the whole feature. Here's what I'd do right now (without pip-tools):

pip download <package-name>
vet the file that got downloaded that it's what you'd expect
pip hash <file that got downloaded>
copy the hash to requirements file

The features that would be useful of pip-tools to have is:

don't delete the --hash .. lines in the requirements
offer optional command line option e.g. --auto-hash to the pip-compile tool so it can be used like hashin

I'm personally not convinced the hashin package is useful in that regard since it kind of defeats the purpose of the whole feature.

I agree that skipping the 'vet the package' step does increase the risk, however I'm not convinced that it's by a huge amount.
For me, the major advantage of the hashes are that it protects against:

An active MITM attacker (they'd need to MITM the connection to PyPI from every one of: my local dev environment where the hashes were generated, Travis and the stage/prod deployment -- otherwise there would be a hash mismatch against a subset of them)
Accidental modification of an existing package (eg uploading a newer version over an older one, which actually happened in one of our dependencies last year, and thankfully was caught by peep)
Malicious modification of an existing package version (eg PyPI compromise, or package owner PyPI credential leak)

By not vetting a new package (or a new version of an existing package), there is a risk that either:
a) the package author is trying to sneak malicious code into the package
b) someone other than the author created a fake new version release (either via PyPI compromise or package owner credential leak)
However for (a), I struggle to believe that most people would review the code thoroughly enough to spot intentionally obfuscated malicious code in a large package (even if diffing against a known good version, the changes could be hidden in a refactor).
And for (b), you'd have to manually update to the new version of the package prior to the package owner realising that someone had just created a new release on their behalf. (Side note: perhaps PyPI should email all the package owners every time a new release is created?)

I agree with @edmorley. That would be the most convenient way to take advantage of this feature.
It improves security in the same way HSTS does. If you're constantly victim of a MITM, you're still in trouble. If you're generally accessing the Internet without anything interfering, you'll notice if something does, whether voluntarily or not.

This is now supported as of #383 so this can be closed, although it could also use some documentation

Closing as it has been implemented.


[Improvement] not print logs to fe.out when fe is running under daemon

Proposed changes
Issue Number: close #xxx
Problem Summary:
Describe the overview of changes.
Checklist(Required)

Does it affect the original behavior: (Yes/No/I Don't know)
Has unit tests been added: (Yes/No/No Need)
Has document been added or modified: (Yes/No/No Need)
Does it need to update dependencies: (Yes/No)
Are there any changes that cannot be rolled back: (Yes/No)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

let me seesee


Remove iam-related files from pubsub.

Justification: IAM is an independent service but supplied to
pubsub as a mixin. This means that IAM can be used by something
else.
Because of this, we created an independent package,
grpc-google-iam-v1. Thus we don't have to have those grpc-related
files for IAM inside of pubsub -- but just add a dependency.
Fixes #942.

Thank you @jmuk!

I'm curious why the IAM protobufs were turned into a separate gem, but the longrunning protobufs were added to googleapis-common-protos? Couldn't the IAM protobufs also be provided by googleapis-common-protos? What is the deciding factor between these two approaches?

I am actually not 100% sure, but here is my understanding; longrunning is a common interface, while IAM is an independent service -- so it has API major version (v1), but some API like pubsub can embed it.
Cc @bjwatson for sanity check.

Yep, @jmuk is correct.

Tests failing at:
LoadError: cannot load such file -- google/iam/v1/iam_policy
/home/travis/build/GoogleCloudPlatform/google-cloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:19:in `require'

Oops, sorry. The new commit is also necessary, since the path name has changed to the _pb suffix.

@jmuk Thanks for the update, going to check locally, hope to merge soon!

@jmuk I get 4 errors (all like the one shown below) when running acceptance tests:
$ git checkout jmuk/pubsub_iam
Note: checking out 'jmuk/pubsub_iam'.
...
HEAD is now at 258089b... Rename the path of iam_policy
$ cd google-cloud-pubsub/
$ bundle update
Fetching https://github.com/GoogleCloudPlatform/google-cloud-ruby.git
Fetching gem metadata from http://rubygems.org/.........
...
Installing grpc-google-iam-v1 0.6.8
Using google-cloud-pubsub 0.20.1 from source at `.`
Bundle updated!
$ bundle exec rake acceptance
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
Run options: --seed 13897

# Running:

Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0003_allows permissions to be tested on a topic (1)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0003_allows permissions to be tested on a topic (2)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0003_allows permissions to be tested on a topic (3)
ERetrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0002_allows policy to be updated on a subscription (1)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0002_allows policy to be updated on a subscription (2)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0002_allows policy to be updated on a subscription (3)
ERetrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0004_allows permissions to be tested on a subscription (1)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0004_allows permissions to be tested on a subscription (2)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0004_allows permissions to be tested on a subscription (3)
ERetrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0001_allows policy to be updated on a topic (1)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0001_allows policy to be updated on a topic (2)
Retrying Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0001_allows policy to be updated on a topic (3)
E............

Finished in 28.674844s, 0.5580 runs/s, 13.4962 assertions/s.

  1) Error:
Google::Cloud::Pubsub::pubsub::IAM Policies and Permissions#test_0003_allows permissions to be tested on a topic:
LoadError: cannot load such file -- google/iam/v1/iam_policy_services
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:74:in `require'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:74:in `iam'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:291:in `block in test_topic_permissions'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:345:in `block in execute'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-core/lib/google/cloud/core/grpc_backoff.rb:77:in `block in execute'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-core/lib/google/cloud/core/grpc_backoff.rb:75:in `loop'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-core/lib/google/cloud/core/grpc_backoff.rb:75:in `execute'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:344:in `execute'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:291:in `test_topic_permissions'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/topic.rb:436:in `test_permissions'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb:264:in `block (3 levels) in <top (required)>'

Adding the _pb suffix to the require at lib/google/cloud/pubsub/service.rb:74 fixes the acceptance tests for me.

@jmuk I have a local branch in which I have converted google-cloud-pubsub to use the google-gax code. I tried to manually reproduce the changes in this PR there, and now get this error in acceptance tests:
Google::Gax::RetryError: GaxError Exception occurred in retry method that was not classified as transient, caused by 5:Resource not found (resource=gcloud-ruby-acceptance-2016-10-03t22-38-39z-9cb3f00b-434acba5).
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:352:in `rescue in block (2 levels) in retryable'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:346:in `block (2 levels) in retryable'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:345:in `loop'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:345:in `block in retryable'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:264:in `call'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:264:in `block in catch_errors'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:226:in `call'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:226:in `block in create_api_call'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:252:in `call'
    /Users/quartzmo/.rbenv/versions/2.2.3/gemsets/gcloud-ruby-yard/gems/google-gax-0.5.1/lib/google/gax/api_callable.rb:252:in `block in create_api_call'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/v1/publisher_api.rb:345:in `call'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/v1/publisher_api.rb:345:in `get_topic'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:99:in `block in get_topic'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:304:in `execute'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/service.rb:99:in `get_topic'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/lib/google/cloud/pubsub/project.rb:144:in `topic'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb:21:in `retrieve_topic'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb:36:in `block (3 levels) in <top (required)>'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb:35:in `each'
    /Users/quartzmo/code/google/codez/gcloud-ruby/google-cloud-pubsub/acceptance/pubsub/pubsub_test.rb:35:in `block (2 levels) in <top (required)>'

GAX actually wraps grpc errors with its own error class as https://github.com/googleapis/gax-ruby/blob/master/lib/google/gax/errors.rb, and the original errors are accessed through 'cause' of the errors.
If your code relies on the generated file, line 347 in service.rb (rescue for execute) would have to catch GaxError in addition to grpc errors.

Please let me know if this design (GAX is wrapping errors with its own error class) doesn't look great, I'm open to change that.

@jmuk I think the wrapped errors approach is correct. But did you see my earlier comment about cannot load such file -- google/iam/v1/iam_policy_services while running acceptance tests using your branch?

Ah, sorry, I saw it and fixed locally but not uploaded a patchset.

@jmuk Once acceptance tests pass for me locally, is this PR ready to merge?

@jmuk write:

Please let me know if this design (GAX is wrapping errors with its own error class) doesn't look great, I'm open to change that.

I didn't realize that all errors were being wrapped into Google::Gax::GaxError. I figured it was a base error class for Google::Gax::RetryError to inherit from. This does break our error handling. We don't have access to Error#cause on Ruby 2.0, so we can't reliably get the GRPC::BadStatus error to figure out how to handle it.
If Google::Gax::GaxError would propagate the #code, #details, and #metadata from GRPC::BadStatus then we could just treat them as the same. Or, if Google::Gax::GaxError had a #grpc_error attribute that would give the original error we could use that.

This is how our error creation relies on code or status_code to map gRPC errors to our own error types.

@blowmage I think the 2.0 situation is handled here.

@jmuk It will be less work for us to just continue to handle the gRPC errors, although I'm not sure that is the only concern to consider for your design.

Oh, great. We can use #cause and make it work. Awesome!

Passes acceptance tests locally (note that these tests and the library do not yet use this GAX code.) Merging.


Support specializing get_hash without nightly

Submitting as an alternative to #239.

Retargeting this to the 0.9 pre-release branch.

@tkaitchuck If only 0.9 is fixed, then the abandoned unfixed 0.8 version will cause the same kind of pain that the abandoned unfixed 0.7 version has caused when only 0.8 had a fix.

I agree with https://github.com/tkaitchuck/aHash/pull/242#issuecomment-2316468766 — I was hoping to get this in an 0.8 patch.


Update packages that are part of baseimage?

This is kind of a weird question, but as part of our container build we basically do apt-get update && apt-get upgrade and I was wondering how crazy this is? It updates a ton of packages. Is there any reason you don't update the packages in the baseimage?

Every time there is a new release, we always include up to date packages.
Which version are you using?
On 2018. Feb 26., Mon at 23:01, Donald Webster<EMAIL_ADDRESS>wrote:

This is kind of a weird question, but as part of our container build we
basically do apt-get update && apt-get upgrade and I was wondering how
crazy this is? It updates a ton of packages. Is there any reason you
don't update the packages in the baseimage?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/phusion/baseimage-docker/issues/473, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAeKjzTJQwRYEVIsGhvcYhn4KTLve76jks5tYymxgaJpZM4SUAA7
.

I have to admit, I'm not the best at Docker. We pull phusion/baseimage:latest in our Dockerfile, then run apt-get update && apt-get upgrade and it updates a ton of packages.
I think this is simply because baseimage pulls 16.04 and runs scripts on it, Ubuntu doesn't update the packages in their base image and it may or may not make sense for you guys to do anything like that on top of it.
Is updating the packages inside the container crazy?

Ubuntu updates it's base image regularly, and the packages inside it.
When we build baseimage we also upgrade all packages.
When you build you can also upgrade
It's not crazy.

Cool cool, thanks for the information. :)


the pretrained model on cityscapes

could you send the pretrained model of cityscapes to me? my email address is<EMAIL_ADDRESS>thank you!

If you can get the models, please dm me! my email is<EMAIL_ADDRESS>

could you send the pretrained model of cityscapes to me? my email address is<EMAIL_ADDRESS>thank you!

Hello guys
when I trained the LEDNet on cityscapes, I got this problem
========== ENCODER TRAINING ===========
/home/akram/dataset/cityscapes/leftImg8bit/train
/home/akram/dataset/cityscapes/leftImg8bit/val
----- TRAINING - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H -----
<class 'utils.loss.CrossEntropyLoss2d'>
----- TRAINING - EPOCH 1 -----
LEARNING RATE:  0.0005
----- TRAINING - EPOCH 1 <torch.utils.data.dataloader.DataLoader object at 0x7fb3f9c15f98> -----
Traceback (most recent call last):
File "main.py", line 511, in
main(parser.parse_args())
File "main.py", line 465, in main
model = train(args, model, True) #Train encoder
File "main.py", line 212, in train
for step, (_,images, labels) in enumerate(loader):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/aa/LEDNet/utils/dataset.py", line 86, in getitem
filenameGt = self.filenamesGt[index]
IndexError: list index out of range

If you can get the models, please email me! thanks so much . my email is<EMAIL_ADDRESS>

Hello guys
when I trained the LEDNet on cityscapes, I got this problem
========== ENCODER TRAINING ===========
/home/akram/dataset/cityscapes/leftImg8bit/train
/home/akram/dataset/cityscapes/leftImg8bit/val
----- TRAINING - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@h -----
<class 'utils.loss.CrossEntropyLoss2d'>
----- TRAINING - EPOCH 1 -----
LEARNING RATE: 0.0005
----- TRAINING - EPOCH 1 <torch.utils.data.dataloader.DataLoader object at 0x7fb3f9c15f98> -----
Traceback (most recent call last):
File "main.py", line 511, in
main(parser.parse_args())
File "main.py", line 465, in main
model = train(args, model, True) #Train encoder
File "main.py", line 212, in train
for step, (_,images, labels) in enumerate(loader):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/aa/LEDNet/utils/dataset.py", line 86, in getitem
filenameGt = self.filenamesGt[index]
IndexError: list index out of range

Hello guys
when I trained the LEDNet on cityscapes, I got this problem
========== ENCODER TRAINING ===========
/home/akram/dataset/cityscapes/leftImg8bit/train
/home/akram/dataset/cityscapes/leftImg8bit/val
----- TRAINING - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@h -----
<class 'utils.loss.CrossEntropyLoss2d'>
----- TRAINING - EPOCH 1 -----
LEARNING RATE: 0.0005
----- TRAINING - EPOCH 1 <torch.utils.data.dataloader.DataLoader object at 0x7fb3f9c15f98> -----
Traceback (most recent call last):
File "main.py", line 511, in
main(parser.parse_args())
File "main.py", line 465, in main
model = train(args, model, True) #Train encoder
File "main.py", line 212, in train
for step, (_,images, labels) in enumerate(loader):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/anaconda3/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/akram/aa/LEDNet/utils/dataset.py", line 86, in getitem
filenameGt = self.filenamesGt[index]
IndexError: list index out of range

I have encountered this problem before. Although this is solved now, I have encountered other problems. Can I communicate with each other?

请问哪位朋友有LEDNet的预训练模型，有的话，能不能给我发一下，我的邮箱1029692561@qq.com,十分感谢

could you send the pretrained model of cityscapes to me? my email address is<EMAIL_ADDRESS>thank you!

请问你拿到了预训练模型吗

Thanks very much. I don’t need it anymore.have a good day
在 2022-04-19 15:07:19，Th8646 @.***> 写道：
could you send the pretrained model of cityscapes to me? my email address is @.*** thank you!
请问你拿到了预训练模型吗
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>


chore(main): release 0.3.0

:robot: I have created a release beep boop
0.3.0 (2024-06-21)
Features

work with any union type (9adb85f)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.3.0
:sunflower:


populate from big dict

I want to move big dict (~100M entries) to redis-dict. Assignment single element in loop
for elem in pydict:
    redisdict[elem]=pydict[elem]

is rather slow is there any better way for this?

Yes there is.
The issue there is that it's doing round trips to redis.
To solve it you can use pipeline to make one round trip.
with redis_dic.pipeline():
    for k, v in pydict.items():
        redis_dic[k] = v


Show kustomization in file explorer

Now that we show kustomizations/patches/helm-charts in a separate panel it is no longer possible to immediately see the corresponding file. I can open the file-explorer which will have the corresponding file selected - but it wont scroll to it if not visible - could we (for example) have a hover-popup for kustomizations with a "Show file" option that would open the file-explorer and select the corresponding file? Or is there some better way to achieve this?

@tommywhitehead thoughts on how to do this ?

if we just set the selectedPath to the kustomization file, the File Explorer icon will get highlighted and opening the tab should scroll to the selected path

Maybe the action should be Go to file, which automatically switches over to the file explorer, selects the file, and scrolls to make it visible?
Is it problematic that you lose selected state of wherever you came from?

I think we should be ok, we will go with your suggestion. Thank you @tommywhitehead

@jfermi
https://user-images.githubusercontent.com/20525304/150304154-c9e5e23c-477e-4dbf-b963-310df34a66b0.mp4