Typescript service is often stopping working randomly: Cannot read property 'charCount' of undefined

From @asvetliakov on June 12, 2017 16:40

VSCode Version: 1.13.0
OS Version: macOS 10.12.5

May be related to #28112
I'm not sure how to reproduce it yet. It seems to happen randomly and VERY often.
Steps:

Edit your code (medium to large project)
After some time the ts service stops working:
2.1. The validation messages are incorrect and have incorrect location
2.2. Completion and navigation features stops working

Typescript version: 2.3.3, also i didn't have any issues with vscode 1.12.0
I'm getting this in typescript service output:
[Error  - 6:32:24 PM] 'navtree' request failed with error.
Error processing request. Cannot read property 'charCount' of undefined
TypeError: Cannot read property 'charCount' of undefined
    at LineNode.walk (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:78490:47)
    at LineIndex.edit (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:78358:35)
    at ScriptVersionCache.getSnapshot (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:78150:47)
    at TextStorage.getSnapshot (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:73269:32)
    at ScriptInfo.getSnapshot (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:73378:41)
    at LSHost.getScriptSnapshot (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:73648:39)
    at SyntaxTreeCache.getCurrentSourceFile (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:71449:44)
    at Object.getNavigationTree (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:71953:71)
    at IOSession.Session.getNavigationTree (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77613:62)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:76670:61)

Full log: https://pastebin.com/X6xpSR1z
Thanks
Copied from original issue: Microsoft/vscode#28543

Looks like the first failure is:
[Error  - 6:10:16 PM] 'signatureHelp' request failed with error.
Error processing request. Debug Failure. False expression:
Error: Debug Failure. False expression:
    at Object.assert (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:2902:23)
    at Object.computePositionOfLineAndCharacter (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:9137:18)
    at TextStorage.lineOffsetToPosition (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:73296:31)
    at ScriptInfo.lineOffsetToPosition (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:73508:41)
    at IOSession.Session.getPosition (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77280:81)
    at IOSession.Session.getSignatureHelpItems (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77501:37)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:76599:61)
    at /Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77820:88
    at IOSession.Session.executeWithRequestId (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77811:28)
    at IOSession.Session.executeCommand (/Users/asvetl/work/applications/frontend/node_modules/typescript/lib/tsserver.js:77820:33)

(The cancelled requests ones are from vscode and not really errors. I've fixed the logging of these in the current vscode insiders builds)

Hi @asvetliakov, what we can tell from the log is that the server is somehow getting into a bad state where the contents of a source file are out-of-sync with line/column information. But we don't know how it got into that state. The attatched log doesn't seem to begin from the launch of the tsserver; that would be indicated if it started like:
Info 0    Binding...
Info 1    request: {"seq":0,"type":"request","command":"configure","arguments":{"hostInfo":"vscode"}}
Info 2    Host information vscode
Info 3    response: {"seq":0,"type":"response","command":"configure","request_seq":0,"success":true}
Perf 4    0::configure: async elapsed time (in milliseconds) 1.3250

Would you be able to get a complete log from the start?
If you don't want it pasted to github, you could also email me at<EMAIL_ADDRESS>

@andy-ms Just sent full trace log to your email

Hi @asvetliakov, that looks like a different log file that what we were expecting.
In VSCode you should be able to open the command palette and choose "TypeScript: Open TS Server Log". This should take you to a directory with a file tsserver.log inside. That should start with the header I mentioned above.

@asvetliakov Thanks, that looks like the correct one.

I'm having this issue too, do you need additional logs?

Thanks, we've already reproduced the error.

@asvetliakov We noticed the following on line 17 of the log you sent us:
Info 16   Add recursive watcher for: /Users/.../projectName
Info 17   Add recursive watcher for: /users/.../projectName/src

Could you check that your file system is case-sensitive? I've adapted the code we use to test for this, so you can put it in any .js file and run:
const os = require("os");
const fs = require("fs");

function fileExists(path) {
    try {
        const stat = fs.statSync(path);
        return stat.isFile();
    }
    catch (e) {
        return false;
    }
}

function isFileSystemCaseSensitive() {
    const platform = os.platform();
    // win32\win64 are case insensitive platforms
    if (platform === "win32" || platform === "win64") {
        return false;
    }
    // convert current file name to upper case / lower case and check if file exists
    // (guards against cases when name is already all uppercase or lowercase)
    return !fileExists(__filename.toUpperCase()) || !fileExists(__filename.toLowerCase());
}

console.log(isFileSystemCaseSensitive());

@Pajn Could you check for something similar, or send us your logs too?

No, my file system is case-insensitive. Your code gives false output.
Also noticed that this problem always happened after i'd created some new file in project and started to edit it. Happens even in small projects.

@asvetliakov Could you share your tsconfig.json? Also, logs from a small project would be helpful, especially if you could share steps to create the project. Just in case we need it, what is your OS?

@andy-ms
My OS is macOs 12.5 and tsconfig is:
{
    "compilerOptions": {
        "strict": true,
        "strictNullChecks": true,
        "target": "es2016",
        "module": "commonjs",
        "moduleResolution": "node",
        "sourceMap": true,
        "noEmitOnError": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "types": [
            "node",
            "jest"
        ],
        "noUnusedLocals": true,
        "outDir": "./compiled",
        "typeRoots": [
            "types",
            "node_modules/@types"
        ],
        "baseUrl": ".",
        "paths": {
            "*": [
                "types/*"
            ]
        }
    },
    "include": [
        "src/**/*"
    ],
    "exclude": [
        "node_modules",
        "compiled"
    ]
}

Also, looks like i can't reproduce it now with the new version of vscode 1.14, so may be error came from vscode side, as i didn't have any problems with version 1.12 too. Should i try to capture logs from vscode 1.13?

Hi @asvetliakov , I think at this point the specific error we are looking for is when both a /Users and /users directory show up in the logs -- since there should only be /Users (assuming upper-case is the correct name). In the logs we have it looks like that showed up immediately, so it should be easy to tell whether this is still happening. I assume that if you ls /users/.../projectName/src you get an error because no such directory exists?
@sheetalkamat Is also refactoring our watch implementation so she might have insight into how we ended up watching a lower-case directory.

Based on discussion with @sheetalkamat this may be solved by the new watch implementation.

Still have multiple /users in logs for vscode 1.14
Info 16   Add recursive watcher for: /Users/asvetl/work/applications/frontend
Info 17   Add recursive watcher for: /users/asvetl/work/applications/frontend/src
Info 18   Add type root watcher for: /Users/asvetl/work/applications/frontend/types
Info 19   Add type root watcher for: /Users/asvetl/work/applications/frontend/node_modules/@types

I assume that if you ls /users/.../projectName/src you get an error because no such directory exists?
No. Both ls /users/... and ls /Users/... are giving success result (with directory structure)

I'm sorry for not coming back sooner.
The computer where I have seen this error is a mac with a default installation, which means that the file system is case-insensitive. Both ls /users/rasmus and ls /Users/rasmus work fine.

I am not sure if my problem is exactly the same, but after having added some new files in the project, tsc began to crash with :
C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:2062
            throw e;
            ^

Error: Debug Failure. False expression.
    at computePositionOfLineAndCharacter (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:3752:22)
    at Object.getPositionOfLineAndCharacter (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:3742:16)
    at Object.formatDiagnosticsWithColorAndContext (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:55564:59)
    at reportDiagnosticWithColorAndContext (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:58760:25)
    at reportDiagnostic (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:58722:9)
    at reportDiagnostics (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:58727:13)
    at compileProgram (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:59088:13)
    at compile (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:59040:26)
    at performCompilation (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:58929:33)
    at Object.executeCommandLine (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:58872:9)
    at Object.<anonymous> (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\lib\tsc.js:59230:4)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\node-projects\payroll-app\node_modules\schemats\node_modules\tslint\node_modules\typescript\bin\tsc:2:1)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:598:3

Tsc : 2.5.1
Windows 10 64 bits
Nodejs 8.4.0

Can you please give a try to typescript@next to see if this works. I believe this with merge of PR  #17669

I haven't seen the issue any more after upgrading to 2.5.2

For posterity, I'm still seeing the "Debug Failure. False expression. at computePositionOfLineAndCharacter" error with 2.5.3 on OSX Sierra, but the problem is fixed in typescript@next so I'm not opening a new issue.


uuid generator docs have broken links to examples

Describe the bug
Examples are not rendered in the generator/uuid page
To Reproduce
check out https://external-secrets.io/latest/api/generator/uuid/
Expected behavior
I imagine some kind of examples
Screenshots

ahhhh. thanks for spotting this


Add Assoc instances for Const and Tagged

Nice. I'll make a release later today.

released https://hackage.haskell.org/package/assoc-1.0.1


add method beforeUpdate

