Updated to v1.19.0 and sqlc generate no longer runs

Version
Other
What happened?
updated from v1.17.2 and get the following log when i run sqlc generate.  I use brew to install sqlc and it looks like old versions are not being tracked in brew so we cannot downgrade.
Relevant log output
sqlc generate
panic: interface conversion: ast.Node is *ast.SQLValueFunction, not *ast.FuncCall

goroutine 19 [running]:
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).sourceTables(0x104b0f2e0?, 0x14000a7b4a0, {0x104d52198?, 0x14000d90dc0?})
	github.com/kyleconroy/sqlc/internal/compiler/output_columns.go:510 +0xdb4
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).outputColumns(0x14000114000, 0x14000a7b4a0, {0x104d52198?, 0x14000d90dc0})
	github.com/kyleconroy/sqlc/internal/compiler/output_columns.go:55 +0x38
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).buildQueryCatalog(0x104a95200?, 0x14000116000, {0x104d52198?, 0x14000d90fd0?}, {0x0, 0x0, 0x0})
	github.com/kyleconroy/sqlc/internal/compiler/query_catalog.go:35 +0x1c4
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQuery(0x14000114000, {0x104d51f38?, 0x14000e97620?}, {0x14000203200, 0x8ba}, {{0x0?, 0x0?, {0x0?, 0x0?}, 0x0?}})
	github.com/kyleconroy/sqlc/internal/compiler/parse.go:93 +0x65c
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQueries(0x14000114000, {{0x0?, 0x0?, {0x0?, 0x1?}, 0x1?}})
	github.com/kyleconroy/sqlc/internal/compiler/compile.go:80 +0x3bc
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).ParseQueries(...)
	github.com/kyleconroy/sqlc/internal/compiler/engine.go:49
github.com/kyleconroy/sqlc/internal/cmd.parse({_, _}, {_, _}, {_, _}, {{0x140004ac030, 0xa}, {0x14000110000, 0x1, ...}, ...}, ...)
	github.com/kyleconroy/sqlc/internal/cmd/generate.go:350 +0x1e0
github.com/kyleconroy/sqlc/internal/cmd.Generate.func1()
	github.com/kyleconroy/sqlc/internal/cmd/generate.go:224 +0x654
golang.org/x/sync/errgroup.(*Group).Go.func1()
	golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 +0x5c
created by golang.org/x/sync/errgroup.(*Group).Go
	golang.org/x/sync@v0.3.0/errgroup/errgroup.go:72 +0xa0

Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux, macOS
What database engines are you using?
No response
What type of code are you generating?
Go

Sorry about that. We'll need to take a deeper look, but in the meantime if you need an older version you can grab a pre-built binary from the v1.17.2 GitHub release page or from https://downloads.sqlc.dev/

The bug is an invalid type assumption in internal/compiler/output_files#503.
I can fix this with a type assertion and an error bail-out when it fails, but I'm not sure that's the correct thing to do. The offending commit looks like it was part of this PR by @haines and @kyleconroy so hopefully one of them can advise.

Hi Kyle, it happens when i run sqlc generate (needed to build our application).  For completeness i also ran the other cli functions and get the same thing.
So it's not on a query per se but building generating the files.  I am using postgres.

Digging through the pganalyze source a bit led me to try a few different test-cases, and I have one that triggers this panic (using postgres):
SELECT * from CURRENT_DATE;

I'll work on an endtoend test and a bug fix using this as a starting point.

I have a similar issue with 1.19.0.
(select id
from chat
where id < ? or id = (select min(id) from chat)
order by id desc
limit 1)
union all
(select id
from chat
where id > ? or id = (select max(id) from chat)
order by id asc
limit 1);

Commenting this query out works like a charm, but generating with this query gives the following error:
panic: interface conversion: ast.Node is *ast.SetOprSelectList, not *ast.SelectStmt

goroutine 6 [running]:
github.com/kyleconroy/sqlc/internal/engine/dolphin.(*cc).convertSetOprSelectList(0xc000a7ebc0?, 0xc0001e4930)
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/engine/dolphin/convert.go:1212 +0x505
github.com/kyleconroy/sqlc/internal/engine/dolphin.(*cc).convertSetOprStmt(0x20?, 0xc000100000?)
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/engine/dolphin/convert.go:1255 +0x7b
github.com/kyleconroy/sqlc/internal/engine/dolphin.(*cc).convert(0xc000810000?, {0x2804eb0?, 0xc0001e48c0?})
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/engine/dolphin/convert.go:1735 +0x20f6
github.com/kyleconroy/sqlc/internal/engine/dolphin.(*Parser).Parse(0xc000015130, {0x27f0380?, 0xc000a4e0a0?})
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/engine/dolphin/parse.go:63 +0x205
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).parseQueries(0xc00021dc00, {{0x40?, 0xf1?, {0x0?, 0x1?}, 0x1?}})
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/compiler/compile.go:74 +0x26d
github.com/kyleconroy/sqlc/internal/compiler.(*Compiler).ParseQueries(...)
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/compiler/engine.go:49
github.com/kyleconroy/sqlc/internal/cmd.parse({_, _}, {_, _}, {_, _}, {{0xc0004520f6, 0x5}, {0xc00043f140, 0x1, ...}, ...}, ...)
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/cmd/generate.go:350 +0x285
github.com/kyleconroy/sqlc/internal/cmd.Generate.func1()
        /go/pkg/mod/github.com/kyleconroy/sqlc@v1.19.0/internal/cmd/generate.go:224 +0x827
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
        /go/pkg/mod/golang.org/x/sync@v0.3.0/errgroup/errgroup.go:72 +0xa5

When installing sqlc via go install I also get the following error:
# github.com/kyleconroy/sqlc/cmd/sqlc
/usr/bin/ld: warning: x86_64.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

But sqlc version and go generate work fine without the above query.

1.14.0 the previous version we used also returns the same error panic: interface conversion: ast.Node is *ast.SetOprSelectList, not *ast.SelectStmt with the UNION ALL query.

(select id
from chat
where chat.id < ? or id = (select min(id) from chat)
order by id desc
limit 1)
union all
(select id
from chat
where chat.id > ? or id = (select max(id) from chat)
order by id asc
limit 1);

Updating the UNION ALL with where chat.id instead of where id fixes the issue. Strange because DBeaver has no issues with this query in the original form.

Regarding the initial *ast.SQLValueFunction interface conversion issue, I have a "fix" for that here: https://github.com/kyleconroy/sqlc/pull/2449.
@j0holo I think there are two unrelated issues you've discovered. Regarding the /usr/bin/ld: warning you're getting from the linker when running sqlc, is that preventing sqlc from running correctly on all of your queries that don't cause panics? Or does sqlc run correctly in those cases?
Regarding the panic from *ast.SetOprSelectList interface conversion, we'll need to create a separate issue for that. I'll try to create the issue this morning and comment here, but feel free to create the issue if you don't see a comment from me yet.

I've created an issue for the *ast.SetOprSelectList panic: https://github.com/kyleconroy/sqlc/issues/2453.
I'm closing this issue now, but if the linker warning is a blocking issue please open another GH issue to track it.

I've created an issue for the *ast.SetOprSelectList panic: https://github.com/kyleconroy/sqlc/issues/2453.
I'm closing this issue now, but if the linker warning is a blocking issue please open another GH issue to track it.


FontSize setting control should only accept a number between 0 and 128

Steps to reproduce

Go to "Appearance"
Get into the font size box.
Press Ctrl+Tab and it starts inserting literal tabs. Keep doing it and it becomes a super long boi to the right instead of wrapping like the same behavior in the Font Face text block.

Expected behavior
non-numeric content should not be allowed. We should only accept a number between 0 and 128.
Actual behavior
Expands to the right and tabs are inserted.
Additional Details
~This is probably a simple fix. Just a matter of adding the wrap styling to CommonResources.xaml. Take a look at what wrap styling was already added to other controls. In fact, if any of the other control styles support wrap styling, feel free to add them there too.~
We need to look into what kind of restrictions we can put on this control. Hopefully it supports limiting content to numbers and limiting the range to 0 and 128. Some of this may have to be filed upstream.

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

Good point. If we only ever accept a value between 0 and 128. We should make the control enforce that (if possible). Updating issue appropriately.

Sorry, is the bug that it doesn't wrap or that you can enter non-numeric content in it such that it needs to wrap? It only ever contains a single number between 0 and 128. There's no need for it to wrap.

Good point. If we only ever accept a value between 0 and 128. We should make the control enforce that (if possible). Updating issue appropriately.

Alright so 90% of this issue is tracked upstream at microsoft/microsoft-ui-xaml#3466.
The Min/Max thing, that we can do.

Alright so 90% of this issue is tracked upstream at microsoft/microsoft-ui-xaml#3466.
The Min/Max thing, that we can do.


Dependabot won't create new labels via default_labels in config.yml

We just changed our config.yml to add a new label to default_labels and noticed that dependabot-preview wasn't adding it. It appears that it only works if the label already exists on the repo, which was surprising to us as we don't really manually use labels anywhere and dependabot-preview appears to have just been creating the security and dependencies labels in the past.

dependabot really should create labels if they don't exist

dependabot really should create labels if they don't exist. for instance, my CI (following the prow convention) won't start without the ok-to-test label

We create any of the default labels if they don't exist, but assume that custom labels that are configured are already present in the repo. What's the scenario where you're configuring dependabot to create labels that don't already exist?

dependabot files a PR and is configured to apply the ok-to-test label
the ok-to-test label doesn't exist on the repository
since the PR was filed by an 'outside collaborator', the CI system won't trigger the pull request job until it detects the ok-to-test label
a manual touch is required on 10+ dep PRs

multiply this by 50+ github repos

Maybe the CI system could ensure the labels exist and create them if they don't, using the GH api? Long-term I think https://github.com/github/roadmap/issues/276 might help here, I'm not sure if Dependabot is the best place for this to be handled, but I can see the reasoning for both sides.
Have tagged this as a feature request so we can consider it when planning, but I can't speak to if and when we might get to it.

Closing out as stale


Scroll a little more (20 pixels)

Find scrollable parent
New behaviour will scroll instantly into view and will scroll additional 20 pixels smoothly.
Replaces #2870

Like discussed, we are using the current version