Coverage decreased (-0.1%) to 61.394% when pulling 7c38126ec9ad365118d980ae32be1e08d5ff8cc0 on indriHutabalian:dev into b3f3c1abef0ec8c0330ff3d2bd28883e21126158 on danliris:dev.


Provide JSON-formatted output

Now available (automatically) as oof-results.json in the /oof directory after a test run is completed. Currently on the port-pytest-tui-to-oof branch.


Crash on startup - FerriteConfig hides exceptions raised in ConfigFileHandler by not unwrapping the underlying InvocationTargetException

Minecraft 1.20.1
Mod Loader Lex Forge
Forge 47.2.23
Ferrite Core 6.0.1
Crash Log https://paste.ee/p/ITjLM
This crash log is particularly hard to decipher, because the crash originates from here:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class malte0811.ferritecore.mixin.config.FerriteConfig
...
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [in thread "main"]
	at TRANSFORMER/ferritecore@6.0.1/malte0811.ferritecore.mixin.config.FerriteConfig$ConfigBuilder.finish(FerriteConfig.java:100)
	at TRANSFORMER/ferritecore@6.0.1/malte0811.ferritecore.mixin.config.FerriteConfig.<clinit>(FerriteConfig.java:75)
	at TRANSFORMER/ferritecore@6.0.1/malte0811.ferritecore.mixin.predicates.Config.<init>(Config.java:8)

This appears because FerriteConfig tries to reflectively invoke a method, and then immediately wrap any exceptions thrown in a RuntimeException, it hides the underlying cause (which would be whatever error was thrown in the reflectively invoked method itself:
https://github.com/malte0811/FerriteCore/blob/e47bcbbde5b83805f927bad82bcc2b323e7169b8/Common/src/main/java/malte0811/ferritecore/mixin/config/FerriteConfig.java#L94-L101
Ideally, this should catch InvocationTargetExceptions, and throw a new RuntimeError(e.getCause()), as that would be the actual underlying error being thrown. Beyond that, FerriteCore is crashing on startup here with unclear cause, but the problem appears to be directly related to whatever ConfigFileHandler is doing, which seems to crash loading the mixin config plugin.

Sorry, I have been very busy with other projects (with hard deadlines) as well as general IRL stuff recently. It seems that paste.ee deleted your log, can you reupload it somewhere else (e.g. gist) without an expiration period? Expiring log files are a problem especially for this sort of "unclear cause" issue: If I cannot work out the problem from the log, I may need to wait for someone else to run into the same issue and then look for similarities, which I cannot do if the first log has already expired.

Sadly no, as this log, via this link, was given to me via a user - I didn't think at the time to reupload it somewhere else. I don't know what the underlying issue was, as my memory at the time was the fact it was a modpack with a huge mod count. I reported this issue because there is a very obvious problem here, namely the catch(Exception e) { throw new RuntimeException(e); }, should be catching InvocationTargetException and rethrowing the e.getTargetException() - the exception that actually occurred in the reflective access - which would make this issue, if it were to appear again, at least visible.

Part of the problem is that unless your log was very different from the one I produced by intentionally throwing an exception, the stacktraces do not seem that problematic to me: The "real" exception was the lowest one (as usual in these situations), with multiple levels of rethrowing above it. What made my test log hard to follow was that the exception did not trigger a crash immediately, instead some later similar exception did. Changing the exception structure would not affect that. I will look into fixing that, but as a relatively low priority since it is still very obvious from the log that FerriteCore is involved "somehow".


Fix name errors

Currently, some references in the developer guide are still targeted to address book. Let's change it to the ones relevant to InTrack.

Codecov Report
Base: 70.92% // Head: 70.92% // No change to project coverage :thumbsup:

Coverage data is based on head (71eb897) compared to base (ab94b4f).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #221   +/-   ##
=========================================
  Coverage     70.92%   70.92%
  Complexity      636      636
=========================================
  Files           106      106
  Lines          2019     2019
  Branches        233      233
=========================================
  Hits           1432     1432
  Misses          505      505
  Partials         82       82

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Thanks for implementing the suggestions. LGTM!


invalid instructions in readme

that should be: angular.module("YOUR_MODULE", ["ordercloud-angular-sdk"])

This has been fixed


test - do not merge

@meganbradley : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Docs Build status updates of commit fadc89e:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs/build/automation-in-a-dll.md
:warning:Warning

Details

docs/build/automation-in-a-dll.md

Line 10, Column 1: [Warning: hard-coded-locale - See documentation] Link 'https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
Line 10, Column 1: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

labeling for pr review team convenience :)
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Docs Build status updates of commit fadc89e:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs/build/automation-in-a-dll.md
:warning:Warning

Details

docs/build/automation-in-a-dll.md

Line 10, Column 1: [Warning: hard-coded-locale - See documentation] Link 'https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
Line 10, Column 1: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://docs.microsoft.com/en-us/azure/app-service/overview-hosting-plans' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Use enum and struct to model nucleotide and DNA

I tried to add some swift approaches to this example.

The DNA should be modeled as a struct since the following apply to it.
The structure’s primary purpose is to encapsulate a few relatively simple data values.
It is reasonable to expect that the encapsulated values will be copied rather than referenced when you assign or pass around an instance of that structure.
Any properties stored by the structure are themselves value types, which would also be expected to be copied rather than referenced.
The structure does not need to inherit properties or behavior from another existing type.

The nucleobases(A,C,T,G) are enums, which is sort of self-explanatory. Nice that swift allows enums to be Character type.

The Optional Bindings if let made sense when converting from RawValue of Character to enum.

The DNA struct has a failable initializer created by adding ? to init and returns nil if the strand has an invalid character.

Remember that the example file just needs to prove that the tests will pass. You're right that it should be a struct, but end users never see the example files. Having said that, it's fantastic practice to make updates like this and there's no problem in doing so.

The only issue I see here is that by insisting on an an enum for the nucleobases, you're letting your implementation details leak. It's normally bad design to insist that the consumer of your API use your internal representation. For all we know, the consumer is reading text from a text file and needs plain text back. If we're going to do this then at the very least we should provide the enum in the test file and tell the user to use it, but I think we should stick to characters to stay in line with the rest of the languages.

Optional binding is a good thing.

Using failable initializers is good here. The original version was written before they existed in the language. Nice catch.

Pretty standard to use enum's in Unit Tests. Java has had them for a while, back when I wrote in Java. Otherwise we can write a map function to serialize to a generic format to match the other tests

I like the short string vs longer enum

Enum vs String is a frequently debated topic. I think the goal of exercism is not simply that we keep api of the tests consistent but that we effectively program in the language we are in( in the most idiomatic way). To that end I think this test should use enum's.  @kytrinyx
http://stackoverflow.com/questions/277364/java-enum-vs-string-as-parameters

I think I wasn't clear before.
Using enum is an elegant way to SOLVE the exercise, but we don't want to push the user into one specific solution. We want the user to be able to uncover the solution for themselves, and get feedback on it from others. Showing them the enum from the beginning is only giving them one real way to complete the exercise.

I updated the test to keep the return type generic. Internally struct uses an enum, but I added a new method that returns a dictionary of [String: Int]

counts() which returns this generic format
It is also goes along with the original count method
count("A") returns value for one
counts() returns all

This looks great @aarti. I really do like your enum solution. It's very clean. I encourage you to keep an eye on this exercise as people complete it on the site, and give them feedback as this type of feedback is really helpful to users.

Thanks. I will do that, its a difficult language to learn, so many ways to model things.


Support error function and fresnel integrals

Support error function and fresnel integrals in https://docs.scipy.org/doc/scipy/reference/special.html#error-function-and-fresnel-integrals, those are not universal functions may not need to be supported.

@hekaisheng Could you please guide me on this?

@hekaisheng Could you please guide me on this?

Here is the guidelines, https://docs.pymars.org/en/latest/development/contributing.html .


Tracking: WebAssembly support for iroh-net

We're working on Wasm support so you can use iroh-net in rust applications in browsers. See also the accompanying blogpost.
Here's some prior issues with requests for this:

https://github.com/n0-computer/iroh/issues/1803
https://github.com/n0-computer/iroh/issues/2671

Thanks for the blogspot, and about relay servers. Will Ockam be helpful in end to end encryption?

Thanks for the blogspot, and about relay servers. Will Ockam be helpful in end to end encryption?