Adds timeout for windows systems.

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#6  👈
#5
#4
#3
#2
#1
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @Cohors1316 and the rest of your teammates on  Graphite


custom-products the options can no longer be edited

Used Shopware Version: <IP_ADDRESS>
Description:
When a template is created, I can set the options to that extent. For example, when a dropdown field is created and I save the configuration, I cannot reopen it afterwards. The menu loads and throws a 500 error in the console.
Steps to reproduce:
Create a custom product template
Enter the data and create an option, make use of relative surcharges
Create two fields here and fill in the data as desired.
Save and close the window.
Now try to make changes to the options.
Expected result:
You can open the options and make changes.
Actual result:
You can't open the options.

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/CUS-699.
[created from CUS-699, comment 484902]


What neo4j data files should be ignored when persisting database in version control?

I have persisted my database by mounting the data volume in my docker-compose file. I am committing the database to git with the idea that as I develop, any changes to my database can be committed as dev data for the next time I start the container, no matter what machine I'm on.
Every time I run docker-compose stop, I notice that the following files have changed.
modified:   data/databases/graph.db/neostore.id
modified:   data/databases/graph.db/neostore.labeltokenstore.db.id
modified:   data/databases/graph.db/neostore.labeltokenstore.db.names.id
modified:   data/databases/graph.db/neostore.nodestore.db.id
modified:   data/databases/graph.db/neostore.nodestore.db.labels.id
modified:   data/databases/graph.db/neostore.propertystore.db.arrays.id
modified:   data/databases/graph.db/neostore.propertystore.db.id
modified:   data/databases/graph.db/neostore.propertystore.db.index.id
modified:   data/databases/graph.db/neostore.propertystore.db.index.keys.id
modified:   data/databases/graph.db/neostore.propertystore.db.strings.id
modified:   data/databases/graph.db/neostore.relationshipgroupstore.db.id
modified:   data/databases/graph.db/neostore.relationshipstore.db.id
modified:   data/databases/graph.db/neostore.relationshiptypestore.db.id
modified:   data/databases/graph.db/neostore.relationshiptypestore.db.names.id
modified:   data/databases/graph.db/neostore.schemastore.db.id
modified:   data/databases/graph.db/neostore.transaction.db.0

Are these the only files I should expect to change even if no changes are made to the database?
Is it safe to add them to my gitignore file or will issues arise as changes to these files further grow out of sync with the rest of the database?
Is there a better way to persist data for development?
What are the best practices if I'm not following them?
Thanks.

The manual recommends against backing up the data directory:

Using copy-and-paste to move the internal data directory, in order to transfer and seed databases is not supported. If you have an existing Neo4j database whose data you wish to use for a new cluster, it is recommended to create an offline backup using neo4j-admin dump. The resulting backup can then be used to seed the cluster by following the instructions in Section 5.3.3, “Seed from an offline backup”.
source
Neo4j did however recently change the compression algorithm of the dump from 3.5.4 to 3.5.5, resulting in a format incompatibility :sob: :astonished: :boom:
So for now, watch your Neo4j versions and I think a data directory would suit most use-cases.
As this practice is not recommended anyway, I think this issue can be closed.


Application stopped to work due to recent Azure AD changes

Hi.
Seems that some recent updates break application clients.
The code that was working perfectly is now broken, all user update\delete operations are returning
Error creating new user. One or more errors occurred. Insufficient privileges to complete the operation.
This happens even if I'll grant all possible permissions to my registered Native Client application (as per readme.md guide).
This is pretty bad problem, as we can't create\register users from native client anymore

I'm also receiving this error today.

Hey folks.  Sorry for the issue. Can you report this issue on StackOverflow please?  Can you provide more details like a timestamp and correlationId/requestId so we can track down the problem?  Any further details would be appreciated - thanks!

Done. See SO question here
I think I've identified the problem but can't figure out how to fix it - see the question and sample responses - default auth token scope became very narrow and it's just "UserProfile.Read". Which explains almost everything, except - why it suddenly changed on the server-side ( I suspect some Portal or AzureAD 'defaults' were updated, which is almost a WTF...) and how to pass extra scopes to that request using the library call.

Our code works this morning; the error resolves from "Insufficient Privileges" to "Nickname is required" - the same code gives a different error this morning.
Correctly adding a Nickname now makes our code resolve.
So it could be that our issue was separate and transient (consistency of permissions? hard to say from outside) and not related to @centur

By the Nickname  you mean MailNickname property of user object ? that was always mandatory and unique. As you can see in my LinqPad sample - I'm setting it properly.  So it might be that your issue is unrelated. I've spotted the cause - Native client app scope is very narrow, I just can't find any way to workaround the problem. And MS is pretty unresponsive about that, not mentioning the lack of documentation about possible scopes...

added some extra details to SO question.
I'm trying to work on raw https level using fiddler. it's either graph.api oauth2 is broken or something is broken in admin consent flow - I granted all possible permissions to my app, can aquire token with many scopes but post to /users endpoint still gives me "insufficient privileges".

@dkershaw10 I think I narrowed the problem down to a level when I have 2 raw http requests in Fiddler -  one is to get token and one is to create user with this token, both are written according to latest GraphAPI documentation and it looks valid from Oauth2 perspective too. But fist one is working fine, and the second one is failing. You can see shadow copy of the SO thread in a Azure Talk Yammer group. There is some sensitive information that I can't put in SO question, so if you have a chance - can you take a look on it  there or ping me on alexey at shcherbak-dot-me and I can send you small sample to experiment. The current state of the problem - REST API call to Graph API endpoint to create user according to GraphAPI interactive documentation failing, even if I have these scopes in my access token :
Calendars.Read
Calendars.ReadWrite
Contacts.Read
Contacts.ReadWrite
Directory.AccessAsUser.All
Directory.Read
Directory.Write
Files.Read
Files.Read.Selected
Files.ReadWrite
Files.ReadWrite.Selected
Group.Read.All
Group.ReadWrite.All
Mail.Read
Mail.ReadWrite
Mail.Send
offline_access
openid
Sites.Read.All
Sites.ReadWrite.All
User.Read
User.Read.All
User.ReadBasic.All
User.ReadWrite
User.ReadWrite.All
user_impersonation
UserProfile.Read

There is no way to obtain Directory.ReadWrite.All scope as per current azure portal interface. As an admin I've checked in all possible permissions for all possible Microsoft applications there, including preview ones.

I'm getting this issue as well. I was actually running a .NET app as a daemon to create/update AD accounts based on our own internal DB. Now it's just broken with this insufficient permissions, and I have changed nothing.
I can also attest to the fact that it's not the MailNickname, I've been setting that properly as well, same as I was when it worked fine.
A workaround to this would be great, or better a fix.

I think no-one really interested in solving this issue. We gave up on Azure AD so far because of this showstopper and this problem not affecting us anymore. Good luck to others who relies on these "samples". Stackoverflow question is also has lack of attention so it's unclear to me what was the point to move shit from one silo to another.

Really sorry about this. I was hoping the SO posting was going to get more attention.  I'm responding there.  Let's see if we cannot resolve this issue for you.  I have some clarifying questions that should hopefully get to the bottom of this.  And again - many apologies for the unresponsiveness here.

Use the below code for getting ActiveDirectoryClient working for me, assuming you have already implemented login.
ActiveDirectoryClient  activeDirectoryClient  = AuthenticationHelper.GetActiveDirectoryClientAsApplication();
[Authorize]
public class AuthenticationHelper
{
    private static string clientId = "118473c2-7619-46e3-a8e4-6da8d5f56e12";
    private static string appKey = "hOrJ0r0TZ4GQ3obp+vk3FZ7JBVP+TX353kNo6QwNq7Q=";
    private static string aadInstance = "https://login.microsoftonline.com/";
    private static string graphResourceID = "https://graph.windows.net";

    /// <summary>
    /// Get Active Directory Client for Application.
    /// </summary>
    /// <returns>ActiveDirectoryClient for Application.</returns>
    public static ActiveDirectoryClient GetActiveDirectoryClientAsApplication()
    {

        string tenantID = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/tenantid").Value;
        string userObjectID = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;
        try
        {
            Uri servicePointUri = new Uri(graphResourceID);
            Uri serviceRoot = new Uri(servicePointUri, tenantID);
            ActiveDirectoryClient activeDirectoryClient = new ActiveDirectoryClient(serviceRoot,
                  async () => await GetTokenForApplication());

            return activeDirectoryClient;
        }
        catch (Exception)
        {
            return null;
        }
    }

    /// <summary>
    /// Get Application token
    /// </summary>
    /// <returns></returns>
    public static async Task<string> GetTokenForApplication()
    {
        string signedInUserID = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value;
        string tenantID = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/tenantid").Value;
        string userObjectID = ClaimsPrincipal.Current.FindFirst("http://schemas.microsoft.com/identity/claims/objectidentifier").Value;

        // get a token for the Graph without triggering any user interaction (from the cache, via multi-resource refresh token, etc)
        ClientCredential clientcred = new ClientCredential(clientId, appKey);
        // initialize AuthenticationContext with the token cache of the currently signed in user, as kept in the app's database
        AuthenticationContext authenticationContext = new AuthenticationContext(aadInstance + tenantID, new ADALTokenCache(signedInUserID));
        AuthenticationResult authenticationResult = await authenticationContext.AcquireTokenSilentAsync(graphResourceID, clientcred, new UserIdentifier(userObjectID, UserIdentifierType.UniqueId));
        return authenticationResult.AccessToken;
    }

}


Re-use existing ci-signing for common tools

Make the switch to start storing all build tools inside separate repo in a separate branch.
This will enable having common build tools/scripts be used across multiple repos.
Cost: 6

More info about what tools and what scripts will be consolidated.

We have azure-sdk-tools repo with CI setup


MSBuild deletes portable debugging symbols after build