The traffic that's relayed is already encrypted end-to-end, because we're using QUIC :) (Yes, we're compiling a whole QUIC network stack to Wasm and run it in the browser :upside_down_face: ).

Also can I use any relay server to connect, other wise it will lead to centralization (e.g. storing relay server addresses in dht)

Yes, relay servers are identified by URL. As a node, you can decide to use any "home" relay server you want.
By default, number 0 runs three: one in Asia, one in Europe and one in the US (at the moment).
But you can simply run one on your own via the binary behind the relay feature in iroh-net + DNS and some TLS config.
And if there are any relay servers you want to use from iroh, you configure them via the RelayMap::from_url (or configure a whole set using RelayMap::from_nodes).


[WIP] documenting release process

refs #4135
I took the comments from @segiddins, @lynnco, and @indirect and organized them with a little extra prose where I saw fit. It's mostly y'alls words, just reorganized 😊
There are a few questions I have, mostly about branching:

When 1.12.pre.1 is released, is it merged to 1-12-stable?
If there are bugs in 1.12.pre.1 and the branch (1-12-pre-1) is merged to master, is the branch for 1.12.pre.2 a branch off of 1-12-stable?
Are there any places we can reference to follow on discussions about in progress features, roadmaps, planned work, etc? It might be a good place to reference some of that stuff
How can people get in touch with the core team?
Is there a template for blog posts?

A few things to note:

In the notes on the issue, it looks like you flop between using . versus - as the delimiter in your branch names. I went with - since that appears to be what you're using in the repo itself
I do the full Github links so when people pull it down locally, they have the reference to the full link locally instead of relying on Github's magic linking

ping @feministy

When 1.12.pre.1 is released, is it merged to 1-12-stable?

We generally branch off 1-12-stable from master first, and then release version 1.12.pre.1 from the tip of the 1-12-stable branch.

If there are bugs in 1.12.pre.1 and the branch (1-12-pre-1) is merged to master, is the branch for 1.12.pre.2 a branch off of 1-12-stable?

Since there is only one branch per minor version (1-11-stable and then 1-12-stable), we put all changes to the 1.12.x series of releases into the 1-12-stable branch. After doing a release, we merge the exact commit that was released into master to make sure that it's up to date.

Are there any places we can reference to follow on discussions about in progress features, roadmaps, planned work, etc? It might be a good place to reference some of that stuff

We generally use a GitHub issues milestone to track releases, but we don't have a lot of formal tracking: https://github.com/bundler/bundler/milestones

How can people get in touch with the core team?

Slack is easiest, but we also have a shared email address<EMAIL_ADDRESS>
Is there a template for blog posts?

Not yet, but I started working on something to automate new releases on the website, and it has a template for the "what's new" page in it: https://github.com/bundler/bundler-site/pull/307

What’s the status here. Is this PR still being worked on?

@schneems I have not had time to devote to this PR, everything I have pushed up so far is all of the work I've done. If someone wants to take it over, that's ok with me!

I've just updated this, I'd greatly appreciate some review ❤

@bundlerbot r+


Please update semver

The current semver in package.json is:
"semver": "^2.3.0"
which is subject to this vulnerability.

Unfortunately newer semver also breaks compatibility, so we need to put it behind a flag. We already released it once, but had to rollback because of users complains.

So thank you, we know about it, but until we get --beta flag implemented, it needs to stay.


Search doesn't work at Chinese character

Tap the top bar for Article Search, and English and Numbers works great, but when I type the Chinese key words,it doesn’t work.

这问题都好多年了，不过除了这其它倒还好。

hope develop this feature.


Upgrade to Nodejs v10

Node v10 is used by electron v3.x, for which safe_browser is being upgraded.
See: https://github.com/maidsafe/safe_browser/issues/410
https://nodejs.org/dist/latest-v10.x/docs/api/buffer.html#buffer_new_buffer_array

Some of the changes to upgrade nodejs have been taken care by PR #306 .


feat(firebase): scaffolding

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines
[ ] Tests for the changes have been added/updated (for bugfix/feature)
[ ] Docs have been added/updated (for bugfix/feature)

PR Type
What kind of change does this PR introduce?

[x] Feature (a new feature)
[ ] Bugfix (a bug fix)
[ ] Style (changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc))
[ ] Refactor (a code change that neither fixes a bug nor adds a feature)
[ ] Perf (a code change that improves performance)
[ ] Test (adding missing tests or correcting existing tests)
[ ] Build (changes that affect the build system, CI configuration or external dependencies)
[ ] Chore (anything else), please describe:

What is the current behavior?

What is the new behavior?
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information
Fixes #558.

Todo:

[ ] add coverage for src/features/init/services/init.service.ts to avoid downgrade
[ ] test as local prod
[ ] prepare the prod env (could lead to a runtime error so we should be very careful)

Hits          2942     2815     -127
Misses         358      413      +55

Hits          +68

Misses         +38

Hits          +102

Misses         +8

I did not managed to add more coverage for the index file due to all the changed with the env.
On the other hand the init service was never covered and I think that this is feature is well enough large to stop right here.
The coverage of this last one should be made in another PR.


Add unit testing dependency.

MinUnit is a minimal unit testing framework. Copy it to a vendor dir, or integrate it in a CMake build using https://cmake.org/cmake/help/latest/module/FetchContent.html?

Maybe use CPM? For MinUnit it is a bit of over-kill, but it might be useful for packages depending on this repository.

It seems that vcpkg has momentum. It is decoupled from the build scripts.

Settled on vcpkg with greatest.


Style/Documentation

Will we disable this cop? And when? Only for app and rspec directories?
https://rubocop.readthedocs.io/en/latest/cops_style/#styledocumentation

I'd disable it. Documentation by default sucks, it's really not needed everywhere

@AleksSenkou @lazycoder9 my question was: should we disable this cop in all cases? E.g. we can add some documentation for utils from lib directories and rake tasks. Does it make sense?

@roman-dubrovsky it doesn't 😄

@AleksSenkou any thoughts? why it doesn't?

also,  what about ruby gems?

any thoughts? why it doesn't?

I believe we discussed it tones of times - code should document itself. Tests should document the behavior
If you want to document rack task usage - write clean code for that, else basic usage can be added to a project's README

also, what about ruby gems?

@roman-dubrovsky the same pattern if it's possible to write clean code

I believe we discussed it tones of times - code should document itself. Tests should document the behavior

no, we didn't discuss it tones of times cause I don't believe in the rule code should document itself / . Yep, I agree that this is a perfect rule but:

it doesn't exclude adding some documentation.
it works well only for cases when we have stable patterns and you don't need to think much about implementation stuff. + clean code and easy-for-understanding code aren't the same things (somebody can write a nice code with perfect design but it can be hard for understanding to you cause usually you're using another code style and patterns). And I really enjoy investigating this code base https://github.com/plataformatec/simple_form/blob/master/lib/simple_form/form_builder.rb#L47 ,

If you want to document rack task usage - write clean code for that, else basic usage can be added to a project's README

@AleksSenkou are there big differents between README note and short documentation?

@roman-dubrovsky I don't mind using documentation if you want them so hot 😄
I personally left comments only several times, because of hacky solutions I used. Leaving comments can be useful, but it's like an exception from the rule

it works well only for cases when we have stable patterns

@roman-dubrovsky yeah, that's true. And it's really most of our cases.

@roman-dubrovsky I saw the unreadable code and the worst I saw else - staled comments that only spoils understability. Again, for me, the rule is not to leave comments (with exception for tricky places).

are there big differents between README note and short documentation?

@roman-dubrovsky yeah, I add comments about some common for the project rack task for developers to understand which to use for which cases. When you have 20+ tasks, then it's craziness to open most of them to find useful for you. README as an aggregation

I personally left comments only several times, because of hacky solutions I used. Leaving comments can be useful, but it's like an exception from the rule

this is not just a comment but comments in the special format.

yeah, I add comments about some common for the project rack task to README for developers to understand which to use for which cases. When you have 20+ tasks, then it's craziness to open most of them to find useful for you. README as an aggregation

yes, it makes sense. But also, the documentation does not exclude notes in README
P.S. @AleksSenkou I freeze this issue for now cause want to concentrate on other things

this is not just a comment but comments in the special format

@roman-dubrovsky is it possible to write rack tasks in special format instead of leaving comments in a special format?

I freeze this issue for now cause want to concentrate on other things

Got it 👍

Ok, my proposal:

for public libraries (ruby.yml) config, I'd like to male that cop required. I just want to say that this is really uncomfortable to investigate libraries w/o any docs. (What this method do? Why this model has been added)

no ides about Rails application. Probably, I'll exclude that cop for app directory cause most entities here have a stable and consistent structure. In other cases (like lib directory and rake tasks), I'd like to make that cop active cause in these cases module does not split by categories, have a random structure which makes harder supporting of that modules.

Thoughts?

Documentation is a good thing, if properly written. But I won't enable this cop, as a general rule, I'd let the author and code reviewers decide whether documentation is necessary. Except of the gems, where it should be required, IMO.

ok, we agreed that this rule should be enabled for ruby config (which we're using for ruby gem projects)
For Rails projects, we're going to disable this cop but also we can add a note that we strongly recommend leaving some documentation for your classes and modules (especially for lib directory and custom test matchers). Correct?
P.S. My personal opinion that we can disable this cop only for app directory cause here we have a most-less approved structure. But the variant above works for me too.

Yeah, @roman-dubrovsky , I think it is a good idea to disable this cop only for the app directory!


Merge log_proxy and loki_push_api libraries

Now, both libraries uses the same interface name: loki_push_api and they do different things:

loki_push_api shares Loki Push API endpoint over relation data
log_proxy shares Loki Push API endpoint over relation data AND Injects Promtail in workload charm

Provider side
LogProxyProvider
Observes _relation_changed event and stores  loki_push_api endpoint and PROMTAIL_BINARY_ZIP_URL in data key in unit relation data bucket
LokiPushApiProvider
Observes:

upgrade_charm, relation_changed:

If the unit is the leader stores loki_push_api endpoint in app relation data bucket.
Get alert the rules stored in app relation data bucket by the consumer, generates and store the alert rules files.

relation_departed:

Remove alert rules files from disk

Consumer side
LogProxyConsumer
Observes:

_relation_created: Generate intial config for Promtail
_relation_changed: If there is a data object in unit relation data bucket:

Obtain Promtail binary
Update config for Promtail (add agent to clients section)
Update agents_lists in _stored
Add Pebble layer for Promtail service
Restart Promtail service

 _relation_departed:

Update config (remove the agent from clients section)
Update agents_list in _stored
If there is no agent in clients section stops Promtail service, else restarts Promtail service.

LokiPushApiConsumer
Observes:

upgrade_charm and relation_changed:

Store loki_push_api in _stored
If unit is leader:

Load alert rules from a directory and stored them in app relation data bucket

Emit loki_push_api_endpoint_joined event

relation_departed:

Remove loki_push_api from _stored
Emit loki_push_api_endpoint_departed event.

Merge Proposal v1
Provider side
Keep LokiPushApiProvider but PROMTAIL_BINARY_ZIP_URL should also be in app relation data bucket (we are discussing the new relation data schema.)
Consumer side
Keep LokiPushApiConsumer adding the LogProxyConsumer functionalities.
LokiPushApiConsumer should be instantiated with a flag that indicated whether Promtail should be downloaded and configured or not.
Metadata
Both sides of the relation should be named:
provides:
  logging:
    interface: loki_push_api

requires:
  logging:
    interface: loki_push_api

Shouldn’t LogProxyConsumer also observe relation_broken for safety? Also it needs relation_joined for new consumer units being spun up, e.g., after a pod churn, as those do not get the relation_created, and I am not sure relation_changed will fire.
LokiPushApiProvider: alert rules probably should be deleted on relation_broken: relation_departed is for single units going away, but alert rules are global to the consumer Juju app.

Shouldn’t LogProxyConsumer also observe relation_broken for safety? Also it needs relation_joined for new consumer units being spun up, e.g., after a pod churn, as those do not get the relation_created, and I am not sure relation_changed will fire.
LokiPushApiProvider: alert rules probably should be deleted on relation_broken: relation_departed is for single units going away, but alert rules are global to the consumer Juju app. Also, same comment about relation_joined applies.

Since these are improvements to the current behaviour, I'll address them in a separate issue: #65 to avoid endless PR

Merge Proposal v2
After a chat with @dstathis  we think that this approach is better:
Consumer side
Move alert_rules stuff from LokiPushApiConsumer to a parent class
LokiPushApiConsumer and LogProxyConsumer should inherit from that parent clasee
Metadata
Both sides of the relation should be named:
provides:
  logging:
    interface: loki_push_api

requires:
  logging:
    interface: loki_push_api

Is loki_push_api still a good interface name in that case. @mmanciop, would you say we are beyond the point of changing the name? if not, i think loki_logging would be a better name if it contains both the log proxy and the push api.

I still like it as API name, it expresses which way you talk to Loki. If, hypothetically, at some point Loki starts accepting natively syslog, we would regret calling this relation interface “loki_logging”

Seems reasonable @simskij.
An update of the work we are doing right now:

The class LogProxyConsumer was moved to loki_push_api.py and LogProxyProviderremoved. See this branch
You can see a diagram about classes, relations and interfaces.

I still like it as relation interface name, it expresses which way you talk to Loki. If, hypothetically, at some point Loki starts accepting natively syslog, we would regret calling this relation interface “loki_logging”. After all, even when using the syslog consumer, the charm using the library is still talking push_api with Loki, and the translation from syslog to push_api is hidden within the library.

Fair enough! I agree with that line of reasoning.


[Improvement] ErrorHandlers.java switches should have default cases

What would you like to be improved?
Adding a final default clause is good practice.
How should we improve?
Add default cases to switch statements.

working on this.

@justinmclean @caican00
It's interesting to me whether switching to a default branch improves code quality overall. Is there any documentation on this topic?

Yes, it is considered best practice to ensure that unexpected values are not silently ignored.
See for example:
https://pmd.github.io/pmd/pmd_rules_java_bestpractices.html#switchstmtsshouldhavedefault
https://rules.sonarsource.com/java/RSPEC-131/


Rpc methods too permissive for integer arguments

Methods that accept integer arguments currently accept both decimal-encoded values and hex strings.
Geth accepts only hex strings for these arguments. I would think that matching geth here is important to prevent divergences between the behavior on mainnet vs. when tested against ganache.
Test methods like evm_increaseTime also accept both decimal and hex-encoded values, but I think whether to make these less permissive is another question.
 After a little bit of discussion we determined that this would be way too big of a breaking change to Ganache at the moment. This is something that we would consider adding sometime in the future. Would adding a feature flag to enable this behavior be something that would work for you?
We'll leave this issue here to document this request.

It's not really something that I need, just a concern that it could cause issues for people who aren't aware of the difference between ganache's treatment of arguments and the treatment on mainnet. I would guess that enabling it via a feature flag wouldn't make much of a difference, since anyone who is aware the flag is needed is probably aware that they should be hex-encoding parameters anyway.

Thanks again @wolfo, we'll definitely consider making this behavior default in the future.


how to hide milestone and task category.

example
I don't want to show milestone and task categories, but I don't have anything related to it from the document.

@cx4
I feel sorry that you couldn't find the option.
There's the taskView option to adjust categories of what you want to show.
https://nhn.github.io/tui.calendar/latest/Options
Just set false to the option. Then you won't see them.


UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail

Remove Matplotlib GUI and heatmaps getting generated just return no of people data/ mean scores,etc. Comment unnecessary print statements.

Hi assign it to me


Focus-trap on modal not work.

Hi, I just used tailwind-elements to layout my web page. There is one problem that bothers me, namely focus-trap (in this case on modal) not working. But on the documentation it seems to work https://tailwind-elements.com/docs/standard/components/modal. I don't know what's wrong here, but I've tried repeatedly installing using NPM or CDN. However, the focus-trap still doesn't work.

We fixed some issues lately. Can you confirm the focus trap issue still exists?

Closing due to inactivity.


Has anyone trained the weights for the same segmentation effect for authors yet?

I tried all the training parameters suggested by the authors, e.g. samples_per_gpu=4,workers_per_gpu=8, changing the learning rate, adding gradient cropping, changing the dataset, etc. But a learning rate of 4e-4 will always result in IOU=0, and a learning rate set to 2e-4 or 1e-4 trains a model that is far less effective than the author's model.
So has anyone trained the same model results as the authors? And how are the parameters set? Very much looking forward to the guidance!

#7

#7
你好可以交流一下吗


Error when trying to massmint on RMRK2

What happened?

Please reproduce in steps
RMRK2 -> Create -> Massmint
Expected Behavior
should massmint
What browsers are you seeing the problem on?
Desktop Firefox
At which address did you encounter bug?
canary.kodadot.xyz
Are you logged in?
Yes
Which wallet you are using?
No response
At which chain did you encounter bug?
No response
Screenshots
^
Relevant log output
Error: createType(Call):: Call: failed decoding utility.batchAll:: Struct: failed on args: {"calls":"Vec"}:: Struct: failed on calls: Vec:: Call: Cannot decode value 'RMRK::MINT::2.0.0::%7B%22name%22%3A%22Land%201%22%2C%22sn%22%3A%2200000006%22%2C%22transferable%22%3A1%2C%22collection%22%3A%227EA1DCF47E98A25067-RPG%22%2C%22metadata%22%3A%22ipfs%3A%2F%2Fipfs%2Fbafkreibmty2xvlwntxiwbirbtt3ap437orasiqqve5fk5z6oc57b7vrjri%22%2C%22symbol%22%3A%22LAND_1%22%2C%22properties%22%3A%7B%7D%2C%22currentOwner%22%3A%22FSMdmCLv5gFZ87YerB3M8ZSQ58BGHdSnreC4J6znWpqPQK9%22%7D' of type string

Payment link for reward
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

This one is easy one.
You just need to wrap the rmrk string into asSystemRemark from @kodadot1/minimark

honestly it's very interesting coding concept

@/composables/transaction/mintToken/transactionMintRmrk.ts

Line 160

👋

👋


Padded Image tiles  are shrinking at the edges of the dzi image and retains its size on zoom

Filed https://github.com/openseadragon/site-build/issues/66 for documentation link.

We now have a potential fix for this, if it's still relevant to you: https://github.com/openseadragon/openseadragon/pull/1426


Unit tests: Fixed all unit tests.

sitemap.js now:

has a different base output content
ignores priority 0.0 and errors when a string is passed
changefreq is also ignored if not present
priority is also ignored when not present

Unit tests now reflect these changes to sitemap.js
Also removed the makefile and used an npm script instead.

In addition, it would be good to have Travis. I'm happy to add the travis.yml and the build status images to README.md

Thanks for the PR we will look at this soon!

@woodyrew We would gladly take a pull request that added travis CI support.  Thanks!


creating a shopping cart api

I Made changes as directed on the shopping cart API, to have a good merging of my forked repository

@john-amiscaray

@john-amiscaray @srishilesh  I have merged to the master using the format given to me but it says "everything is up to date" I really tried and found that my previous article was moved to another folder beginning with U which is truncated on GitHub because of the volume of data.

@kingsleynwafor54
I don't think those instructions were followed correctly.
If you had followed them, there should be a single commit with all the changes.
I guess you would have reused the same old branch name, instead of creating a new one.
Can you share your previous article title? Along with the directory that's stored in?

I also made the formal branch up to date, using-lambda-to-manipulate-object

I also made the formal branch up to date, using-lambda-to-manipulate-object.

@kingsleynwafor54

I would like to see commits to be 1 in your new PR - which means you would have to create a new PR with a new branch (not update your existing branch).
Btw, I don't see any articles with name /using-lambda-to-manipulate-object. Can you send me the URL?


Fix bugs in SPSA early stopping

There were two bugs here:
1 If the early stopping threshold was set to 0., early stopping was disabled because this was treated as a value of False. (0. is probably the most important threshold, because the loss is a hinge and a threshold of 0. guarantees misclassification)
2) The early stopping loss was calculated before doing the projection, so it could result in early stopping using a loss that wasn't actually attainable

This PR includes commits from https://github.com/tensorflow/cleverhans/pull/903 . The diff will be smaller after that is merged


Resource-based circuit breaking

Description
Envoy should have the ability to circuit break on system resources like CPU.
Circuit breakers at ingress are used to protect our hosts from resource exhaustion. To determine circuit breaker thresholds, we run a "redline" test, which increasingly ramps traffic on a single host until it degrades. We note rq_active, then set the threshold less some buffer.
Over time this ends up being a poor approximation for the real bottleneck for most of our services, CPU:

If any of the service's dependencies slow down, a single host can handle additional concurrency without exhausting its local resources.
If a service (the local service or a downstream) ships code that changes the overall load profile and/or the overall request mix, the circuit breaker may no longer protect the service or circuit break early.

Working out the platform-dependent implementation and the algorithm will be the fun part. I'd like to get a first impression from other users before getting into that.

IMO this is best done as a dedicated filter, as the circuit breaking is a bit different from what we currently do and I think it's pretty self contained. I think I would make this a general resource based ingress circuit breaking filter that could be eventually extended to memory and other things. As long as we have the right platform abstractions for getting the information we need I think this sounds like a very useful feature to add.

I think we may also want to tie this in to the centralized system for #373.  I can imagine hitting some threshold (event loop time?) at which we simply stop accepting new requests so we can make forward progress on existing ones.

came across this issue and wondered about the implementation part in the context of containers and running envoy as a sidecar in an ecs task or in k8s pod,
one way to do this would be to share process namespace, that way the envoy can track cpu of the other container using /proc/{main-container-pid}/root/sys/fs/cgroup/cpuacct/cpuacct.usage_all
but this solutions adds too many requirements on the end user like having to share process namespace, run envoy as root user, allow envoy to access entire disk of the main container.
is there any other easy/secure way to track resources of system in a container based system?


[WFLY-11031] Introduce a console-access-log for web access logging

https://issues.jboss.org/browse/WFLY-11031
Note: This PR currently requires a SNAPSHOT build of WildFly Core until Beta5 is release.
@fl4via Can you please have a look at this as I went a slight different route than what we discussed previously. I added a setting=console-access-log resource instead of keeping everything under the setting=access-log resource. I felt it made the resource too complicated.
There had been some email discussions with using the standard pattern attribute for determining the exchange attributes to include in the JSON structured output. While I realize these are well known patterns I felt it just didn't fit right when we need the ability for defined keys in structured output. I went with a complex attributes management model attribute with known exchange attribute types.

Dependency Tree Analyzer Output:
New Dependencies:

org.wildfly.core:wildfly-event-logger:jar:9.0.0.Beta5-SNAPSHOT:compile

@jamezp #12266 contains the Core 9.0.0.Beta5 upgrade that is required by this PR.

It looks like I should not have pushed the last change I did. I didn't notice #12300 and only looked at master-ignore by mistake. This one may need to be manually close and I apologize for that. Once #12300 is merged I'll make a new PR for the text update on the documentation.

It's fine; I'll merge this. I'm not merging #12300; it's just for CI.  But the only diff here vs what I tested is in the asciidoc.


add method on user to get cached devices, which is populated when use…

…r calls getAllMyDevices, or an empty array if no cached devices present
add tests as well
note: it isn't strictly necessary to return it as a promise, but I chose to out of consistency. Does that sound reasonable?

For sake of constancy in returning class methods, its good that you used a promise. Well done! Good to go! 👍


[Issue 9821] [pulsar-testclient] Fix perf tools to keep compatibility with previous version

Motivation
Fixes #9821
Modifications
Add the logic to cover the default behaviour of previous versions. More details can be found in #9716.

@eolivelli Please help to review this when you are available.

The change looks good to me.
Let me test it locally

@eolivelli Thanks for your Inspiring tips too.


unable to create explainer from mleap deserialized pyspark model

i have a RandomForestClassificationModel which i deserialized from a saved mleap bundled file:
model = deserialized_pipeline.stages[-1:][0]
gives:
RandomForestClassificationModel (uid=RandomForestClassifier_46858df35b5812fd83ab) with 20 trees
trying to build explainer on the model with:
explainer = shap.TreeExplainer(model)
gives the following error:
`---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
 in
1 #Build our explainer
----> 2 explainer = shap.TreeExplainer(model)
......
/env_details/shap/explainers/tree.py in buildTree(index, node)
1083                     self.values[index] = [node.prediction()] #prediction for the node
1084                 else:
-> 1085                     self.values[index] = [e for e in node.impurityStats().stats()] #for gini: NDarray(numLabel): 1 per label: number of item for each label which went through this node
1086                 self.node_sample_weight[index] = node.impurityStats().count() #weighted count of element trough this node
1087
AttributeError: 'NoneType' object has no attribute 'stats'`
i am able to run an shap on a randomForest model i create on iris data set , so it's not an environment issue.

@QuentinAmbard do you have any ideas here? It seems like something might be off the way this is getting deserialized.

@yairdata you're able to run the explainer on your original model, but once you serialize it with MLeap and load it back with spark it is failing, is that what you're doing?
I haven't tried using shap with MLeap models, maybe it's not serializing everything and some parts required to create the shap model are missing/changed.
Could you share your MLeap model by any chance?

@QuentinAmbard  - unfortunately i can't share the model itself because it contain sensitive data, but i suspect the issue will happen on every model , so it can be for example tested on the iris dataset spark pipeline model in the shap test after it is serialized and deserialized with mleap.

Hi, I am also facing the same issue. I am using GBTClassificationModel from the PySpark. The explainer can be initialized successfully when I don't serialize and deserialize the model (MLeap). In case where I do need to load and deserialize the model, I get this error. Do you have any luck with this @yairdata ?
The explainer cannot be saved itself because of pyspark, right? So we initialize it again by loading/deserializing the saved model, however this does not help either.
Were you able to look into this? @QuentinAmbard @slundberg

Same problem here.


CB-9926: Add retries to the legacy health check's ping

Add retries to the legacy health check's ping.
See detailed description in the commit message.

@lacikaaa I marked this DO_NOT_MERGE. I would like to run some more manual tests since I am changing legacyParseMessages(). I want to check a few failure cases to ensure correctness before this gets merged. But I thought it is best to start a review. I don't really like the retry helper class, do you have better suggestions for a better way?

yes, that doesn't seems the best way. I think you have to move out that part of the code to a separate class. Otherwise you can selfinject, but that's not better.

I had to drop the retires from 3 to 2 for the health check so that it didn't exceed the RPC timeout. I will remove the DO_NOT_MERGE tag now.

I had to drop the retires from 3 to 2 for the health check so that it didn't exceed the RPC timeout. I will remove the DO_NOT_MERGE tag now.

When I force-pushed the CB-9926 branch from af76d4b to 3957e5f, this closed the PR by accident. I was trying to rebase to the lastest.... I will open a new PR.

When I force-pushed the CB-9926 branch from af76d4b to 3957e5f, this closed the PR by accident. I was trying to rebase to the lastest.... I will open a new PR.


How to handle errors from API

When i lose internet connection I receive errors to the console, such as:
error: [polling_error] {"code":"EFATAL","message":"EFATAL: Error: getaddrinfo ENOTFOUND api.telegram.org"}
Unhandled rejection RequestError: Error: getaddrinfo ENOTFOUND api.telegram.org                                                                at new RequestError (/apps/node_modules/request-promise-core/lib/errors.js:14:15)
I want to direct these errors to somewhere else other than the console but i dont know how to catch the error:
normally it would look something like this:
 bot.on('error', (error) => {
      //do something with 'error'
 })

but when i try this, i still get "unhandled error". What is the correct way to catch "on error" events to avoid multi line logging to the console?

The errors are received from the library that is used to implement the bot. You need to ask the question in the library's repository or its discussion group.


Add CentralDogma base EndpointGroup

Motivation
Use single file, or any part of file which served by CentralDogma as EndpointGroup.
I tried to add ServerListener to auto add/remove Endpoint as well, but CentralDogma seems not support atomic operation, so it leads to race condition when multiple armeria servers are woken up at the same time. This conditon leads to very weird state and many unexpected error, so this patch is for read-only operation.
I copied some code from ZooKeeperEndpoint (parser logic) because I can't find any place good for put those logic for reuse.
One more small things that I don't know my patch is enough for publish armeria-centraldogma artifacts, if I miss something please leave comments.
Thanks

Thanks for the PR. But it will introduce cyclic dependency between armeria and CentralDogma. IMHO, it is better to put these things to CentralDogma repo than armeria.
Since I didn't open sourced our CentralDogmaEndpointGroup that is heavily used in our production, yet. So let me send a PR to CentralDogma to open-source that with your CentralDogmaCodec idea.

I wondered about how depedency should be resolved too, put this module to CentralDogma repo is also a good idea, HDYT @trustin

This PR itself does not introduce a cyclic dependency strictly speaking, but I agree with @imasahiro. How about moving this into centraldogma-client? Also, please make sure your EndpointGroup implementation is generic enough that it covers the requirements of @imasahiro. It'd be a good idea to compare yours to his implementation to get some hints. What do you think?

Thanks a lot for your understanding, @huydx!


Multi-Tenancy Unknown error on enabling Tenant creation in Authentication

When attempting to enable the creation of tenants in the authentication section of my Keycloak instance, I'm encountering an unknown error. This error prevents me from successfully configuring multi-tenancy for my application.
Steps followed to enable Create tenant:

Keycloak Admin Console
Navigate to the authentication section.
Enable th option for creating tenant
Show unknown error message when tried log with user assigned.

I expect to be able to enable the creation of tenants without encountering any errors. This would allow me to configure multi-tenancy for my application as needed. However, an unknown error is displayed when attempting to enable the creation of tenants. This prevents me from proceeding with the multi-tenancy configuration.
I am using keycloak version 22.0.1
I would greatly appreciate any assistance in resolving this issue. If there's any further information required from my side, please let me know.
Thank you for your help!

Hello @mamunmohamed
Thank you for reporting the issue you're facing, and I appreciate the details you've provided.
Unfortunately, I couldn't replicate the error you mentioned. Generally, after enabling tenant creation, you should receive a response like:
{
    "error": "invalid_grant",
    "error_description": "Account is not fully set up"
}

If you're able to provide the logs of your Keycloak instance when this error occurs, it would greatly assist in resolving the issue.
In case you're unable to find the specific logs related to this issue, you might consider enabling debug-level logging.

Hello, good morning! I'm a colleague of Mamun. The .JAR is compiled and placed inside the providers folder with the corresponding /bin/kc.bat build command.
We see everything related to the extension in Authentication and Mappers. Without activating anything, the Postman call works correctly for one of the users. However, when we activate it, these are the error traces that we see in Intellij:
2023-08-28 08:39:30,827 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-10) Uncaught server error: java.lang.NoSuchMethodError: 'javax.persistence.EntityManager org.keycloak.connections.jpa.Jpa
ConnectionProvider.getEntityManager()'
        at dev.sultanov.keycloak.multitenancy.model.jpa.JpaTenantProviderFactory.create(JpaTenantProviderFactory.java:21)
        at dev.sultanov.keycloak.multitenancy.model.jpa.JpaTenantProviderFactory.create(JpaTenantProviderFactory.java:10)
        at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:177)
        at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.jboss.resteasy.core.ContextParameterInjector$GenericDelegatingProxy.invoke(ContextParameterInjector.java:146)
        at jdk.proxy2/jdk.proxy2.$Proxy50.getProvider(Unknown Source)
        at dev.sultanov.keycloak.multitenancy.authentication.requiredactions.CreateTenant.evaluateTriggers(CreateTenant.java:26)
        at org.keycloak.services.managers.AuthenticationManager.evaluateRequiredAction(AuthenticationManager.java:1411)
        at org.keycloak.services.managers.AuthenticationManager.lambda$evaluateRequiredActionTriggers$22(AuthenticationManager.java:1382)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEachOrdered(ReferencePipeline.java:601)
        at org.keycloak.services.managers.AuthenticationManager.evaluateRequiredActionTriggers(AuthenticationManager.java:1382)
        at org.keycloak.services.managers.AuthenticationManager.nextRequiredAction(AuthenticationManager.java:1100)
        at org.keycloak.authentication.AuthenticationProcessor.nextRequiredAction(AuthenticationProcessor.java:1132)
        at org.keycloak.protocol.AuthorizationEndpointBase.handleBrowserAuthenticationRequest(AuthorizationEndpointBase.java:138)
        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildAuthorizationCodeAuthorizationResponse(AuthorizationEndpoint.java:356)
        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.process(AuthorizationEndpoint.java:226)
        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.processInRetriableTransaction(AuthorizationEndpoint.java:147)
        at org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint.buildGet(AuthorizationEndpoint.java:119)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
        at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:560)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:452)
        at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:413)
        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:415)
        at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:378)
        at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:174)
        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:142)
        at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:168)
        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:131)
        at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:33)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:429)
        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:240)
        at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)
        at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
        at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:157)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:229)
        at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:82)
        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:147)
        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:84)
        at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:44)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
        at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:58)
        at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:36)
        at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
        at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)
        at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:141)
        at org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter.lambda$createBlockingHandler$0(QuarkusRequestFilter.java:82)
        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:833)