When using MSBuild under Mono <IP_ADDRESS>, it deletes generated debugging symbols after copying them to the output directory. This prevents reliable debugging and can cause symbol-reliant postprocessing steps to fail
As a workaround, a postbuild copy target can be added which copies the debugging symbols again.
xbuild does not have this problem, and leaves the .pdb file in place.
An example of output by MSBuild where the symbols are deleted is available here: https://gist.github.com/Nihlus/193d91878530338d3a9e7238e594976c
The full diagnostic log for a failing project is available here: https://gist.github.com/Nihlus/278185a4ca1fb9cc43fe2ba73706f956
The source code of the failing project is available here: https://github.com/opentk/opentk
The culprit appears to be the imported target "IncrementalClean" which has a "Delete" task associated with it - see line 5428 in the diagnostic log.
--
System Info
Linux Mint 18.1 Cinnamon Edition
Mono <IP_ADDRESS> (Xamarin release via repository)
MSBuild <IP_ADDRESS>
xbuild 14.0

Looks like something's not correctly appending the output pdb path to @(FileWrites), but the target looks right. Unfortunately, that log doesn't include item manipulations that would help figure out why-- @Nihlus did is that really with /v:diag? If so, maybe Mono MSBuild isn't logging as much as it should.
@radical seen this before? I can't think of a reason why it would be different, but I know the .mdb/.pdb stuff has made symbols for Mono a bit more confusing.

@rainersigwald I reran the build and got a larger diagnostic log - I must've missed something the last time around. Here's the updated log: https://gist.github.com/Nihlus/773d9d7f0fb44048adcf0b08a5d2590a
An important thing to note is that I've done some more testing with another project which I've ported to the new csproj format (this project still uses the old one), and it does not appear to be an issue there.
Unfortunately, the projects which are having these problems cannot be ported yet for various reasons.

Ok, so the way IncrementalClean works is:

As the build goes along, collect a list of written files
Read the list of files written in the last build from FileListAbsolute.txt
Remove the current files from the written-last-time files
Delete the files that were written last time but not this time
Write the new list of files to FileListAbsolute.txt for use in the next build

Your new log shows where this is going wrong:
Task "WriteLinesToFile" (TaskId:37)
  Task Parameter:File=obj/Debug/Generator.Bind.csproj.FileListAbsolute.txt (TaskId:37)
  Task Parameter:
      Lines=
          /home/jarl/Programming/opentk/src/Generator.Bind/bin/Debug//Bind.pdb
          /home/jarl/Programming/opentk/src/Generator.Bind/bin/Debug/Bind.exe
                  OriginalItemSpec=obj/Debug/Bind.exe
          /home/jarl/Programming/opentk/src/Generator.Bind/obj/Debug/Generator.Bind.csprojResolveAssemblyReference.cache
          /home/jarl/Programming/opentk/src/Generator.Bind/obj/Debug/Generator.Bind.csproj.CoreCompileInputs.cache
          /home/jarl/Programming/opentk/src/Generator.Bind/obj/Debug/Bind.exe
          /home/jarl/Programming/opentk/src/Generator.Bind/obj/Debug/Bind.pdb (TaskId:37)
  Task Parameter:Overwrite=True (TaskId:37)
Done executing task "WriteLinesToFile". (TaskId:37)