Hi @Fictor86
Thank you for sharing the log.
It seems that the error is likely due to building the extension from an outdated branch.
Keycloak 22 and its corresponding extension version use jakarta dependencies, while the log shows javax.persistence.EntityManager.
To resolve this, I suggest rebuilding the extension from the latest main branch or using a pre-built JAR from the releases.

Thank you, that was exactly it. At the moment, we can already see the Tenant creation screens. We had a previous version and didn't realize that could be the issue. Appreciate the quick response and friendliness.
A pleasure!

 Glad the problem has been resolved.
If you have any other issues or suggestions for improvement, please don't hesitate to reach out.

Hello again!
Great, now that this has been resolved, we have created two Tenants for two users in a Realm. One user is an admin, and the other is a regular user. Later, using Postman, we added an additional Tenant to one of these users through the POST request -> http://localhost:8080/realms/multi-tenant/tenants.
This process works well, and during the login, a selection screen appears, allowing the user to choose which Tenant to access. However, our issue arises when we attempt to query a user who is part of two Tenants. When we inspect their token, we encounter the error you mentioned:
{
    "error": "invalid_grant",
    "error_description": "Account is not fully set up"
}

We are unable to delete one of the Tenants because we no longer have a valid token to access the DELETE functionality. What could be causing this issue? Is there some additional configuration we are missing?