Note that Bind.pdb is listed twice--once with a double slash. The copy with a single slash is removed as a current write, but the double-slash one isn't (it's not an identical string).
Unfortunately, I can't see why the double-slash version is getting into the file in the first place--after the first time, it's there because it was in the file last time.
@Nihlus can you share a diag log after cleaning all build outputs (including and especially **/*.FileListAbsolute.txt)?

@rainersigwald Here's the new log: https://gist.github.com/Nihlus/ee0dc9d11cd55902729d92cf3184eccf
Suddenly, it's decided to start working again. I've no idea why.

@Nihlus My guess is that you did {something} that caused the bad entry to be written to the state file, and then it persisted across builds. After cleaning it out once, things returned to normal.
That's a frustrating answer, of course. I'm going to close this bug, but if you see this again and especially if you figure out what {something} is that's causing the bad entry to get into FileListAbsolute in the first place, please let me know and we can hopefully get a more robust fix in.

I've had it happen across multiple machines and multiple branches and checkouts of different repositories, so I don't think it's a fluke. More than anything, it's a fluke that it's working now.

@rainersigwald One of my users is experiencing the same issue on Ubuntu 16.04 (ARM) and Mono 5.0.1. I had him clean the solution completely and run a diagnostic build. Here's his log.
msbuild.txt
Note that he had to fall back to the mcs compiler due to csc crashing on his machine.

@Nihlus which file got unexpectedly deleted here? The error seems to be because of a missing bin/Debug/../../../Generator.Rewrite/bin/Debug/Rewrite.exe but I don't see any other mention of this file in the log. Did you clean the workspace after that csc crash and before switching to mcs? Did you use xbuild on this too? And how did you fallback to mcs?
If the issue shows up only on a second build, then could you try to capture both the logs?

The workspace was completely cleaned before building with mcs. The mcs fallback was done through adding
<PropertyGroup>
    <CscToolExe>mcs.exe</CscToolExe>
</PropertyGroup>

to the project file. Xamarin had some suggestions about this (https://releases.xamarin.com/common-issues-from-the-xamarin-15-2-release-being-tracked-by-the-xamarin-team/) related to csc crashes. The Rewrite.exe file is not missing, but crashing due to the missing debugging symbol file. It's an external tool which uses the debugging symbols to rewrite a number of methods with optimized IL instructions, but that's not super relevant.
This issue shows up consistently on all builds for this user. In this case, it is the mdb debugging symbols generated by mcs which are not present.
We have not tried using xbuild - this is all through msbuild.

(since it is Sunday and I've got nothing better to do..)
In the build log a .pdb file is expected:
Initial Items:
[…]
_DebugSymbolsIntermediatePath
    obj/Debug/OpenTK.pdb
_DebugSymbolsOutputPath
    bin/Debug/OpenTK.pdb

but the compiler doesn't seem to generate one so _CheckForCompileOutputs sets _DebugSymbolsProduced to false:
Target "_CheckForCompileOutputs: (TargetId:50)" in file "/usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets" from project "/home/odroid/opentk/src/OpenTK/OpenTK.csproj" (target "CopyFilesToOutputDirectory" depends on it):
Added Item(s): FileWrites=obj/Debug/OpenTK.dll
Added Item(s): FileWrites=bin/Debug/OpenTK.xml
Set Property: _DebugSymbolsProduced=false

so no debug symbols are copied:
Task "Copy" skipped, due to false condition; ('$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true') was evaluated as ('false'=='true' and '' != 'true' and 'true'=='true').

@dasMulli Well, that explains that. I suppose we'll have to try and track down the csc crash and open a separate report for that instead. However, I would argue that mdb symbols should be added as possible output in order to maintain backwards compat in cases such as this. Both csc and msbuild have been an utter pain on Linux since day one where mcs and xbuild were solid as rock :(

@Nihlus set $(CscDebugFileExt)=.mdb also. This is a msbuild/mono only feature right now, fyi.


windows: Linux builds don't work on windows filesystems (via docker/WSL)

I tried to test CockroachDB and followed instructions on this link: https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker.html#os-windows

ERROR: failed to start server: could not create temp storage: could not open rocksdb instance: IO error: While fsync: a directory: Invalid argument

Log file:

I180522 20:22:08.011632 1 util/log/clog.go:1134  [config] file created at: 2018/05/22 20:22:08
I180522 20:22:08.011632 1 util/log/clog.go:1134  [config] running on machine: roach1
I180522 20:22:08.011632 1 util/log/clog.go:1134  [config] binary: CockroachDB CCL v2.0.2 (x86_64-unknown-linux-gnu, built 2018/05/21 14:55:20, go1.10)
I180522 20:22:08.011632 1 util/log/clog.go:1134  [config] arguments: [/cockroach/cockroach start --insecure]
I180522 20:22:08.011632 1 util/log/clog.go:1134  line format: [IWEF]yymmdd hh:mm:ss.uuuuuu goid file:line msg utf8=✓
W180522 20:22:08.011625 1 cli/start.go:909  RUNNING IN INSECURE MODE!

Your cluster is open for any client that can access .
Any user, even root, can log in without providing a password.
Any user, connecting as root, can read or write any data in your cluster.
There is no network encryption nor authentication, and thus no confidentiality.

Check out how to secure your cluster: https://www.cockroachlabs.com/docs/v2.0/secure-a-cluster.html
I180522 20:22:08.046850 1 server/config.go:330  available memory from cgroups (8.0 EiB) exceeds system memory 1.9 GiB, using system memory
W180522 20:22:08.066892 1 cli/start.go:812  Using the default setting for --cache (128 MiB).
A significantly larger value is usually needed for good performance.
If you have a dedicated server a reasonable setting is --cache=.25 (495 MiB).
I180522 20:22:08.067224 1 server/config.go:330  available memory from cgroups (8.0 EiB) exceeds system memory 1.9 GiB, using system memory
W180522 20:22:08.067282 1 cli/start.go:825  Using the default setting for --max-sql-memory (128 MiB).
A significantly larger value is usually needed in production.
If you have a dedicated server a reasonable setting is --max-sql-memory=.25 (495 MiB).
I180522 20:22:08.067330 1 cli/start.go:923  CockroachDB CCL v2.0.2 (x86_64-unknown-linux-gnu, built 2018/05/21 14:55:20, go1.10)
I180522 20:22:08.296553 1 server/config.go:330  available memory from cgroups (8.0 EiB) exceeds system memory 1.9 GiB, using system memory
I180522 20:22:08.296800 1 server/config.go:430  system total memory: 1.9 GiB
I180522 20:22:08.297016 1 server/config.go:432  server configuration:
max offset             500000000
cache size             128 MiB
SQL memory pool size   128 MiB
scan interval          10m0s
scan max idle time     200ms
event log enabled      true
I180522 20:22:08.297153 1 cli/start.go:789  using local environment variables: COCKROACH_CHANNEL=official-docker
I180522 20:22:08.297233 1 cli/start.go:796  process identity: uid 0 euid 0 gid 0 egid 0
I180522 20:22:08.297314 1 cli/start.go:461  starting cockroach node
I180522 20:22:08.317992 21 storage/engine/rocksdb.go:552  opening rocksdb instance at "/cockroach/cockroach-data/cockroach-temp451412792"
E180522 20:22:08.454632 1 cli/error.go:109  failed to start server: could not create temp storage: could not open rocksdb instance: IO error: While fsync: a directory: Invalid argument
Error: failed to start server: could not create temp storage: could not open rocksdb instance: IO error: While fsync: a directory: Invalid argument

Hi,
the same for me on Windows 8 with Docker 18.03.01
docker run -d --name=roach1 --hostname=roach1 --net=roachnet -p 26257:26257 -p 8080:8080 -v "D:\docker\cockroach\data1:/cockroach/cockroach-data" cockroachdb/cockroach:v2.0.2 start --insecure
report me

ERROR: failed to start server: could not create temp storage: could not open rocksdb instance: IO error: While fsync: a directory: Invalid argument

Failed running "start"

Thanks for the report, @ssmun and @quartex.
@BramGruneir, @bdarnell, based on the provided logs, do you have ideas about what's going on?

Our linux builds don't currently work very well on windows filesystems (this affects both the windows linux subsystem and docker). We recommend using the native windows binaries on windows.

Hi,
I had the same problem with Mysql with Direct_io settings that use fsync.
Using a docker-compose with all 3 nodes settings inside it and using VOLUMES instead directory remapping for storage all works on Windows 10 with last version of Docker!
I'm using a docker.compose.yaml like this
`
version: '3'
services:
roach1:
volumes:
#- D:\docker\cockroach\data1:/cockroach/cockroach-data
- data-volume1:/cockroach/cockroach-data
image: cockroachdb/cockroach:v2.0.2
command: start --insecure
ports:
- 26257:26257
- 8080:8080
networks:
- roachnet
roach2:
volumes:
#- D:\docker\cockroach\data2:/cockroach/cockroach-data
- data-volume2:/cockroach/cockroach-data
image: cockroachdb/cockroach:v2.0.2
depends_on:
- roach1
command: start --insecure --join=roach1
networks:
- roachnet
roach3:
volumes:
#- D:\docker\cockroach\data3:/cockroach/cockroach-data
- data-volume3:/cockroach/cockroach-data
image: cockroachdb/cockroach:v2.0.2
depends_on:
- roach1
command: start --insecure --join=roach1
networks:
- roachnet
networks:
roachnet:
volumes:
data-volume1:
data-volume2:
data-volume3:
`
Thank you

@quartex Wonderful!
We'll try that out and update our docs accordingly.

Circling back to answer my own question in case it helps someone else in future.
This is how I got around this issue in Kubernetes in Docker for Windows.

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: cockroachdb
spec:
  replicas: 1
  template:
    spec:
      volumes:
      - name: data
        $patch: delete
      - name: data
        emptyDir: {}
      - name: dump
        hostPath:
          path: /E/kubernetes-volumes/cockroachdb-dump
          type: DirectoryOrCreate
      initContainers:
      - name: restore-data
        image: busybox:1.29.2
        command: ['sh', '-c', 'if [ -e /cockroach/dump/data/ ]; then echo "restoring data..." && cp -rf /cockroach/dump/data/. /cockroach/cockroach-data/ && echo "data restored"; fi']
        volumeMounts:
        - name: data
          mountPath: /cockroach/cockroach-data
        - name: dump
          mountPath: /cockroach/dump
      containers:
      - name: cockroachdb
        volumeMounts:
        - name: dump
          mountPath: /cockroach/dump
        command:
        - "/bin/bash"
        - "-ecx"
        - "exec /cockroach/cockroach start --insecure --logtostderr --cache 25% --max-sql-memory 25% --http-host <IP_ADDRESS>"
        lifecycle:
          preStop:
            exec:
              command:  ['sh', '-c', 'echo "dumping data..." && cp -r /cockroach/cockroach-data/ /cockroach/dump/data-temp/ && rm -rf /cockroach/dump/data/ && mv /cockroach/dump/data-temp/ /cockroach/dump/data/ && echo "data dumped"']

The above is actually the file I use to patch the production cockroachdb.yaml with Kustomize (which is where $patch: delete comes from, which isn't valid Kubernetes config YAML). It essentially shows the changes that need to be made to a  normal cockroachdb config.
It's a little hacky, but it seems to work well. After the container has received the signal to terminate it saves CockroachDB's data to a hostPath. Before the pod starts next time an initContainer runs and restores that data to CockroachDB's data directory. I used an initContainer instead of a postStart hook because postStart runs in parallel to the container's entry command.
This gets around the issue because CockroachDB doesn't ever have to do its operations on a hostPath, yet the data is still persisted to a hostPath between pod restarts.

@rmloveland This needs to be tested and our docs need to be updated, we're leading users astray.

Also I should add that my solution above does have a problem, so there still isn't a good solution to this. The problem is that the preStop hook doesn't seem to run when shutting down Docker or Windows, which means I need to manually delete the CockroachDB pod if I want the current state persisted to disk. It's pretty annoying.

Is there a proposed workaround like a certain modification to the cockroachdb-statefulset-secure.yaml file to make this work on WIndows?

sorry for the bump. but are there any plans to fix this?

Thanks for the bump, @xambas84. I'm looking into this now. I think this issue encompasses two separate issues. I'll update again soon.

For this issue:

[ ] Remove docker and kubernetes from the install-cockroachdb-windows page and replace with suggestion that you can run a linux vm.
[ ] Figure out and document more complete instructions (exploring @quartex's docker-compose suggestion first).

Adding @rolandcrosby for PM support.

I encounter the same problem with vagrant where the crdb is in the /vagrant shared directory.

I should've passed this to you long ago, @taroface and @johnrk. The crux seems to be that running Cockroach via Docker or Kubernetes on Windows doesn't work because our linux builds don't currently work very well on windows filesystems.
I've split off a separate issue to focus on Kubernetes: https://github.com/cockroachdb/docs/issues/4333. I'm not sure that was the right approach. Feel free to collapse into one again.
@bdarnell said:

Our linux builds don't currently work very well on windows filesystems (this affects both the windows linux subsystem and docker). We recommend using the native windows binaries on windows. Or if you want to run linux on windows for some reason, create and mount a linux filesystem instead of having them write directly to your windows filesystem

@bdarnell, I'm trying to understand the implications:

Does this mean that if you want to run in either Kubernetes, Docker, or in a Linux VM on Windows, you need to install a linux filesystem (which?) and make sure volumes map to that?
A user above suggested that running in docker was working when they weren't mapping volumes directly to the host. Does that suggest another option (just for testing purposes)?

you need to install a linux filesystem (which?)

Maybe that would work, but it seems complicated, and I doubt it's going to be a great experience.

A user above suggested that running in docker was working when they weren't mapping volumes directly to the host. Does that suggest another option (just for testing purposes)?

Yes, for testing purposes (i.e. all your data goes away on restart) this would work.
We should redo some tests here - it's possible that things have gotten better (WSL 2 made a lot of improvements in compatibility but I'm not sure if it fixes the filesystem-level concerns). But assuming the old comments here are still accurate, I think we should probably tell people not to use docker or WSL on windows, and either use the native windows binaries or a full-fledged linux VM.

We have closed this issue because it is more than 3 years
old. If this issue is still relevant, please add a comment and reopen
the issue. Thank you for your contribution to CockroachDB docs!


Unit test: Tetris

Create unit tests for the following classes, assuming they're brought over from https://github.com/sparklicorn/bucket as-is or with similar functionality.

Tetris

Most of the methods worth testing are currently protected.
#36 would change them to public, allowing them to be tested easier.
So let's block this until #36 is done.


lint/vet: address several issues identified by lint/vet

Signed-off-by: Stephen J Day<EMAIL_ADDRESS>

LGTM


Support for google.api.field_behavior

This is a part of google.api set of protobufs and can be used to annotate how a field is intended to be used.

REQUIRED -> OpenAPI required
OUTPUT_ONLY -> Annotate in the description
INPUT_ONLY -> Annotate in the description
IMMUTABLE ->  Annotate in the description
UNORDERED_LIST ->  Annotate in the description, this one is weird but okay
NON_EMPTY_DEFAULT -> Annotate in the description
IDENTIFIER -> Annotate in the description

This is complete as part of v0.13.0


qa_crowbarsetup: make net_sdn configurable

In some setups it is not enough to rely on the default IP ranges
for the SDN. This change allows to configure the SDN.

Just tested this on one of our nodes and it works as expected.

gating job fails in testsetup - seems unrelated


Issues with cluster on Hetzner cloud - Pods stuck in "creating container"

Hi together
First: Thank you for this nice hobby-kube!!! :-)
I build one on 3 hetzner cloud vm's today. (two times, first on ubuntu 18.04 then on ubuntu 16.04)
I used this guide https://github.com/hobby-kube/guide to build it manually.
If I deploy something it hangs on "ContainerCreating" and after some time I can see the error message:
Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/76e1d121d2aedd44c3652fd285428241770a7ae2c46dc26bab853c05a025c84b: dial tcp <IP_ADDRESS>:6784: connect: connection refused
Maybe I did something wrong or is there something missing in the guide?
Any help is much appreciated.
Some output... hope it helps:
root@kube01 ~/deployments # kubectl get nodes
NAME      STATUS    ROLES     AGE       VERSION
kube01    Ready     master    33m       v1.10.2
kube02    Ready     <none>    29m       v1.10.2
kube03    Ready     <none>    29m       v1.10.2

root@kube01 ~/deployments # kubectl get pods --all-namespaces
NAMESPACE     NAME                                    READY     STATUS              RESTARTS   AGE
kube-system   kube-apiserver-kube01                   1/1       Running             0          32m
kube-system   kube-controller-manager-kube01          1/1       Running             0          33m
kube-system   kube-dns-86f4d74b45-r9sbg               3/3       Running             0          33m
kube-system   kube-proxy-4cg67                        1/1       Running             0          30m
kube-system   kube-proxy-m7nmc                        1/1       Running             0          33m
kube-system   kube-proxy-xc729                        1/1       Running             0          30m
kube-system   kube-scheduler-kube01                   1/1       Running             0          33m
kube-system   kubernetes-dashboard-7f87cb5646-6qfp7   0/1       ContainerCreating   0          26m
kube-system   weave-net-kkbvj                         2/2       Running             0          6m
kube-system   weave-net-p2q5s                         2/2       Running             0          6m
kube-system   weave-net-sw7tz                         2/2       Running             0          6m

root@kube01 ~/deployments # kubectl describe pod -n kube-system kubernetes-dashboard-7f87cb5646-6qfp7
Name:           kubernetes-dashboard-7f87cb5646-6qfp7
Namespace:      kube-system
Node:           kube03/<IP_ADDRESS>
Start Time:     Tue, 08 May 2018 22:17:29 +0200
Labels:         app=kubernetes-dashboard
                pod-template-hash=3943761202
Annotations:    <none>
Status:         Pending
IP:
Controlled By:  ReplicaSet/kubernetes-dashboard-7f87cb5646
Containers:
  kubernetes-dashboard:
    Container ID:
    Image:          gcr.io/google_containers/kubernetes-dashboard-amd64:v1.8.3
    Image ID:
    Port:           9090/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Liveness:       http-get http://:9090/ delay=30s timeout=30s period=10s #success=1 #failure=3
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-lvlj7 (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          False
  PodScheduled   True
Volumes:
  default-token-lvlj7:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-lvlj7
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node-role.kubernetes.io/master:NoSchedule
                 node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                  Age                From               Message
  ----     ------                  ----               ----               -------
  Normal   SuccessfulMountVolume   27m                kubelet, kube03    MountVolume.SetUp succeeded for volume "default-token-lvlj7"
  Normal   Scheduled               27m                default-scheduler  Successfully assigned kubernetes-dashboard-7f87cb5646-6qfp7 to kube03
  Warning  FailedCreatePodSandBox  19m (x2 over 23m)  kubelet, kube03    Failed create pod sandbox: rpc error: code = DeadlineExceeded desc = context deadline exceeded
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/889d732df3746c0516c9d8616b5b96046911b0ee6593ec21db5f3121f3a26046: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/571392aa28b5a762e58043bb2b6e3e3683c9a5336a76112c2cd75eeab1ef7564: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/9544ecb695bdd48ce0b4f580d44514c38ab1209f42c64fbb19266d40a49f7579: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/183eba1061d3a3547c23dec81814650c419a04a4b1d52a2dab8c0e27c823eb1e: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/f12e5320b522996ed4937ad3ec64e255fe53125a61941e28541110bdb070bf68: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/208a57ca1209b449b577d7244078a27f8235f776fdc4e42cb770cc3dfb93f427: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/c87965c136f9c033e716234c6f658e0350cbfaa24f3541399eec300e800ad062: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  15m                kubelet, kube03    Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "kubernetes-dashboard-7f87cb5646-6qfp7_kube-system" network: unable to allocate IP address: Post http://<IP_ADDRESS>:6784/ip/76e1d121d2aedd44c3652fd285428241770a7ae2c46dc26bab853c05a025c84b: dial tcp <IP_ADDRESS>:6784: connect: connection refused
  Warning  FailedCreatePodSandBox  11m (x4 over 15m)  kubelet, kube03    (combined from similar events): Failed create pod sandbox: rpc error: code = DeadlineExceeded desc = context deadline exceeded
  Normal   SandboxChanged          7m (x28 over 23m)  kubelet, kube03    Pod sandbox changed, it will be killed and re-created.

Some additional info:
root@kube01 ~ # ping -c 2 <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.673 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.667 ms

--- <IP_ADDRESS> ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.667/0.670/0.673/0.003 ms
root@kube01 ~ # ping -c 2 <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.770 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.701 ms

--- <IP_ADDRESS> ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.701/0.735/0.770/0.043 ms

root@kube01 ~ # netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
<IP_ADDRESS>         <IP_ADDRESS>      <IP_ADDRESS>         UG        0 0          0 eth0
<IP_ADDRESS>        <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 wg0
<IP_ADDRESS>        <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 wg0
<IP_ADDRESS>       <IP_ADDRESS>         <IP_ADDRESS>     U         0 0          0 weave
<IP_ADDRESS>       <IP_ADDRESS>         <IP_ADDRESS>     U         0 0          0 wg0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U         0 0          0 docker0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 eth0

root@kube02 ~ # ping -c 2 <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from <IP_ADDRESS>: icmp_seq=1 ttl=64 time=0.817 ms
64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=64 time=0.775 ms

--- <IP_ADDRESS> ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.775/0.796/0.817/0.021 ms

root@kube02 ~ # netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
<IP_ADDRESS>         <IP_ADDRESS>      <IP_ADDRESS>         UG        0 0          0 eth0
<IP_ADDRESS>        <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 wg0
<IP_ADDRESS>        <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 wg0
<IP_ADDRESS>       <IP_ADDRESS>         <IP_ADDRESS>     U         0 0          0 wg0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS>     U         0 0          0 docker0
<IP_ADDRESS>      <IP_ADDRESS>         <IP_ADDRESS> UH        0 0          0 eth0

weave-net agent doesn't seem to run on kube02, at least the route was not added.
$ kubectl -n kube-system get pods -o wide
NAME                                    READY     STATUS    RESTARTS   AGE       IP           NODE
kube-apiserver-kube1                    1/1       Running   6          41d       <IP_ADDRESS>     kube1
kube-controller-manager-kube1           1/1       Running   1          41d       <IP_ADDRESS>     kube1
kube-dns-86f4d74b45-5cl7j               3/3       Running   3          41d       <IP_ADDRESS>    kube1
kube-proxy-cjzzl                        1/1       Running   3          41d       <IP_ADDRESS>     kube3
kube-proxy-pz4qb                        1/1       Running   1          41d       <IP_ADDRESS>     kube1
kube-proxy-tfhct                        1/1       Running   1          41d       <IP_ADDRESS>     kube2
kube-scheduler-kube1                    1/1       Running   1          41d       <IP_ADDRESS>     kube1
weave-net-qcxlk                         2/2       Running   9          41d       <IP_ADDRESS>     kube3
weave-net-w7z68                         2/2       Running   3          41d       <IP_ADDRESS>     kube1
weave-net-w9tfj                         2/2       Running   4          41d       <IP_ADDRESS>     kube2

Okay.. I installed a new cluster today.
Have the same behavior. If I disable the firewall with "ufw default allow incoming && ufw reload" it works.
So there must be a missing rule :( Unfortunately I don't know which one :P

One more strange thing...
root@kube01:~/kubeconf# kubectl -n kube-system get pods -o wide
NAME                             READY     STATUS    RESTARTS   AGE       IP               NODE
kube-apiserver-kube01            1/1       Running   0          27m       46.101.xxx.xx3   kube01
kube-controller-manager-kube01   1/1       Running   0          27m       46.101.xxx.xx3   kube01
kube-dns-86f4d74b45-z4z9k        3/3       Running   0          28m       <IP_ADDRESS>        kube01
kube-proxy-828xk                 1/1       Running   0          24m       46.101.xxx.xx0    kube02
kube-proxy-fgxxs                 1/1       Running   0          24m       167.99.xxx,xx9    kube03
kube-proxy-rj22s                 1/1       Running   0          28m       46.101.xxx.xx3   kube01
kube-scheduler-kube01            1/1       Running   0          27m       46.101.xxx.xx3   kube01
weave-net-2qrk5                  2/2       Running   0          24m       167.99.xxx,xx9    kube03
weave-net-vt79f                  2/2       Running   0          24m       46.101.xxx.xx0    kube02
weave-net-z7br4                  2/2       Running   0          26m       46.101.xxx.xx3   kube01

On your example you can see the private IPs of your hosts. On my cluster there are the public one :/ Why this happen?
# /tmp/master-configuration.yml
apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
  advertiseAddress: <IP_ADDRESS>
apiServerExtraArgs:
  service-node-port-range: 7000-20000
etcd:
  endpoints:
  - http://<IP_ADDRESS>:2379
  - http://<IP_ADDRESS>:2379
  - http://<IP_ADDRESS>:2379
apiServerCertSANs:
  - 46.101.xxx.xx3

This is strange indeed. I‘ve never run into this problem before. Did you try provisioning using Terraform?

I was running into the same problem before, the solution to me was to add the --node-ip flag to the kubelet service configuration (/etc/systemd/system/kubelet.service.d/10-kubeadm.conf).
You need to add the following line to the 10-kubeadm.conf and change the address to the specific wireguard address on each host. After that restart the kubelet service:
Environment="KUBELET_EXTRA_ARGS=--node-ip=<wireguard address>"

Full Example:
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=<IP_ADDRESS> --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
Environment="KUBELET_EXTRA_ARGS=--node-ip=<wireguard address>"
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS

@kgierke works perfect for me too! :D Thank you!
So... the only thing for me is to get traefik deamonset running with LE certs ;)


Add an annotation that indicates a parameter must be used

We just discovered a bug in a recent change caused by forgetting to use a parameter: https://github.com/google/closure-compiler/pull/2740#pullrequestreview-83026869
It would be great if we could annotate the value parameter as @MustBeUsed on the abstract apply method and then ErrorProne would disallow anyone from overriding that method without using value somewhere in the body.

There's a related issue for Android's lint (https://issuetracker.google.com/issues/62839223) which is based off of a similar problem. The key thing to note from that issue is that you need to do control flow analysis to ensure that every branch uses the argument.


Splat support

[x] Enable outputting a yaml chunk with the found functions. Probably a module? Will need to remember the sizes of files to fill in the in-between chunks.
[x] Output symbols to splat's function and data formats.

This is effectively done, apart from possibly improving stuff like types, so I'm going to close.


Recovering from Error

I'm trying to write some methods that are checking if a card (in my case NTAG-21x) needs authentication or not.
So far what I'm doing is reading 4 Bytes from Page 4 and if it fails, it means that I need to authenticate.
The problem occurs that the error thrown during that reading failure is preventing me from doing anything meaningful until I disconnect and reconnect the card.
Here some code:
try {
	let data = await this.reader.read(4, 4);
	return true;
} catch (err) {
	console.log("Cannot read, so we must authenticate!");
}

try {
	// if first try block is commented out, this block here works just fine!!!
	console.log("This fails, even though this area is not password protected");
	let data2 = await this.reader.read(0, 4);
} catch (err) {
	console.log("I will always be thrown, no matter what... WHY?", err);
}

Errors looks somewhat like this:
first try/catch:
ERR-0: { ReadError: Read operation failed: Status code: 0x6300
at /home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:503:11
at Generator.next (<anonymous>)
at step (/home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:18:191)
at /home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:18:361
at <anonymous> name: 'ReadError', code: 'operation_failed' }

second try/catch:
ERR-1: { ReadError: Read operation failed: Status code: 0x6300
at /home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:503:11
at Generator.next (<anonymous>)
at step (/home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:18:191)
at /home/yoga/node/backend/node_modules/nfc-pcsc/dist/Reader.js:18:361
at <anonymous> name: 'ReadError', code: 'operation_failed' }

Is there a way to reset the state without disconnecting the card?
... or is my authentication approach simply inefficient?

Hi @bierlair,
Sorry for the late response. I've been quite busy.
I'll take a look at it this afternoon. I'll test it with my card.
I'll let you know what I figure out. 🙂


Site suggestion

Submitter: Lindsay Johnson
I'm reaching out on behalf of Flatiron School, WeWork's coding, data science and UX/UI bootcamp. We recently launched our UX/UI program in Austin and are running free, weekly workshops, events, and meetups for those interested in learning more about UX/UI design. We'd love to be included in your great list of resources here in Austin.
Meetup link: https://www.meetup.com/Flatiron-School-Austin-Coding-Community/
Please let me know if I can provide additional information.
Thank you!
Lindsay

in the April 11 2020 update


[Event Request] Codeunit 90 - Purchase-Post - OnBeforeCheckPrepaymentAmount

We need a new subscriber OnBeforeCheckPrepmtAmtToDeduct in function CreatePrepmtLines in Codeunit 90:
                repeat
                    if CompleteFunctionality then
                        if PurchHeader."Document Type" <> PurchHeader."Document Type"::Invoice then begin
                            if not PurchHeader.Receive and ("Qty. to Invoice" = Quantity - "Quantity Invoiced") then
                                if "Qty. Rcd. Not Invoiced" < "Qty. to Invoice" then
                                    Validate("Qty. to Invoice", "Qty. Rcd. Not Invoiced");
                            Fraction := ("Qty. to Invoice" + "Quantity Invoiced") / Quantity;

                            **OnBeforeCheckPrepaymentAmount(SalesHeader, TempPrepmtSalesLine, SkipPrepaymentAmountCheck);
                            if not SkipPrepaymentAmountCheck then**
                              if "Prepayment %" <> 100 then

New event:
    [Integration]
    LOCAL PROCEDURE OnBeforeCheckPrepaymentAmount@72000(SalesHeader@72000 : Record 36;VAR TempPrepmtSalesLine@72001 : TEMPORARY Record 37;VAR SkipPrepaymentAmountCheck@72002 : Boolean);
    BEGIN
    END;

This solution would solve our requirement, but a better solution might be to do it the way it is done in codeunit 80 (Sales-Post). Here the code starting with "if "Prepayment %" <> 100 then" has been refactored into a new function CheckPrepmtAmtToDeduct, which has an handle event, which also would solve our issue.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 42698.


Fix: Resolve Argument Count Mismatch Error in generateMetadata Function Usage

Hi svobik7, thanks for this awesome package.
Encountered an issue with generateMetadata function when trying to localize the metadata for different pages and layouts. During the build process, TypeScript throws an error due to an unexpected argument being passed to generateMetadataOrigin function.
Error:
 ✓ Compiled successfully
   Linting and checking validity of types  .Failed to compile.

./app/(routes)/(en)/get-started/page.tsx:14:33
Type error: Expected 0 arguments, but got 1.

  12 |
  13 | export async function generateMetadata(props:any) {
> 14 |   return generateMetadataOrigin({ ...props, pageHref: "/get-started" })
     |                                 ^
  15 | }
  16 |
error Command failed with exit code 1.

Added // @ts-ignore above generateMetadataOrigin to prevent this error being fired. If I'm not mistaken is the same way is/was fixed in the export of the LayoutOrigin and PageOrigin components, not sure if it's still necessary there, just removed the ts-ignore and it didn't complain but didn't want to modify it since haven't fully checked all the code and might be something I'm missing.
{/* @ts-ignore */}
return generateMetadataOrigin({ ...props, pageHref: "/get-started" })