Hi @Fictor86
It seems like the issue you're facing is related to the "Select active tenant" required action that's enabled. This requirement might prevent you from obtaining a token for a multi-tenant user, leading to the "Account is not fully set up" error. To address this, you might need to disable the "Select active tenant" action temporarily, which could allow you to delete one of the tenants.
In addition, you should probably avoid adding tenant admins to multiple tenants, and it might be a good idea to disable the ability for tenant admins to create or join other tenants in the extension. However, I understand that this solution might not be ideal for some use cases.
Another option could be to allow including the tenant name as part of the token request.
I recommend creating a separate issue to address this matter further. Feel free to share any suggestions you have for improving the current setup based on your specific use case.

Hi @anarsultanov,
What we are trying to implement is:
1 User can be part of more than 1 tenant. At the time of login, the user can select to which tenant to Log. Here, we are facing the issue that you described at first paragraph.

### Another option could be to allow including the tenant name as part of the token request. ---> We would be very thankful to you if you can give us hint to implement it.
Kind regards

Hi @mamunmohamed

User can be part of more than 1 tenant. At the time of login, the user can select to which tenant to Log.

That's the purpose of this extension, and it should work if you use the authorization code grant type.
The problem you describe can only occur if you use the password grant type that is generally not recommended at all.

We would be very thankful to you if you can give us hint to implement it.