Let me know if there's any better way to solve it. Thanks in advance.

Hi @salahzsh could you please share your page root (origin) for mentioned get-started page?

Here are the page.tsx and i18n.ts files
import OnboardingSection from "@/components/sections/OnboardingSection";
import NavBar from "@/components/sections/NavBar";
import { Metadata } from "next";
import { setStaticParamsLocale } from "next-international/server";
import router from "@/lib/roots-router";
import { PageProps } from "next-roots";
import { getI18n } from "@/translations";

export async function generateMetadata() {
  const t = await getI18n()
  return {
    title: t("metadata.getStarted.title"),
    description: t("metadata.getStarted.description"),
  } satisfies Metadata
}

export default function GetStartedPage(_props: any) {
  const props = _props as PageProps
  setStaticParamsLocale(router.getLocaleFromHref(props.pageHref))
  return (
    <>
      <NavBar disableMenu />
      <main className="relative">
        <OnboardingSection />
      </main>
    </>
  );
}

app/_roots/get-started/i18n.ts
module.exports.routeNames = [
    { locale: 'es', path: 'inicia-proyecto' },
    // you don't need to specify default translation as long as it match the route folder name
    // { locale: 'en', path: 'about' },
]

IMO the problem is that you have generateMetadata() function defined without any param. To satisfy TS without adding @ts-ignore directive you can add param like here https://github.com/svobik7/next-roots/blob/master/examples/basic/src/routes/page.tsx
Or if you do not need it just use
generateMetadata(_: GeneratePageMetadataProps<void>)

That error disappeared but then another one appeared:
.next/types/app/_roots/get-started/page.ts:32:15
Type error: Type 'OmitWithTag<GeneratePageMetadataProps<void>, keyof PageProps, "generateMetadata">' does not satisfy the constraint '{ [x: string]: never; }'.
  Property 'pageHref' is incompatible with index signature.
    Type 'string' is not assignable to type 'never'.

  30 | // Check the arguments and return type of the generateMetadata function
  31 | if ('generateMetadata' in entry) {
> 32 |   checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
     |               ^
  33 |   checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
  34 | }
  35 |
error Command failed with exit code 1.

When setting the type to any it builds successfully.
Since I think I might need the locale in the generateMetadata to setStaticParamsLocale (not sure, still figuring out how to use properly next-international with next roots) I think I might just set the parameter as any and then cast it to the correct type inside the function to keep moving.
Let me know if there's any better solution or if you want me to try anything or share a reproduction repo.
Thanks in advance

BTW you cab omit these nextjs types checks completely by moving your _roots folder outside app folder.

Thanks for your answer, that change in the param type ended up fixing the error but other ts errors appeared also complaining about types but in another place and also not consistently so depends on the page adding generateMetadata(_: GeneratePageMetadataProps<void>) solves the issue and in other pages I have to set it to generateMetadata(_: any)
Example of one of the errors:
Type error: Type 'OmitWithTag<GeneratePageMetadataProps<void>, keyof PageProps, "generateMetadata">' does not satisfy the constraint '{ [x: string]: never; }'.
  Property 'pageHref' is incompatible with index signature.
    Type 'string' is not assignable to type 'never'.

  30 | // Check the arguments and return type of the generateMetadata function
  31 | if ('generateMetadata' in entry) {
> 32 |   checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
     |               ^
  33 |   checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
  34 | }

Couldn't find an answer to when it works and when it doesn't since moving around pages sometimes works with the GeneratePageMetadataProps and another times I have to use any. I can create a reproduction repo if you want but moving the _roots folder outside app make it work.
The previous README.md was suggesting to keep the roots folder inside app to allow RSC support but I just saw you updated the README.md and looks like it shouldn't be any problem.
I will proceed to close the PR
Thanks for your time!


Plan publicity to investors for Ines' loan

@wimanesti
For your 60,000 Dai loan, we need to plan for you to meet with and approach investors.
While crowdfunding is an effective way to build initial buzz, many of the initial lenders will only contribute small amounts (i.e. 7 Dai to 100 Dai). It is possible that the majority of your loan will be funded by larger investors or high net worth individuals.
I can provide you a list (offline) of these people, but you will ultimately need to represent yourself in front of these investors. I'd like you to take charge and drive this forward.

@wimanesti This might be something you want to crowdsource suggestions for, from the user interview participants


One Light theme in Compact mode problem

I use One Light theme in Compact mode and i notice that icons and labels are misaligned

Please test with the v1.1.0 version of the package to see if that fixes things.

Now it works.
Tested with v1.2.0


Add the missing includeBlank option

includeBlank is used in select.js control but isn't passed from the template.

@homu r+

:pushpin: Commit 0464f8d has been approved by martndemus

:zap: Test exempted - status


[W3C] Encountered internal error running command: Error: An unknown server-side error occurred while processing the command. Original error: 'GET /status' cannot be proxied to Mac2 Driver server because its process is not running (probably crashed). Check the Appium log for more details

While running the Selenium project using Mac 2 Driver, I am getting the mentioned Error.
Xcode Version-13.2.1
Appium-Server Logs:
Mac2Driver-Appium-Logs.txt
Eclipse exception
Mac2Driver-Eclipse-Exception.txt