But I understand that there may be use cases with high-trusted applications where this grant type may be required, so I asked you to create another issue about this as it should probably be implemented in the extension itself.


Optional HttpUrl with alias

Initial Checks

[X] I have searched GitHub for a duplicate issue and I'm sure this is something new
[X] I have searched Google & StackOverflow for a solution and couldn't find anything
[X] I have read and followed the docs and still think this is a bug
[X] I am confident that the issue is with pydantic  (not my code, or another library in the ecosystem like FastAPI or mypy)

Description
Hi :)
I am unable to create a field with an optional HttpUrl. I am trying like this:
website: Optional[HttpUrl] = Field(..., alias='Website')
If i run the code and do not provide a url I get the following error in postman as a response.
{
    "detail": [
        {
            "loc": [
                "body",
                "Website"
            ],
            "msg": "ensure this value has at least 1 characters",
            "type": "value_error.any_str.min_length",
            "ctx": {
                "limit_value": 1
            }
        }
    ]
}

If I use str instead of HttpUrl everything works as expected. Is there a way to add an optional URL that is type checked?
Example Code
from typing import Optional

from pydantic import HttpUrl, EmailStr, BaseModel, SecretStr, Field

from fastapi import FastAPI, APIRouter

class UserCreate(BaseModel):
    email: EmailStr = Field(..., alias='Email')
    username: str = Field(..., alias='DisplayName')
    password: SecretStr = Field(..., alias='Password')
    website: Optional[HttpUrl] = Field(..., alias='Website')

router = APIRouter(prefix="/test", tags=["test"])

@router.post("/")
async def post_create_user(user: UserCreate):
    pass

app = FastAPI()

app.include_router(router)

if __name__ == '__main__':
    import uvicorn

    uvicorn.run(app, host="<IP_ADDRESS>", port=8000)

Python, Pydantic & OS Version
pydantic version: 1.10.2
            pydantic compiled: True
                 install path: /Users/chris/Development/incenty-dirs/server_python/venv/lib/python3.8/site-packages/pydantic
               python version: 3.8.9 (default, May 17 2022, 12:55:41)  [Clang 13.1.6 (clang-13<IP_ADDRESS>.5)]
                     platform: macOS-12.4-arm64-arm-64bit
     optional deps. installed: ['dotenv', 'email-validator', 'typing-extensions']

Affected Components

[ ] Compatibility between releases
[X] Data validation/parsing
[X] Data serialization - .dict() and .json()
[X] JSON Schema
[ ] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[ ] Other Model behaviour - construct(), pickling, private attributes, ORM mode
[ ] Settings Management
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

That's because the field is not optional.
Use
website: Optional[HttpUrl] = Field(None, alias='Website')

Notice the first argument to Field is None, not an ellipsis which means "required".


Thread tracing causes process to hang

Description
We recently attempted to upgrade the version of the agent we use from 8.16 to 9.0 and ran into an issue where, after our code had completed a Sidekiq job, the process would be spinning at 100% CPU usage seemingly indefinitely.
We were able to prevent this issue by disabling the thread tracing (setting instrumentation.thread.tracing to false), so it seems like this issue may have been present for a while but only manifested with the automatic enabling of thread tracing that was included in 9.0.
Notably, this only seems to occur for a particular job that we have. We use Sidekiq for job processing, and this issue would manifest for a particularly long-running Sidekiq job that made many database requests. Reducing the number of DB requests made by that job prevented this issue from manifesting.
Expected Behavior
We expect the New Relic agent to publish the traces quickly and without using 100% of a CPU.
Steps to Reproduce
I wish I had more specific steps for you here — the job we're looking at takes over ten minutes to run so it's a long debug cycle. We were not able to reproduce the issue when running the job outside of Sidekiq, so it seems like maybe some interaction of the threading used by Sidekiq with the thread tracing done in NewRelic.
If this seems worth digging into then I can look further into creating a reproducible example, let me know!
Your Environment
Running on Heroku 18 (Ubuntu 18.04).
New Relic Ruby Agent: 9.0.0
Ruby: 3.1.2
Sidekiq: 6.5.6
For Maintainers Only or Hero Triaging this bug
Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):

I've been debugging this exact issue in Resque for the past few days without much luck and happened to be investigating a different NR issue when I just came across this. I'm going to disable thread instrumentation and let it run for the weekend. I'll report back early next week if we had anymore stuck processes.

Hi @parkerfinch and @travisbell,
Thanks very much for bringing this issue to our attention. We place a huge emphasis and priority on delivering maximum value while running at as low of an overhead as possible, and a 100% CPU spike certainly is out of alignment with our goal.
I'm very glad @parkerfinch was able to pinpoint the new-in-9.0 defaulting to true (enabled) for instrumentation.thread.tracing as a root cause. And @travisbell we eagerly await the results of your weekend run.
(As @parkerfinch points out) Thread tracing was added in v8.7 but not enabled by default so as to avoid conflicting with existing custom user solutions for Thread instances. Then for v9.0 we were able to leverage semver and flip the default to being enabled. For multithreaded apps, the Thread based categorization can be super neat to see in the UI, but the functionality is certainly not worth a CPU spike and shouldn't be causing one.
We always welcome all the assistance we can get on this open source agent software. If you're able to produce a reproduction that doesn't require sharing any application specific code or customer data, we'd love to use it. But we don't require it and will try to put together a repro ourselves. We'll keep you posted with updates here on this GitHub issue.
In the meantime and depending on your support level with New Relic, you can also engage the New Relic Support Community or open a support ticket. When doing so, please provide a link to this GitHub issue.

Alright, 3 nights of running Resque without thread tracing and we didn't have a single hanging process. That's the first time in ~3 weeks I can say that so I feel pretty confident this was our culprit. Hard to imagine it's a coincidence at this point but I will reply back in case I see it happen again.
To add some extra details about our ENV:

New Relic Ruby Agent 9.0.0
Ruby 3.2.1
Resque 2.5.0
resque-multi-job-forks

And to re-iterate, it seems to affect long running jobs and not short quick ones. Long running for us means ~2-3 hours.

And to re-iterate, it seems to affect long running jobs and not short quick ones. Long running for us means ~2-3 hours.

Interesting that it only affects jobs running for 2-3 hours on your end, we've seen it with jobs running as quickly as 13 minutes.
In case it helps, the general "shape" of the job that we're seeing this issue on is:

Do a bunch (tens of thousands) of small database reads (return a single row from a table) in a loop.
Do one large write.

@parkerfinch @travisbell thank you both for the updates. We're working on identifying a root cause and will let you know as soon as we have one. So far we've done lots of Thread focused testing with short-lived and long-lived processes running from within a dozen threads to 100,000 and haven't yet managed to generate a hang or agent induced CPU overhead.
Our current hypothesis is that the agent's database and/or background job instrumentation is key to the problem, given that you have both of those ingredients in play.
The agent's Thread instrumentation does 2 really cool things:

When instances of Thread are spawned, we record this to help users see what took place in which thread
For existing agent instrumentation for databases, background jobs, NoSQL stores, net clients, etc., activity taking place in a new thread would previously have been hidden from the agent. With instrumentation.thread.tracing enabled, the agent now does a much improved job of operating in an async context.

Our current hypothesis is that our existing database and/or background job instrumentation may ultimately be to blame for the hang and the thread support is simply bringing that to the surface.
Questions for you:

Before getting to the point where things hang, were you able to notice any additional database or Sidekiq/Resque data appearing in your New Relic dashboard that wasn't there before?
When things hang at 100% CPU, does both the running process and the New Relic agent hang or does the agent continue to report data at that point?

Thanks, @parkerfinch! If the agent itself is hogging all of the CPU but still managing to operate, its activity can be seen by temporarily having it operate in debug level logging mode, and/or by enabling the optional audit log. These are the two relevant newrelic.yml config options:
  log_level: debug
  audit_log.enabled: true

Those options aren't good for production use, but helpful for temporary debugging.
With debug level logging, log/newrelic_agent.log should continue to see constant activity while the agent is still running and with the audit log enabled, log/newrelic_audit.log will see new content every time some data is sent up to New Relic's servers.
On our end, we now have a repro that will spike the CPU and hang the monitored application for a period of time only when thread instrumentation is enabled. The application eventually recovers after the agent has finished going through a backlog of thread related work, so it's not a complete and permanent hang we're seeing.
We are now evaluating a variety of ways to improve things while keeping thread instrumentation enabled, and we will share our findings and improvement PRs here as they become available.
If anyone else has a repro that they can share that does not include any sensitive data, we'd also be happy to test the fix against repro shared with us. Otherwise, we'll have a feature branch prepped that others can pull down and test with.