[WD Proxy] Matched '/status' to command name 'getStatus'
[WD Proxy] Proxying [GET /status] to [GET http://<IP_ADDRESS>:10100/status] with no body
[WebDriverAgentMac] [xcodebuild] xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
[WD Proxy] connect ECONNREFUSED <IP_ADDRESS>:10100
[WebDriverAgentMac] Mac2Driver host process has exited with code 1, signal null

Did you install Xcode CLI environment? (I guess when you launch Xcode, the CLI env installation also starts to install)

I have Installed CLI Tools, Still getting the same issue
Uploading Mac2Driver_AppiumLogs_After_Downloading_CLITools.txt…

What's the result of xcode-select?
Possibly you should set xcode as /Applications/Xcode.app/Contents/Developer. If not, I guess Apple changed the Xcode path(?)

xcode is in the Application section only, but How can I set the Xcode /Applications/Xcode.app/Contents/Developer location?

Did you run xcode-select?
It prints helps, -p and -s. You can print current Xcode path as CLI and set it.

After setting the path of the xcode in the preffered location (/Applications/Xcode.app/Contents/Developer), the issue got resolved, now it is working fine.
Thank you so much Sir !!!!!


"Failed to fetch" error

Thank you for your interesting work! I have filled in the form to sign the license. However, it gave the error "Failed to fetch". Can you help me look into the problem?

Thank you so much!

I have the same problem. Can anyone fix this error?

Same here, when trying to submit information as individual.

I also have the same problem.

I still have the problem, can you help us? @miguelmartin75 @devanshk

can anyone help us?

can anyone help us?

waited a bit and tried again at a different time, and it worked

waited a bit and tried again at a different time, and it worked

It's still not working for me.

can anyone help us?

waited a bit and tried again at a different time, and it worked

But even signed on dropbox, I haven't received the access key yet...

Closing this issue for now. Please feel free to re-open it if the problem persists. Thank you!


The file "export_fbin_from_npy.py" can not deal with that dataset（laion-10M）

ValueError: cannot reshape array of size 24350 into shape (1000448,512)

network error, this works well!


run make rundev :> ./run.sh: line 24: gnatsd: command not found

BUG REPORT
if found ./run.sh: line 24: gnatsd: command not found ,
https://github.com/nats-io/nats-server.git
i search in websit . the gnatsd has change to nats-server ?
need you to change cmd to nats-server

i build in centos 7.5 can not found gnatsd .please help me

i build in centos 7.5 can not found gnatsd .please help me

Looks like NATS recently renamed gnatsd -> nats-server. You can try to following this: https://docs.nats.io/nats-server/installation#installing-via-a-package-manager and if you succeed fixing the issue we would appreciate a PR!

Looks like NATS recently renamed gnatsd -> nats-server. You can try to following this: https://docs.nats.io/nats-server/installation#installing-via-a-package-manager and if you succeed fixing the issue we would appreciate a PR!

ok  i will reinstall it .

ok  i will reinstall it .

go rundev  need install more things . i use it with docker .can be right .

go rundev  need install more things . i use it with docker .can be right .

To run make rundev you first need to install all dependencies natively. You will also need to build Mainflux services locally.
If you are trying do deploy mainflux with docker use the command make run (docker-compose -f docker/docker-compose up). That way you will pull docker images of any dependency or mainflux service from Dockerhub.

To run make rundev you first need to install all dependencies natively. You will also need to build Mainflux services locally.
If you are trying do deploy mainflux with docker use the command make run (docker-compose -f docker/docker-compose up). That way you will pull docker images of any dependency or mainflux service from Dockerhub.

OK， done docker is  better，Save a lot of trouble

OK， done docker is  better，Save a lot of trouble


Make "too many arguments to..." ("too few") syntax error more specific

Make special cases for def, if, what else?

This is valid:
(def a "hi" 0)

This is not:
babel.middleware=> (def a 8 0)
Too many arguments to def.

Also has an error on special forms like throw:
babel.middleware=> (throw 3 4)
Too many arguments to throw,.

The actual message is:
:message "Too many arguments to throw, throw expects a single Throwable instance"

This now corresponds to https://github.com/Clojure-Intro-Course/babel/issues/36 in the migration repository.


recurrent state

Hi, i noticed that recurrent state keys and values are derived from self.init_state rather than previous recurrent state. In this case, the keys and value embedding layers, along with the projection and MLP layers for horizontal attention will not be trained? I am not sure if this is the intended behavior as I could not find any details regarding this in the paper.

I tried checking the recurrent layers to see if it is trained, for example the projection/mlp layers and it is not. After changing the key and values to orig_state, then it trains. The code shows that the keys and values are always using self.init_state, which is hard coded in, instead of referring to orig_states.

state_q, state_k, state_v = (self.state_to_q(self.init_state), *self.state_to_kv(self.init_state).chunk(2, dim = -1))


Memory used is constantly increasing when playing podcasts

We noticed this issue on our application but also in the example in GitHub.  Trying to play "Swift by Sundell" podcast and then again "Swift by Sundell" the memory used is constantly increasing.  It seems that the allocated memory (200MB for this audio item) is not released.  This behaviour does not affect live streaming audio like radio stations.

Unfortunately this is a known issue, and I've been trying to find a way around this but with no luck so far.
Keep in mind that the memory is it released once the podcast stops playing, do not trust the Xcode's memory graph on the left pane. If you Profile the app, use the Instruments app to check the memory, you will see that while the memory does increase it goes away after you stopped the audio or play another audio file.
Some more context:
RemoteAudioSource uses OperationQueue to "store" the audio packets and sends those when requested by the player. This causes the memory to increase since it temporary stores those data in memory. I tried multiple things to try and resolve this but it was always the same outcome.
The original library uses the deprecated (since iOS 9!) CFReadStreamCreateForHTTPRequest which doesn't have this issue but there's hasn't been a direct replacement for this API.

Observing the allocations in the instruments app we do not see any releases.  Memory is increasing constantly even if we stop the podcast and play a radio stream.  Do we monitor wrong data?
Our main concern is if this issue will prevent the app to successfully pass the Apple evaluation.  Are there any other apps that use this library and manage to be on the Apple store?

@stefanospapa Hmm, it seems you're right.
Can you try out this branch and see if this fixes the leak issue?
https://github.com/dimitris-c/AudioStreaming/tree/bug/remoteaudiosource-memory-leak-fix
If you could test it the seek functionality as well and report that everything is working as expected I would appreciate it and make a release.

We tested your fix in the example application and in our application.  It seems OK.  Seek operation works normally.
You may proceed with the release.  Thanks a lot for the support.

Release is out - https://github.com/dimitris-c/AudioStreaming/releases/tag/0.7.0
Thanks for identifying and QA'ing this issue

During some additional tests we spotted another sub issue of this problem.  When we play a podcast like "Swift by Sundell" and pause the player, and then we play a radio station, memory is not released.  We have to stop the podcast playing in order to let memory be released.
Is there any way to "clear" the player before starting a new playing session?  Or any other solution?

Oh that's a good catch — will make a PR a bit later @stefanospapa

This should be fixed now — Update version to 0.8.0 as well, let me know if this fixes the issue


InstallLdconfigLinks appears to be a no-op

We call ldconfig(fsys, "/lib"): https://github.com/chainguard-dev/apko/blob/e6788cf5bbf7a075e21a2a69477c96999df4dd30/pkg/build/ldconfig.go#L105
Which means at this point, libdir will be "/lib": https://github.com/chainguard-dev/apko/blob/e6788cf5bbf7a075e21a2a69477c96999df4dd30/pkg/build/ldconfig.go#L51-L53
Which means we always hit that continue.
The only places that actually modify the links map come after that continue:
https://github.com/chainguard-dev/apko/blob/e6788cf5bbf7a075e21a2a69477c96999df4dd30/pkg/build/ldconfig.go#L61
https://github.com/chainguard-dev/apko/blob/e6788cf5bbf7a075e21a2a69477c96999df4dd30/pkg/build/ldconfig.go#L75
So we always return an empty map, which means InstallLdconfigLinks iterates over an empty map and does nothing: https://github.com/chainguard-dev/apko/blob/e6788cf5bbf7a075e21a2a69477c96999df4dd30/pkg/build/ldconfig.go#L105-L118
Is that intentional?

I honestly do not know. I remember now going through this, and basically implementing what is in https://git.alpinelinux.org/aports/tree/main/musl/ldconfig . But does that change anything?

I think I understand this now, let me summarize for a future version of myself:
This exists to workaround lack of postinstall scripts (as does InstallBusyboxLinks, FWIW).
Looking at the scripts.tar in our favorite image, at the glibc-2.37-r6.Q1WTZZn8DDEiZzGig4nWfTgHYB9RE=.trigger file:
crane blob cgr.dev/chainguard/ko@sha256:fdd2d5343f9653720379ca6026fee59a7a896fef517de151de7413e1c6e85b5b \
  | tar -Oxz lib/apk/db/scripts.tar \
  | tar -Ox glibc-2.37-r6.Q1WTZZn8DDEiZzGig4nWfTgHYB9RE=.trigger

We get:
#!/bin/busybox sh
/sbin/ldconfig

The ldconfig impl:
#!/bin/sh
scan_dirs() {
	scanelf -qS "$@" | while read SONAME FILE; do
		TARGET="${FILE##*/}"
		LINK="${FILE%/*}/$SONAME"
		case "$FILE" in
		/lib/*|/usr/lib/*|/usr/local/lib/*) ;;
		*) [ -h "$LINK" -o ! -e "$LINK" ] && ln -sf "$TARGET" "$LINK"
		esac
	done
	return 0
}
# eat ldconfig options
while getopts "nNvXvf:C:r:" opt; do
	:
done
shift $(( $OPTIND - 1 ))
[ $# -gt 0 ] && scan_dirs "$@"

This calls scan_dirs, which callsscanelf --quiet --soname "$@". We pass no arguments, so what does scanelf do with no arguments?
Per https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities#Using_scanelf_for_text_relocations

The following example will search library paths recursively, without leaving the mounted file system and ignoring symbolic links, for any ELF binary containing a text relocation:
root #scanelf -lqtmyR

So we are only looking in /lib, which means this is a no-op, but the equivalent of /sbin/ldconfig would be looking at every file in the filesystem, not just /lib, so I think this is a bug in apko.
Do we care? Is there an easy way to confirm that these links are missing?
Perhaps because wolfi doesn't rely on this behavior, we don't see it, but this could be broken for apko when used with other APKs?

musl does not care at all about ldconfig.  I think we can delete this functionality.

But don't we use glibc?


Issue #7 configure ci

Resolves #7
Probably you'll want to remove env section, as env variables may be specified in travis UI.
Node versions selected as a minimal allowed by restrictions (7.6.0), the last patch (7.6.x) and the last minor (7).
Badge added to readme.
Please, notice, build task is run even test task fails (may be useful for diagnostics). If the opposite is needed please inform.

:star:


Can not disable "SEND_LOGIN_EMAILS"

I was curious what "#SEND_LOGIN_EMAILS" did.  So I uncommented it and set to "True".  It send me a login email every time someone logged in (who could know?)
I did not like this so I set this to "False" and I re-started the server like this:
zulip@zulip:~/deployments/current/scripts$ ./restart-server
The emails continued to come.
Then I commented out the line and re-started again and still I get the emails.
First question: what is the correct way to disable this option?  Maybe I just did it wrong?

@stone212 I think you did something wrong in setting it to False or didn't successfully restart the server after turning it off; the function that calls this starts with:
    if not settings.SEND_LOGIN_EMAILS:
        return

Can you post the exact content of the settings.py line you tried?

The default value for that setting is True, so my guess is that you have a typo or something in your attempt to set it explicitly to False.

@timabbott
I am receiving all of the login email messages and my /etc/zulip/settings.py file has this:
169 # Controls whether Zulip sends "new login" email notifications.
170 #SEND_LOGIN_EMAILS = False

I have tried it with the line un-commented with no change.  After all changes I do this:
root@zulip:~# su zulip
zulip@zulip:/root$ cd
zulip@zulip:~$ ls
deployments  logs  prod-static  scripts  tornado  uploads
zulip@zulip:~$ cd deployments/
2018-11-12-02-04-02/ current/             next/
2018-12-11-04-13-20/ last/
zulip@zulip:~$ cd deployments/current/scripts/
zulip@zulip:~/deployments/current/scripts$ ./restart-server
2018-12-14 05:39:32,733 restart-server: Filling memcached caches
2018-12-14 05:39:35.433 INFO [] Successfully populated huddle cache!  Consumed 1 remote cache queries (0.01 time)
2018-12-14 05:39:35.555 INFO [] Successfully populated stream cache!  Consumed 1 remote cache queries (0.07 time)
2018-12-14 05:39:35.648 INFO [] Successfully populated user cache!  Consumed 1 remote cache queries (0.06 time)
2018-12-14 05:39:35.685 INFO [] Successfully populated session cache!  Consumed 1 remote cache queries (0.01 time)
2018-12-14 05:39:35.688 INFO [] Successfully populated client cache!  Consumed 1 remote cache queries (0.0 time)
2018-12-14 05:39:35.791 INFO [] Successfully populated recipient cache!  Consumed 1 remote cache queries (0.09 time)
zulip-tornado: stopped
zulip-tornado: started
2018-12-14 05:39:38,752 restart-server: Stopping workers
zulip-workers:zulip_deliver_enqueued_emails: stopped
zulip-workers:zulip_deliver_scheduled_messages: stopped
zulip-workers:zulip_events_missedmessage_mobile_notifications: stopped
zulip-workers:zulip_events_user_presence: stopped
zulip-workers:zulip_events_deferred_work: stopped
zulip-workers:zulip_events_missedmessage_emails: stopped
zulip-workers:zulip_events_email_senders: stopped
zulip-workers:zulip_events_outgoing_webhooks: stopped
zulip-workers:zulip_events_email_mirror: stopped
zulip-workers:zulip_events_missedmessage_email_senders: stopped
zulip-workers:zulip_events_embed_links: stopped
zulip-workers:zulip_events_feedback_messages: stopped
zulip-workers:zulip_events_invites: stopped
zulip-workers:zulip_events_user_activity_interval: stopped
zulip-workers:zulip_events_user_activity: stopped
zulip-workers:zulip_events_error_reports: stopped
zulip-workers:zulip_events_embedded_bots: stopped
zulip-workers:zulip_events_digest_emails: stopped
zulip-workers:zulip_events_slow_queries: stopped
zulip-workers:zulip_events_signups: stopped
2018-12-14 05:39:41,741 restart-server: Stopping server core
zulip-django: stopped
zulip-senders:zulip_events_message_sender-1: stopped
zulip-senders:zulip_events_message_sender-3: stopped
zulip-senders:zulip_events_message_sender-0: stopped
zulip-senders:zulip_events_message_sender-2: stopped
zulip-thumbor: stopped
2018-12-14 05:39:46,687 restart-server: Starting server core
zulip-django: started
zulip-senders:zulip_events_message_sender-0: started
zulip-senders:zulip_events_message_sender-1: started
zulip-senders:zulip_events_message_sender-2: started
zulip-senders:zulip_events_message_sender-3: started
zulip-thumbor: started
2018-12-14 05:39:50,067 restart-server: Starting workers
zulip-workers:zulip_events_feedback_messages: started
zulip-workers:zulip_events_slow_queries: started
zulip-workers:zulip_events_user_presence: started
zulip-workers:zulip_events_invites: started
zulip-workers:zulip_events_outgoing_webhooks: started
zulip-workers:zulip_events_signups: started
zulip-workers:zulip_events_embedded_bots: started
zulip-workers:zulip_events_email_mirror: started
zulip-workers:zulip_events_user_activity_interval: started
zulip-workers:zulip_events_missedmessage_emails: started
zulip-workers:zulip_events_missedmessage_email_senders: started
zulip-workers:zulip_events_user_activity: started
zulip-workers:zulip_events_deferred_work: started
zulip-workers:zulip_events_embed_links: started
zulip-workers:zulip_events_missedmessage_mobile_notifications: started
zulip-workers:zulip_events_error_reports: started
zulip-workers:zulip_events_digest_emails: started
zulip-workers:zulip_events_email_senders: started
zulip-workers:zulip_deliver_enqueued_emails: started
zulip-workers:zulip_deliver_scheduled_messages: started
process-fts-updates: stopped
process-fts-updates: started
2018-12-14 05:39:53,203 restart-server: Done!
Application restarted successfully!
zulip@zulip:~/deployments/current/scripts$

To uncomment the line, you want it to read as:
SEND_LOGIN_EMAILS = False
(no hash at the front; # is the syntax for a comment and thus makes the line not do anything).

Can you run grep SEND_LOGIN /etc/zulip/settings.py?  I want to make sure the line doesn't appear twice in your settings file.

@timabbott I already checked but "great minds think alike" so here is the output (shows the line one time only:
root@zulip:/home/zulip# grep SEND_LOGIN /etc/zulip/settings.py
SEND_LOGIN_EMAILS = False
root@zulip:/home/zulip#

@timabbott I am not sure why this is closed.  I am still experiencing this Issue and I have run the commands you specified.  Is anyone able to reproduce this but un-commenting and setting to True and then trying to revert back to defaults?

@stone212 can you try this:
./scripts/get-django-setting SEND_LOGIN_EMAILS

And then next, edit zerver/signals.py to add print(SEND_LOGIN_EMAILS) there and check for what appears in /var/log/zulip/server.log?
I'm reopening, but generally I keep responding as long as there's something resolved regardless of whether the issue is open.

@timabbott
zulip@zulip:~/deployments/current$ ./scripts/get-django-setting SEND_LOGIN_EMAILS
False

I will do the other test later.  I am starting to think these email messages are not login related.  But they started within a few minutes of first enabling that option and when I dis-abled that option these kept coming but I did not scrutinize enough.   However the reason I enabled it is because our site was getting some malicious traffic and now I wonder if the emails are warning me of this.  Example:
Logger root, from module zerver.middleware line 281:
Error generated by Anonymous user (not logged in) on myzulip.mydomain.com deployment

Traceback (most recent call last):
  File "/home/zulip/deployments/2018-12-11-04-13-20/zulip-py3-venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/zulip/deployments/2018-12-11-04-13-20/zulip-py3-venv/lib/python3.5/site-packages/django/views/decorators/http.py", line 40, in inner
    return func(request, *args, **kwargs)
  File "/home/zulip/deployments/2018-12-11-04-13-20/zulip-py3-venv/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "./zerver/views/auth.py", line 858, in api_get_server_settings
    is_incompatible=check_server_incompatibility(request),
  File "./zerver/views/auth.py", line 848, in check_server_incompatibility
    user_agent = parse_user_agent(request.META["HTTP_USER_AGENT"])
KeyError: 'HTTP_USER_AGENT'

This is different from the emails I got while that value was set to True.  I have a different problem and the timing was so perfect and the message headers so similar that I think it tricked my brain.

@stone212 thanks for resolving this mystery!  As a sidenote, you're running a random version off master, right?  I think that traceback is actually an electron app/server interaction bug that was present in master for about a day.  In any case, if you upgrade you should be all set.

@timabbott I did a normal upgrade again (same way I did just before this problem started - and coinciding with me changing the EMAIL variable) and I have not had these emails in a few hours.
So the "Issue" should have been: Recent Upgrade Got me On Some Other Track That Sends me Too Many Emails or something.  But it's resolved too.

Yep, great, thanks for the followup!


Update CKK.cs

GOST R 34.10-2012 512 bit key

Thanks for the PR but could you please provide more info where did you get the value for CKK_GOSTR3410_512 constant? AFAIK it is not present in any of the official PKCS#11 specifications nor draft git repository.

First part of this constant is here
Second part is here

I have just pushed the same modifications to Pkcs11Admin.
Check them too, please.

Those are vendor specific extensions and as such are not suitable for inclusion in the base Pkcs11Interop library. If you need to use them then you can define them in your application code or you can use Aktiv.RutokenPkcs11Interop library.

This is an one example in C# that I can find for a short time.
This "vendor specific" extensions is Russian national standard fro new crypto algorithms - rutoken is one of examples.
There are also exist two vendors that share the same key identifiers - ESMART and Aladdin R.D.
I am attaching draft of PKCS#11 extension dated by 2013. Sorry I can find only an Russian language text, but the constant values are readable.
Расширение PKCS#11 для использования российских стандартов ГОСТ Р 34.10-2012 и ГОСТ Р 34.11-2012.pdf

There are example by ESMART.

Aladdin's SDK is not public, so I can not provide evidences of using this constants by this vendor.


Adjust E2E CLI tests to use current version of the template rather than degitted one (?)

so that e2e tests run locally take into account changes made to the template before the they are merged to main and can be degitted by CLI
Remember to:

add the template back as an implicit dependency of CLI for nx

My thoughts here: CLI tests should be testing the CLI. If the template breaks the CLI on some way that would show up in merge in main (and should be rare). I think we should keep CLI tests using the actual CLI workflow. I get the subtlety here though. I suggest we don't do this immediately though and think a bit.

WONTFIX.


Dockerfile for production

First of all, thank you for all the hard work in setting up this repo with Dockerfile(s) for creating a dev environment for Laravel. It would be great if there are Dockerfile(s) for use in a production environment as well 🙇🏼♂

With the latest updates to this setup, you should be able to use it confidently in production with Docker Compose! If you want a single, standalone Docker image to run a Laravel application, I'd recommend taking a look at ServerSideUp's images here: https://github.com/serversideup/docker-php