Same issue here. In our case, a long-running (~ 3 hours) Sidekiq job executing a large number of queries faced this issue.
Additional context:

New Relic Ruby Agent 9.1.0
Ruby 2.7.6
Sidekiq 6.5.8

Below is a backtrace taken with the TTIN signal for a hung process.
https://github.com/sidekiq/sidekiq/wiki/Signals#ttin
Thread TID-a8yu processor

/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:110:in `first'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:110:in `timings_overlap?'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:129:in `block (2 levels) in children_time_ranges'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:129:in `index'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:129:in `block in children_time_ranges'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:128:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:128:in `each_with_object'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:128:in `children_time_ranges'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:303:in `record_exclusive_duration'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/abstract_segment.rb:92:in `finalize'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/tracing.rb:52:in `block in finalize_segments'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/tracing.rb:52:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction/tracing.rb:52:in `finalize_segments'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction.rb:556:in `commit!'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/transaction.rb:535:in `finish'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:391:in `perform_action_with_newrelic_trace'
/usr/local/lib/ruby/gems/2.7.0/gems/newrelic_rpm-9.1.0/lib/new_relic/agent/instrumentation/sidekiq/server.rb:20:in `call'
/usr/local/lib/ruby/gems/2.7.0/gems/sidekiq-6.5.8/lib/sidekiq/middleware/chain.rb:179:in `block in invoke'

...<snip>...

Looking at this backtrace, I think https://github.com/newrelic/newrelic-ruby-agent/pull/1927 is pointing in the right direction.

@wata727, thank you for sharing your encounter with a similar problem. This issue is our highest priority at the moment. The maintainers are reviewing this change as we speak. The changes are at the core of how the agent functions. Therefore we are taking more time to ensure they are robust and avoid causing other unintended issues.

Hi @parkerfinch, @travisbell, @wata727! 👋
We have a potential fix for this issue we'd like you to test.
To do this, please update your Gemfile's reference to newrelic_rpm to point at the fix's branch:
gem 'newrelic_rpm', git: 'https://github.com/newrelic/newrelic-ruby-agent/', branch: 'must_go_faster'

Then bundle, make sure instrumentation.thread.tracing set to true and run the problematic jobs.

Hi @kaylareopelle, fantastic work. I don't mind bumping to do som testing for you guys. I'll deploy later today and report back what I find out.

2 full days of running the must_go_faster branch and we haven't had a single stuck process. Things seem to be working much better.

That's fantastic news, @travisbell. Thanks for testing the branch! This code will be included in our next release.

Hi @travisbell, @parkerfinch! The changes provided by https://github.com/newrelic/newrelic-ruby-agent/pull/1927 have been released in v9.2.0 of the newrelic_rpm gem.


ApkTool Java problem

Hi!!
When I use apktool to sign an apk file, I write this comand on terminal "apktool d -f -r test.apk"
and it show me this :
I: Using Apktool 2.2.2 on test.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:272)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:166)
at brut.apktool.Main.main(Main.java:81)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.directory.ZipRODirectory.(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.(ZipRODirectory.java:38)
at brut.directory.ExtFile.getDirectory(ExtFile.java:51)
at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:270)
... 3 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at brut.directory.ZipRODirectory.(ZipRODirectory.java:53)
... 6 more

and I think that java is installed correctly
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Any suggestion?
Thanks in advence!!!

Can't replicate this and you are using a very old build of Apktool (2+ years old). So closing as non-reproducible.


[DO NOT MERGE] Relayer timestamp timeout error

This branch reproduces the relayer timestamp timeout error when sending the tx using chain-node binary (e.g. gaia), which will send a nanosecond timeout integer instead of a go formatted duration.
ibc-test-framework test RelayPacketTestTimestampTimeout

ts=2022-04-14T19:18:33.279985Z lvl=info msg="Error building or broadcasting transaction" provider_type=cosmos chain_id=osmosis-1001 attempt=3 max_attempts=5 error="rpc error: code = InvalidArgument desc = failed to execute message; message index: 1: receive packet verification failed: block timestamp >= packet timeout timestamp (2022-04-14 19:18:28.8874621 +0000 UTC >= 2022-04-14 19:18:06.581576595 +0000 UTC): packet timeout: invalid request"

@jtieri said this is due to trying to send a MsgRecvPacket when it should send a MsgTimeout, and suggested we could fix this in the relayer by attempting to parse as go duration, and fallback to an integer parse attempt, assuming nanoseconds.

rly tx link seems to have issues on the latest relayer main also, so this branch currently hardcodes it to use v2.0.0-beta4 for the tx link.

should we close this as stale?

This issue was resolved by https://github.com/cosmos/relayer/pull/755 and https://github.com/cosmos/relayer/pull/756


Flood of compute_list_bind_uniform_set errors when changing scenes that involve Volumetric Fog

Godot version
v4.0.3.stable.official [5222a99f5]
System information
Windows 10, Forward+
Issue description
If you have a scene that has a Sky and Volumetric Fog enabled in WorldEnvironment and change to a scene that has Volumetric Fog enabled, you will forever get a flood of errors like:
ERROR: Uniforms were never supplied for set (0) at the time of drawing, which are required by the pipeline
   at: (drivers\vulkan\rendering_device_vulkan.cpp:8007)
ERROR: Condition "!uniform_set" is true.
   at: RenderingDeviceVulkan::compute_list_bind_uniform_set (drivers\vulkan\rendering_device_vulkan.cpp:7808)
ERROR: Uniforms supplied for set (0):
Set: 0 Binding: 1 Type: Texture Writable: N Length: 1
Set: 0 Binding: 2 Type: Texture Writable: N Length: 1
Set: 0 Binding: 3 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 4 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 5 Type: UniformBuffer Writable: N Length: 3712
Set: 0 Binding: 6 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 7 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 8 Type: Image Writable: Y Length: 1
Set: 0 Binding: 9 Type: Image Writable: Y Length: 1
Set: 0 Binding: 10 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 11 Type: UniformBuffer Writable: N Length: 896
Set: 0 Binding: 12 Type: Texture Writable: N Length: 8
Set: 0 Binding: 13 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 14 Type: UniformBuffer Writable: N Length: 304
are not the same format as required by the pipeline shader. Pipeline shader requires the following bindings:
Set: 0 Binding: 1 Type: Texture Writable: N Length: 1
Set: 0 Binding: 2 Type: Texture Writable: N Length: 1
Set: 0 Binding: 3 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 4 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 5 Type: UniformBuffer Writable: N Length: 3712
Set: 0 Binding: 6 Type: StorageBuffer Writable: N Length: 0
Set: 0 Binding: 7 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 8 Type: Image Writable: Y Length: 1
Set: 0 Binding: 9 Type: Image Writable: Y Length: 1
Set: 0 Binding: 10 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 11 Type: UniformBuffer Writable: N Length: 896
Set: 0 Binding: 12 Type: Texture Writable: N Length: 8
Set: 0 Binding: 13 Type: Sampler Writable: N Length: 1
Set: 0 Binding: 14 Type: UniformBuffer Writable: N Length: 304
Set: 0 Binding: 15 Type: Texture Writable: N Length: 1
Set: 0 Binding: 16 Type: Image Writable: Y Length: 1
Set: 0 Binding: 17 Type: Image Writable: Y Length: 1
Set: 0 Binding: 18 Type: Image Writable: Y Length: 1
Set: 0 Binding: 19 Type: Texture Writable: N Length: 1
   at: (drivers\vulkan\rendering_device_vulkan.cpp:8010)

This seems to be a problem introduced with 4.0.3 and potentially on a cursory glance, could be from #76437?
Currently a major blocker for anyone using fog. Have not found any workaround.
Steps to reproduce

Create Scene 1 with Light, World Environment Camera.
Add a Sky (can be empty but must exist) and enable Volumetric Fog.
Create Scene 2 with the same, add Volumetric Fog.
Change from scene 1 to 2.

Minimal reproduction project
fog-uniform.zip

Duplicate of https://github.com/godotengine/godot/issues/77515?

Duplicate of #77515?

Yes, I think so.

Duplicate of #77515?

Yes, weird that didn't come up searching the error message / function.

Duplicate of https://github.com/godotengine/godot/issues/77515


Tech debt:  Remove context for mnemonics

Has this been resolved by https://github.com/dltxio/idem-mobile/pull/231 ?

Has this been resolved by #231 ?

Check with @xiangzhe0812


Fix ReadinessProbe: seperate readiness and liveness in the code

ref #9649

I'm going to run e2e on this before merge.

LGTM except that nit.
Can we have a e2e test to capture the initial failure? Of course that could be in a separate PR.

Fixed! I'll make an issue.

Thanks!

#9690

@k8s-bot ok to test

Also LGTM.

Kubernetes Bot ok to test