Add async completion support

The recent completion rewrite makes completion faster for a large number of cases, but it has a couple of issues:

Any completion provider that needs to make edits beyond the few we've special cased doesn't work correctly. Roslyn is looking to add more of these, such as https://github.com/dotnet/roslyn/pull/47511.
Completion providers that we do special case can be slow. Override and partial method completion in big types is painful, taking over a minute to show up sometimes.

To resolve this, I've added support for async edits by adding a new completion end point: /completion/afterInsert. It takes the item that was inserted, the file, and the new cursor position. It relies on the InsertText that was inserted still allowing for resolving the completion in the same way as before, so I had to force a few providers that don't behave well here to be eagerly resolved, regardless. I also kept import completion using the standard /completion/resolve step to resolve extra edits, as they don't need to modify the current cursor location at all.

@filipw @JoeRobich @david-driscoll I've opened this as a draft because I'm not 100% sure we actually want to take this. It'll require implementation work in every client as LSP does not support this. LSP can use the command field in a completionitem to trigger a custom command, but every editor client extension will have to know how to handle that. It certainly is much faster for many things though.
Pictures speak 1000 words, and animated gifs even more so.
Sync completion (the experience today):

Async completion (the experience with this PR):

Completion is getting better resolve support in 3.16.
https://microsoft.github.io/language-server-protocol/specifications/specification-3-16/#textDocument_completion

@david-driscoll better, but not good enough for our purposes. Unless they're planning on changing it, vscode only supports additionalTextEdits and detal/documentation fields for lazy resolve, not the main textEdit.

Because, to be clear, I do not like this code. It's a race condition waiting to happen. But the vscode lsp implementation does report textEdit as a resolvable property: https://github.com/microsoft/vscode-languageserver-node/blob/248560e74c9a715be59e62fdbdd554b87ddf8dba/client/src/common/client.ts#L1506-L1508.

command should be sufficient, however I don't know if there is a good logical flag for if an client supports it or not.

vscode: supports it via native commands
emacs: lsp-mode supports it here
eclipse: lsp4e supports it here
vim: I can't tell if vim-lsp supports it, my assumption is it does not.
cc @nickspoons has vim knowledge

There are many LSP clients for vim:

prabirshrestha/vim-lsp
neoclide/coc.nvim
autozimu/LanguageClient-neovim
dense-analysis/ale
upcoming native LSP in neovim
various others I haven't looked at

I flicked through a few of them and can't find any reference to this command parameter in any. But I don't know these code bases well at all.
As for OmniSharp-vim, we're not an LSP client so we can adapt 😁

I think since this is based on a request flag, there is absolutely no problem in adding this and thus giving more advanced clients an option to use a superior approach for extra edits

I think since this is based on a request flag, there is absolutely no problem in adding this and thus giving more advanced (more O# protocol aware) clients an option to use a superior approach for extra edits

Note, I think I can (and probably should) make this a startup flag for omnisharp instead, so LSP clients that support the command parameter could map it appropriately.

I love this.

In fact, I think this is a must if Omnisharp and VSCode needs any chance to be feasible instead of Visual Studio.

@333fred what are the next steps for this? Can it be marked as a real PR instead of a draft?
I think this is super important.

@ffMathy I'm really not happy with this code and think it's very likely to result in a subpar experience, which is why I haven't moved forward with it yet.

@333fred I hate how the gulp command swallows errors. You can get the error locally by running tsc -p ..
~/Source/omnisharp-vscode [auto-doc-gen +0 ~2 -0 !]> tsc -p .
test/integrationTests/documentationCommentAutoFormatting.integration.test.ts:6:1 - error TS6133: 'skip' is declared but its value is never read.

6 import { skip } from 'rxjs/operators';
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error.

What can be done to help though? The current experience is insanely slow (as seen in the first GIF).

What can be done to help though? The current experience is insanely slow (as seen in the first GIF).

Frankly, I'm not certain. There's an inherent race condition with this PR and we really can't do anything to solve it.

Hmm, but how does the full Visual Studio do it then? It manages to be much faster in terms of completions and suggestions.
I think it's crucial to get to the same speed for larger projects. Is this still the plan abd/or vision?

Similarly one could ask, how does TypeScript do it? It also remains super fast for very large projects.
Could we get inspired by it?

Hmm, but how does the full Visual Studio do it then?

VS has native support for this operation. VS Code does not have support for this type of asynchronous completion, and thus this remains a hack around functionality that VS Code does not have.

Similarly one could ask, how does TypeScript do it? It also remains super fast for very large projects.

Typescript doesn't do this type of operation, so they don't have to be fast for it :)

Thank you for answering my questions so far.
Is there an issue in the VS Code repo for supporting this type of async operation?

I've talked with @jrieken about it before, I'm not sure if there is any specific issue open about making TextEdit asynchronously-resolvable.

I made an issue (#112527) for it now.

I made an issue microsoft/vscode#112527 for it now.

I have closed the issue as out-of-scope and this is why: accepting a completion is a synchronous operation and no further blocking or waiting can happen. You have to assume that users are typing and that typing has accepted a completion. Needing to asynchronously resolve the text edit would mean that we (a) block typing or (b) employ some kind of OT strategy which inserts the text edit when resolving. Option (a) is not possible because you don't block in JS and (b) is complex to implement and yields in a subpar experience, e.g when I accept a completion I wanna see it now, not after a delay.

(b)... yields in a subpar experience, e.g when I accept a completion I wanna see it now, not after a delay.

FWIW, and I've brought this up before (though not in talking with you Johannes) I fundamentally disagree with this assertion. The experience today is subpar because bringing up the completion list takes 10+ seconds in these complex cases due to the nature of how we need to calculate the changes up front for every single completion in the list. I'd much rather have a 100 ms delay after insertion, rather than a 10+ second delay on bringing up the list.

@333fred indeed. The current experience is simply unusable. Not just for the average user - for everyone.
 This is across all kinds of solutions that are just a little bigger than the average Hello World example (multiple projects, dependencies, etc).
The current project I have is only 7000 lines of code. Visual Studio can produce suggestions instantly. In VS Code, it takes me 10+ seconds(!!!) for the completions to arrive. But completions is not the only thing. Also errors and warnings pop up very late.
@jrieken I agree blocking is probably not the option. That's why many people love VS Code in the first place in favor of Visual Studio for every other language than C#. However, whatever solution we end up with, it can't possibly be worse than the current state of things, and in that, I agree with @333fred.

I think it's as simple as asking "does anyone want 10+ seconds of wait time for sguiggly error lines and/or warning lines to disappear, and the same wait time for waiting for completions and code-fixes?"
The answer would clearly be no. What we have now is essentially Notepad with syntax highlighting, because of that wait time.
And don't get me wrong. Omnisharp and VS Code are great. Just slow. The feature set is amazing and an excellent piece of work. I just think it's a waste when it doesn't get the opportunity to be used on a larger scale.
It's almost like an API that presents an amazing feature, but doesn't have documentation for it.

This seems to be turning into a random rant. I am out of here

@jrieken it is not a rant. I am providing observations and arguments for discussion.
What is it that makes you think it is a rant, and not a civil discussion between engineers?
What part of my arguments sound offensive? I'm really sorry if that's your impression of anything I have said. I literally just praised VS Code too 🤷♂

And whether or not you see it as a rant, it's still an important issue to discuss. I feel backing out of it would be backing out of any form of responsibility over the project.

But completions is not the only thing. Also errors and warnings pop up after the same duration.

This is where it turned into a rant. Diagnostics use a push model, it's up to omnisharp to push diagnostics into VS Code. If that takes 10+ sec than that's your problem. Apart from the fact that diagnostics has nothing to with this discussion

@ffMathy I think you are being too negative.

What we have now is essentially Notepad with syntax highlighting, because of that wait time.
And don't get me wrong. Omnisharp and VS Code are great. Just slow.

I have been working with VS Code and Omnisharp for 4 years.  I have seen bugs and improvements and regressions over this period. That said, I will never boot Windows again and work with Visual Studio. I really don't like that environment and I am much more productive using VS Code and Omnisharp.
@jrieken has been focussing on performance for VS Code for a very long time. Just saying it's slow and unusable, is a bit of an exaggeration and honestly not really fair. VS Code feels much snappier in a lot of use cases.

But completions is not the only thing. Also errors and warnings pop up after the same duration.

This is where it turned into a rant. Diagnostics use a push model, it's up to omnisharp to push diagnostics into VS Code. If that takes 10+ sec than that's your problem. Apart from the fact that diagnostics has nothing to with this discussion

Well @jrieken forgive my ignorance then, but I don't know how VS Code's internal code works. I am experiencing that wait time, but I did not know that it was "my own problem" - how could I? I thought they were connected because of similar durations.
Thank you for the insight! :pray:

@ffMathy I think you are being too negative.

What we have now is essentially Notepad with syntax highlighting, because of that wait time.
And don't get me wrong. Omnisharp and VS Code are great. Just slow.

I have been working with VS Code and Omnisharp for 4 years.  I have seen bugs and improvements and regressions over this period. That said, I will never boot Windows again and work with Visual Studio. I really don't like that environment and I am much more productive using VS Code and Omnisharp.
@jrieken has been focussing on performance for VS Code for a very long time. Just saying it's slow and unusable, is a bit of an exaggeration and honestly not really fair. VS Code feels much snappier in a lot of use cases.

@tverboon ah yes. By saying "Omnisharp is slow" I meant completions alone, because that was what we were talking about, and because completions is such an essential part of any form of IDE. That is indeed generalizing too much, and I am sorry about that. Omnisharp is VERY responsive about anything else than completions (and warnings/errors for me only apparently) :pray: ANd that's why I (and many other developers) want to move to VS Code in the first place.
As a software developer myself, I understand how it can be a big blow to receive negative feedback about a subject which has been greatly improved over the past years. That's also why I mentioned that I love VS Code, and Omnisharp, and its feature set.
However, objectively from a user's perspective, "faster" is not enough. It (completion suggestions) needs to be "fast enough", and it currently isn't. And that's what is stopping many developers (who I have talked to) from making the jump away from VS into VS Code.
I hope that clears things up. It was honestly never my intent to rant about anything, although I understand how it may have been perceived as negative ❤

By saying "Omnisharp is slow" I meant completions alone, because that was what we were talking about, and because completions is such an essential part of any form of IDE.

Which raises the question why are completions show. Sure, it's easy to blame the API but then I say that TS and Java, which use the same API, are fast

By saying "Omnisharp is slow" I meant completions alone, because that was what we were talking about, and because completions is such an essential part of any form of IDE.

Which raises the question why are completions show. Sure, it's easy to blame the API but then I say that TS and Java, which use the same API, are fast

Yes, indeed. I was not trying to play a blame game here. I was simply trying to provide more insight.
I must have failed at that, and I am truly sorry.
However, I don't think anyone are really pointing fingers here. Yes, the experience is slow. That's all I know, because I'm just the "user". I don't know where the "blame" is, and I don't really care.
I originally just wanted to show the support for @333fred's PR, which I think solves one of the biggest issues of VSCode/Omnisharp/Roslyn (or where ever the "problem" is) right now.
And from what I can gather, @333fred isn't blaming anyone either. From what I understand with my limited experience within this repo, he argues that the he isn't proud of the current proposed solution, and that to solve it, VS Code needs a new set of features in its API. There is no implicit "blame" here.
Sure, it's a valid argument to say that Java and TS don't have the same problem (which I actually also made further above in the comments), but like @333fred told me, those are also different ecosystems with different requirements.
Either way, we have a problem here in the C# context. That may not be VS Code's "problem", and perhaps not even Omnisharp or Roslyn's problem, but it is certainly a problem for the users either way, despite whatever KPI is present or who is to "blame" 🤷♂
What I do hear you saying @jrieken is that it's not worth the effort though? On behalf of myself and many other C# developers who are looking for faster completion times, that's a bummer. But it's definitely an okay response. I don't know the kind of effort that's required, so I respect that decision.

What I do hear you saying @jrieken is that it's not worth the effort though?

No, what I say is that we considered async text edits for completions and discarded the idea as not feasible. Now it's on the extensions to improve. Tho, having said that we DO have additional text edits and a best effort approach to apply them async, after making the main edit. See this doc

Tho, having said that we DO have additional text edits and a best effort approach to apply them async, after making the main edit.

Yes, this is how import completion works in omnisharp today (and in TS, I believe). The issue with override completion is that the expensive part is calculating the minimum text necessary for the argument types and what the auto-inserted base call should look like. These edits intersect the current cursor location, and indeed where the cursor should finally end up is based on this calculation. This means that additionalTextEdits is not suitable, as we cannot control the cursor location or intersect the cursor location.
There's other types of completion that become impossible or very hard to do well without asynchronicity. I know that rust-analyzer has brought this up in the past as well, where they want to have a match completion that rewrites the current expression and returns a snippet, but they, like us, don't want to do the expensive part of that calculation unless the user actually wants the completion. Roslyn is also starting to add these types of completions, and in order to keep general completions responsive in O#, I'm going to have to block them. Either that, or try to work around vscode's limitations and provide a significantly worse experience than vscode could do natively, as I fundamentally cannot resolve this race condition in an extension.

@jrieken does @333fred's above elaboration make the idea more "feasible"? :pray:

@jrieken does @333fred's above elaboration make the idea more "feasible"? :pray:

@filipw any more comments?

@filipw what's the next step?

it failed the last test run, I've enabled auto merge now

@333fred congrats on getting this out, and thank you for making it happen! :heart_eyes:
When can this be enabled, and how?


EVALSHA broken when a master node goes down

My setup:

50 master nodes; each with 2 slaves making it 150 nodes in total
Lettuce 4.2.2 with some internal patches:
+ Make EVALSHA intent READ so we can utilize a slave node to read (our Lua script is strictly reading, no writing)

Add some debugging log here: https://github.com/mp911de/lettuce/blob/4.2.x/src/main/java/com/lambdaworks/redis/protocol/CommandHandler.java#L211 (after command.complete() within the try block

READFROM is our custom implementation which takes a random node
RedisClusterClient timeout is 300 ms
RedisClient is wrapped with a retry policy that retry 10 times.

Problem: When a master node goes down (let us call it M1 and its 2 slaves S1 and S2), when a request for EVALSHA hits either of M1, S1 or S2, it will always timeout with RedisCommandTimeoutException. I expect the call to M1 to timeout but on retry, RedisClusterClient calls S1 or S2 and even though the call return with proper response and I can see in CommandHander, command.complete() is called, Lettuce would just timeout and unable to retrieve the result.
Here is some log:
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) XXX : Running lua script for RedisRangeQueryRequest(scanForward=false, pageSize=3, previousKey=, previousValue=, fastMode=false, numberOfSameScoreItemsThreshold=50) against the Redis key 1:1/1/AAA
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.RedisChannelHandler: dispatching command AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command] with args 1:1/1/AAA
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.cluster.PooledClusterConnectionProvider: getConnection(READ, 11598)
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.cluster.PooledClusterConnectionProvider: Returned connection for (READ,11598) is [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379]
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Command wrtten: ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=1:1/1/AAA
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write() writeAndFlush command ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=1:1/1/AAA
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write() done
02 Dec 2016 13:41:27,638 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.AbstractRedisAsyncCommands: Dispatched to the underlying connection Command [type=EVALSHA, output=ValueOutput [output=null, error='null']]
02 Dec 2016 13:41:27,638 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write(ctx, ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=1:1/1/AAA, promise)
02 Dec 2016 13:41:27,638 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Received: 33 bytes, 1 queued commands
02 Dec 2016 13:41:27,638 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Queue contains: 1 commands. Processing ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=1:1/1/AAA
02 Dec 2016 13:41:27,638 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Received response for ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=1, arg=1:1/1/AAA
02 Dec 2016 13:41:27,915 [DEBUG] 00eaef77-f926-4a88-bb54-a357ab82c63c (pool-1-thread-8963) com.lambdaworks.redis.cluster.PooledClusterConnectionProvider: Returned connection for (READ,11544) is [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379]
02 Dec 2016 13:41:27,915 [DEBUG] 00eaef77-f926-4a88-bb54-a357ab82c63c (pool-1-thread-8963) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Command wrtten: ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=0:7920:d
02 Dec 2016 13:41:27,915 [DEBUG] 00eaef77-f926-4a88-bb54-a357ab82c63c (pool-1-thread-8963) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write() writeAndFlush command ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=0:7920:d
02 Dec 2016 13:41:27,915 [DEBUG] 00eaef77-f926-4a88-bb54-a357ab82c63c (pool-1-thread-8963) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write() done
02 Dec 2016 13:41:27,915 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write(ctx, ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=0:7920:d, promise)
02 Dec 2016 13:41:27,915 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Received: 5 bytes, 1 queued commands
02 Dec 2016 13:41:27,915 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Queue contains: 1 commands. Processing ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=0:7920:d
02 Dec 2016 13:41:27,915 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Received response for ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=1, arg=0:7920:d
02 Dec 2016 13:41:27,938 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.RedisChannelHandler: dispatching command AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command] with args 1:1/1/38132768605
02 Dec 2016 13:41:27,938 [DEBUG] ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62 (pool-1-thread-8977) com.lambdaworks.redis.cluster.PooledClusterConnectionProvider: getConnection(READ, 11598)

The request id that runs on my main thread is ee7a2eb7-cd0b-4b7c-ba24-a9fcda448d62. Last log line indicates the EVALSHA request is retried (there are 9 other segment of logs similar to this but i am just pasting the first one).
The Redis node being queried here is <IP_ADDRESS>, which is S1. M1 went down about a couple of seconds before this request came in our server.
You can see the log line "Received response ...", which is a log statement i added after line 211 here https://github.com/mp911de/lettuce/blob/4.2.x/src/main/java/com/lambdaworks/redis/protocol/CommandHandler.java#L211 .
Another interesting thing is in between, we have a request for a HGET (02 Dec 2016 13:41:27,915), which is in between retries, to the same node and it is working fine.
There are many other instances of this with different combination where the sequence of retries differ, such as M1 -> S2 -> S1 -> M1 or S1 -> M1 -> S2 ..., all result in failures after 10 retries
Another interesting fact is that i randomly see failures once in a while (3 to 5 every hour or two) with EVALSHA where all nodes are queried as part of retry but it never succeeds. I wonder if it is due to the same issue and the fact that a master node goes down makes it much worse (2000+ failures every 5 minute)
Any help would be greatly appreciated.
Thanks,

Thanks for digging into CommandHandler. An available/unreachable node doesn't matter much once PooledClusterConnectionProvider returns a connection. The cluster facade uses individual connections under the hood that run separate queues and TCP connections. I see from your log that lettuce works normally and Redis responses commands are executed in (sub) millisecond time ranges.
So there's nothing unusual here. EVALSHA is marked as read-only allowed command since lettuce 4.3.0 (see #366).
Which API are you using (the synchronous or asynchronous)? Do you have a bit of code how you use lettuce? Mainly command invocation. I didn't fully understand what you mean with

RedisClient is wrapped with a retry policy that retry 10 times.

Is it something like
for(int i=0; i < 10; i++) {
  try{
    return redis.evalsha(…);
  } catch (RedisException e){
    // ignore
  }
}

I am using the sync API.
Yeah, the code more or less looks like what you have.
It does not make sense to me either looking at the code and the log but it is in fact happening. Not sure how to debug further. Is there any more logging we can add to help with this?

There are a couple of things you could do:

Use the async API and inspect the thrown exception (connection.async().evalsha(…).get(300, TimeUnit.MILLISECONDS)
It's a ClusterCommand that has a special complete handling. You could make sure that super.complete() is called (see ClusterCommand.java:53
Inspect the data that is returned by Redis. The debug log shows the outgoing payload but the result of the command is not in the logs (see CommandHandler.java:194). Payload logging creates severe additional load but you could limit it to EVALSHA inside the decode loop (if (command.getType().name().equals("EVALSHA")))

Are you suggesting there was a MOVED or ASK response coming back from Redis? There was no slot migration going on at that time so i am not sure if that is true.
is Lettuce not able to handle that case when there is a MOVED or ASK response?

I suggest checking every step that is on the way towards command completion to find out why commands fail although they receive a completing response.

So i took another look at the log. Seems like the root issue here is the connection to the new master node is somehow stale; or commands written to it seem to be lost.
To summarize:

We have M1, S1 and S2
M1 went down
S1 got promoted to be new-M1
S2 asks for a full-sync from S1 or new-M1
M1 kick offs background dump of its data
Data fully sync'ed in S2

Now, between 5 and 6 (about 8 minutes), HGET to S2 works just fine. EVALSHA to S2 got re-routed to new-M1 (either with MOVED or ASK, not sure which one). Lettuce, when it got the MOVED or ASK, writes the command to the existing connection to new-M1 (or S1) and it seems like there is no response coming back at all.
Only when the background save is done, i would see this in the log
02 Dec 2016 13:44:04,045 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] Received response for ClusterCommand [command=AsyncCommand [type=HGET, commandType=com.lambdaworks.redis.protocol.Command], executions=1, arg=0:2188:d
02 Dec 2016 13:50:36,855 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] channelInactive()
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] deactivating channel handler
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] channelInactive() done
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.ConnectionWatchdog: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] channelInactive(ChannelHandlerContext(ConnectionWatchdog#0, [id: 0x80fc6c70, L:/<IP_ADDRESS>:42118 ! R:/<IP_ADDRESS>:6379]))
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.ConnectionWatchdog: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] scheduleReconnect()
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.ConnectionWatchdog: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] Reconnect attempt 1, delay 1ms
02 Dec 2016 13:50:36,856 [DEBUG]  (lettuce-nioEventLoop-4-77) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x179, channel=0x80fc6c70, /<IP_ADDRESS>:42118 -> /<IP_ADDRESS>:6379] channelUnregistered()
02 Dec 2016 13:50:36,933 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, [id: 0x9f6314e7] (inactive)] channelRegistered()
02 Dec 2016 13:50:36,949 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] channelActive()
02 Dec 2016 13:50:36,949 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] moveQueuedCommandsToCommandBuffer 0 command(s) added to buffer
02 Dec 2016 13:50:36,949 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] activateCommandHandlerAndExecuteBufferedCommands 1245 command(s) buffered
02 Dec 2016 13:50:36,949 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] activating channel handler
02 Dec 2016 13:50:36,949 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] flushCommands()
02 Dec 2016 13:50:36,950 [DEBUG]  (lettuce-nioEventLoop-4-165) com.lambdaworks.redis.protocol.CommandHandler: [chid=0xb5, channel=0x9f6314e7, /<IP_ADDRESS>:37464 -> /<IP_ADDRESS>:6379] flushCommands() Flushing 1245 commands
Out of 72 hosts that run Lettuce clients, about 1/2 would have this issue and the other hosts can query from new-M1 just fine so i think this is more a client side issue, not Redis.
Do you have any insight on why this is happening? could it be a problem with the way the role of the connection to S1 has been changed (slave --> master)?
Thanks,

It seems like all EVALSHA requests on a slave node is re-routed to the master node, which is why we saw HGET going through and not EVALSHA (because HGET was successful on the slave node while all requests to the new-master node were just dropped).
So, i think we've narrowed down the problem to a connection to the newly-elected master where requests to this connection somehow do not make it to Redis. I have topology refresh turned on and can see new connection being spun up from the host to the new master node working just fine (the commands are CLIENT and CLUSTER).
Any suggestion on what the next step should be?

Thanks for further investigation. I think it's important now to find out more about the flow of the redirected command. So when EVALSHA gets redirected, it's re-attempted on a (very likely) different connection. Both redirection -MOVED and -ASK provide a connection point of the target where the client should retry the command. This can be either an existing connection (because it was already used before) or a new connection.
This also means that you should be able to find the redirected command in the logs where it's retried with a different connection. Tracing these connections can be a hassle but you could introduce a command counter (command Id) in ClusterCommand for the purpose of tracking a particular command.
Something like:
class ClusterCommand {

    private static final AtomicLong counter = new AtomicLong();

    private final long commandId = counter.incrementAndGet();

    // ...

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [command=").append(command);
        sb.append(", commandId=").append(id);
        sb.append(", redirections=").append(redirections);
        sb.append(", maxRedirections=").append(maxRedirections);
        sb.append(']');
        return sb.toString();
    }

Here is the log that shows a re-direct
02 Dec 2016 13:45:43,414 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] write(ctx, ClusterCommand [command=AsyncCommand [type=EVALSHA, commandType=com.lambdaworks.redis.protocol.Command], executions=0, arg=0:1/1, promise)
02 Dec 2016 13:45:43,415 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Received: 32 bytes, 1 queued commands
02 Dec 2016 13:45:43,415 [DEBUG]  (lettuce-nioEventLoop-4-78) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x17b, channel=0x1f4ddb6f, /<IP_ADDRESS>:46637 -> /<IP_ADDRESS>:6379] Queue contains: 1 commands.  Then, Lettuce got a MOVED that point to the new master node (channelId = 0x9f92cc2f and IP <IP_ADDRESS>). The requests that go to this WRITE connection (as well as the READ connection) seem to never finish after the slave promotion. Cluster topology refresh seems to be able to connect to the new master node and got a response back with no issue. Some other hosts seem to work fine as well (about 1/2 of the hosts in the fleet would have this issue)

Note that i also opened an issue against Redis for not being able to run read-only Lua script on slave nodes https://github.com/antirez/redis/issues/3665

That's interesting. So an existing connection to the slave S2, which gets promoted to master seems to cause the issue. The command is written to the connection but the command does not receive a response.
Can you reproduce that behavior with redis-cli?

I cant reproduce with redis-cli
Here is the sequence of events:

M1 - S1 - S2
Lettuce has 2 READ connections to S1, C1 and C2. C2 is what get returned by PooledClusterConnectionProvider (not sure how C1 ever got created in the first place. Note that C1 is not used by cluster topology refresh task)
M1 went down
S1 got promoted to be M
Topology refresh occurs, new topology took effect
Lua script execution went to S2; got re-directed to S1, new M
PooledClusterConnectionProvider now returns C1 for Write intention
Execution is successful for 2 evalsha requests
Next request for ZCARD comes in. PooledClusterConnectionProvider returns C1 for READ intention
All subsequent requests to C1 never got any response back

I should also note that our Redis cluster is configured to kill idle connection after 60 seconds of inactivity. C1 had been coming in and out of channelActive()/channelInactive() state every minute before it got the first evalsha request. Every time it gets into channelInactive(), the ConnectionWatchDog's previously scheduled reconnection task kicks in and reconnect immediately.
Now, I see that between the last successful evalsha and the next unsuccessful ZCARD request, it was about 85 seconds. However, i did not see any channelInactive() event coming in. My current theory is somehow the inactive() event was not received properly on the client side (dropped packet ...) or there is some exception thrown in the channel pipeline, before it gets to CommandHandler
Do you have any suggestion on how to detect when a connection goes bad and trigger a manual reconnection? I was thinking of adding a ChannelHandler that detects when the diff b/w the last channelRead() and channelWrite(), and if this time is more than a configurable period of time, close the channel. Will that work? will that cause the connection to be completely closed and not reconnected?
Thanks,

Thank's for the awesome detailed analysis. Connection lifecycle signals follow the TCP packets that come with lifecycle changes. If a TCP packet with FIN or RST bits is received by the client, then the connection is reset (connection reset by peer) or closed (regular closed). RST packets are sent by the server when a client is sending a packet to a closed port.
Please be aware that PooledClusterConnectionProvider returns different connections for read and write intentions.
You can plug a LoggingHandler into netty's pipeline as the first handler to enable really detailed logging of the channel activity. Having a time window of 85 seconds is very little to inspect what's going on but at least it's reproducible.
At the moment I don't have any clue besides further logging and inspection what happens on the channel. Additionally, you could TCPdump (or better, use Wireshark) on the server-side to inspect the traffic between the client and the newly elected master.
I will attempt to reproduce the issue on my side. I don't know the cause why the client either doesn't get an answer or the received data doesn't get processed.
/cc @badboy @itamarhaber: Have you seen a similar issue where connection traffic gets stuck after slave to master promotion in Redis Cluster?

I did not run Cluster for anything other than testing yet, where I never experienced such an issue. Itamar might know more or @antirez himself.

@long-xuan-nguyen I tried to reproduce the issue by using create-cluster start/create-cluster create and killing the master to trigger failover. Slave to master promotion works quite well but I wasn't able to reproduce the command getting stuck.
The only kind of error I could reproduce was CLUSTERDOWN The cluster is down which self-healed after a few seconds.

Any update on this ticket?

Hi there,
So i turned on a little more logging to help debugging this issue. I saw this happening again yesterday. This time, there was no change in topology; i.e: all nodes were performing just fine.
Here is the sequence of events that happened:

Channel to a Redis node initialized
WRITE's to this channel went thru successfully. Everything was good for about a day and a half
Then, there is no WRITE requests for this channel for a consecutive 60 seconds. Redis configuration is to kill idle connection after 60 seconds.
The connection got killed from the server.
In the log, i can see this:

29 Dec 2016 17:44:37,302 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] channelInactive()
29 Dec 2016 17:44:37,302 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] deactivating channel handler
29 Dec 2016 17:44:37,302 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] channelInactive() done
29 Dec 2016 17:44:37,302 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.ConnectionWatchdog: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] channelInactive(ChannelHandlerContext(ConnectionWatchdog#0, [id: 0xe7237817, L:/<IP_ADDRESS>:44110 ! R:/<IP_ADDRESS>:6379]))
29 Dec 2016 17:44:37,302 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.ConnectionWatchdog: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] Reconnect scheduling disabled
29 Dec 2016 17:44:37,307 [DEBUG] (lettuce-nioEventLoop-4-59) com.lambdaworks.redis.protocol.CommandHandler: [chid=0x51, channel=0xe7237817, /<IP_ADDRESS>:44110 -> /<IP_ADDRESS>:6379] channelUnregistered()
See that "Reconnect scheduling disabled" is printed. i took a heap dump and can see that in ConnectionWatchDog, listenOnChannelInactive is true but reconnectionHandler.reconnectSuspended = false.
Also note that clientOptions.isSuspendReconnectOnProtocolFailure = false.
This indicates ClusterNodeCommandHandler.prepareClose() must have been called by PooledClusterConnectionProvider.reconfigurePartitions() previously. However, it doesn't explain why the channel is still open up until this point. Am I missing something?
FYI, i see that ConnectionWatchDog.setReconnectSuspended() does not make use of the parameter. It blindly calls reconnectionHandler.setReconnectSuspended(true). I was hoping there was some code that would call reconnectionHandler.setReconnectSuspended(false) but couldnt find any. Is there some code hidden behind reflection somewhere?

listenOnChannelInactive=true and reconnectSuspended=false is the normal operation state. After channelUnregistered the connection is closed and no longer functional. Usually, it's cleared then also by the garbage collector. Currently, I don't follow why you consider this connection open.
prepareClose is called either by stale connection cleanup (PooledClusterConnectionProvider.reconfigurePartitions()) or as part of the connection close sequence.
If fixed the parameter issue, thanks for the hint.

i am sorry ; i meant listenOnChannelInactive=true and reconnectSuspended=true.
As a result, when the connection is killed on the server side, no reconnection is re-scheduled, causing all writes to the connection to go into buffer.

any idea how this could happen?
Thanks,

I have no clue how these things happen with the given context. At this stage, the ticket scope gets quite unclear and I don't have any idea how to continue.

Sorry if this has been confusing. I'll break it down.
The issue is that for some reason, ConnectionWatchDog CommandHandler that is associated to a master node is no longer schedule reconnection anymore.
Here is my setup: Redis server-side is set to kill idle connection every 60 seconds.
A connection to a master node has been working fine for a day and have regular writes going out successfully. Then during low traffic time, the connection get killed by Redis. My expectation is that the ConnectionWatchDog for that ClusterNodeCommandHandler should reconnect but I see in the log that "Reconnect scheduling disabled". As a result, all future writes to this ClusterNodeCommandHandler ends up in the buffer. I took the heap dump when this occurs and upon looking at the heap dump, I see that ConnectionWatchDog.listenOnChannelInactive == true and ConnectionWatchDog.ReconnectionHandler.reconnectSuspended == true. Now, the only instance this would happen is when ClusterNodeCommandHandler.prepareClose() has been called, based on the code.
I am not sure if there is any other instance when this happens and I am unable to root cause. Would you be able to have some insight into this issue or if there is any workaround? I was thinking to not even look at isReconnectSuspended() in ConnectionWatchDog to let it always schedule the reconnection. Would appreciate your thoughts on this.
Thanks,

I found a possible leak in #443 which builds the stale connections list twice. It's possible #443 could play into this issue.

Closing this one as this issue seems resolved.


[Android] Fix same style overlapping on itself

Related Issue
Fixes #6299
Description
Regression
The defined behaviour for styles states that if a parent container and a child container share the same style, then the child style should not be applied at all, this logic was removed in a previous commit provoking cards such as "v1.0/Scenarios/WeatherLarge" to render in a wrong way.
Sample Card
v1.0/Scenarios/WeatherLarge.json
How Verified
Visual verification

Microsoft Reviewers: Open in CodeFlow

/azp run AdaptiveCards-.NET-PR


Detect and delete false positive mistake

User story: as a user I want to detect false positive mistakes
Given: I uploaded a file
When: I am looking at mistakes that API gave to me
Then: If provided mistake sentence is actually wrong, then i could send feedback to API about that
Create a sign near each mistake. After clicking this sign the mistake must be removed from the list and marked as false positive mistake (for sending info about that to API creator if necessary)

The detection completed


verbose logging in grok_exporter?

First, thanks for creating and maintaining this tool.
Forgive my lack of knowledge, but I am looking if there is an easy way to give a --verbose flag to the tool, (or --debug, or --trace) which can help me debug my configuration when I am working on the matchers.
thanks in advance!

Unfortunately there is no good verbose option right now.
If you want to debug grok pattern, there are multiple grok pattern test websites on the Internet where you can test a pattern and example log lines.
For debugging within grok_exporter itself, the best way to debug is to look the grok_exporter_lines_matching_total built-in metric. I am currently working on improving this (branch built-in-metrics-improvement), but that's work in progress.

Thanks for the update @fstab. Looking forward to improved debug/logging abilities later :)


NPSP Settings "Donations" section is not properly formatted

The NPSP Settings Donation section UI is misaligned and there are spaces between some of the section labels.

Steps to Repo:

Log into an org with NPSP installed
Click on NPSP Settings.
Click on Donations, and notice sub-sections have gaps per image.

**lurch: add

Tracking W-031685

Only appears this way when CRLPs are enabled. It's due to the outputlink tags not being entirely hidden when display:none is applied when CRLPs is enabled. It was until recently. This is almost certainly a core change in rendering. No changes have happened to this section of the code in 7 months.

W-7782877

Please follow this Known Issue in the Trailblazer Community for updates.


ipt "github.com/coreos/go-iptables/iptables" not found

I want to parse a full iptables-save using your go lib. I see the example and figure I will need the go-iptables modules. but that's not available. Essentially,  I wanted to use your lib to run it over a dumped iptable which has bunch of chain and rules. I see that parser.go can do it. But I am unsure what to do to load the table dump. Any pointer will be appreciated

Sorry for the long response time. Could you resolve the issue? I am not sure if I understand your problem. In the example code, we use CoreOS' iptables package to get the dump.


[ROCm] Adding support to depthwise_conv_op

This PR adds ROCm support for the depthwise_conv_ops
The changes in this PR are mostly trivial, please review and merge.

Notes:

CNN for double datatype is not yet supported in ROCm, therefore dtypes.float64 is ignored
Test passed: //tensorflow/python/kernel_tests:depthwise_conv_op_test

All but testDepthwiseConv2DInputGradFormat and testDepthwiseConv2DFilterGradFormat failing on CPU for Depthwise convolution on CPU is only supported for NHWC format

@tatianashp @whchung @chsigg

In responding to @chsigg's question,

Everything run fine except testDepthwiseConv2DFilterGrad and testDepthwiseConv2DFilterGradFormat. Those two tests are failing due to format unsupported from CPU side.
Since ROCm does not satisfy #if CUDNN_VERSION >= 7000. use_cudnn_grouped_conv_  is always false. I'm fairly confident that LaunchDepthwiseConvOp always runs the local TF kernels so test coverage is good.

It does look like though it is assuming 32 lanes per warp, eg here. @whchung I don't have enough background to tell what impact this assumption has on AMD Gpus, mind taking a look and remind me what I should do for the default 32 lanes per warp?

It does look like though it is assuming 32 lanes per warp, eg here. @whchung I don't have enough background to tell what impact this assumption has on AMD Gpus, mind taking a look and remind me what I should do for the default 32 lanes per warp?

I think the reason is because kCudaWarpAll is defined as 0xffffffff so warp voting function would also only activate at most 32 threads on AMD hardware.

@chsigg I synced with @whchung offline and we agree that the assumption on 32 lanes per warp to be addressed al-together in future PR, together with kGpuWarpAll here. Testing wise this kernel is doing well in my ROCm machine. Let me know if you have further feedbacks.

@jerryyin
can you amend the PR to also enable ROCm support in the tensorflow/core/kernels/depthwise_conv_grad_op.cc file. :)
thanks
deven

A gentle ping @chsigg

@rthadur can we merge this PR in?


refactor(configs): Move the update_args function from the Config struct into the CliArgs

Description
Make the Config the main settings container instead of CliArgs. and refactor the code
Motivation and Context

Fixes: #61

How Has This Been Tested?

By running cargo t --lib, all the tests are passed
By run cargo r -- --help and cargo r -- plz --help, it gives me the expected output
By using the  --no-version and --no-help flags

Types of Changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation (no code change)
[x] Refactor (refactoring production code)
[ ] Other

Checklist:

[x] My code follows the code style of this project.
[x] I have updated the documentation accordingly.
[x] I have formatted the code with rustfmt.
[x] I checked the lints with clippy.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

Codecov Report
Patch coverage: 89.90% and project coverage change: +0.46 :tada:

Comparison is base (bed5192) 80.85% compared to head (60cef1f) 81.30%.

:exclamation: Current head 60cef1f differs from pull request most recent head 8fe6ee9. Consider uploading reports for the commit 8fe6ee9 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   80.85%   81.30%   +0.46%
==========================================
  Files          14       14
  Lines         595      572      -23
==========================================
- Hits          481      465      -16
+ Misses        114      107       -7

Impacted Files
Coverage Δ

src/helper/docs/mod.rs
0.00% <0.00%> (ø)

src/lib.rs
75.00% <62.50%> (+10.00%)
:arrow_up:

src/cli.rs
83.34% <92.11%> (+11.34%)
:arrow_up:

src/helper/args/mod.rs
97.06% <96.16%> (-1.10%)
:arrow_down:

src/config.rs
94.12% <100.00%> (+3.96%)
:arrow_up:

src/helper/docs/cheat.rs
70.22% <100.00%> (+0.65%)
:arrow_up:

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

Let me know when this is ready for review 🐻

A couple of things:

can you fix the spellchecker config so that CI doesn't fail?
PR title (thus the commit message) is extremely long, can we limit it to 85 characters or less?

can you fix the spellchecker config so that CI doesn't fail?

Looks like the spellchecker has a problem with the ser module name, IDK how I can fix that

can we limit it to 85 characters or less?

89 characters are good?

Sorry I messed up the commit history while I trying to fix the typo in https://github.com/orhun/halp/pull/62/commits/2f2ccc0cd87313f671591594fd5f31ab181d7914 commit

Hey @0x61nas I just realized --check doesn't work after this, can you check?

Oh, I didn't notice that. I'll fix this issue quickly as I can


Unity Theme

A beautiful rounded edge dark themed Window, Output & More!
Yes yes we do not use icons around here...

check carefully if Window.Code interferes idk or if it is outdated

Use rbxmx file format.


Add issue template for Pages/Zendesk user, role, and org sync

This is part of cloud-gov/pages-core#4246
Changes proposed in this pull request:

Add starting point template

security considerations
None. This is an issue template documenting an operational task.

@svenaas just added my portion.


Extensible STS with Razor pages

Similarly to what we did on #225 and #263, I believe the STS project should be converted to a Razor Class Library so that it could be easy 1) to plugin the STS into an existing IS setup, instead of the quickstarts provided by IS, and 2) to extend or override the page behavior with custom logic and presentation.
An additional .App project could be provided for users who only want to deploy the stock behavior.

Great idea @Brice-xCIT - I will do it later.


[Bibdata] RSolr::Error::Http: RSolr::Error::Http - 404 Not Found
Error:     Not Found
URI: http://lib-solr.princeton.edu:8983/solr/catalog/update?wt=json
Request Headers: {"Content-Type"=>"application/json"}
Request Data: "{"delete":["6494462","6899579","6930354","6931691","6932449","9931094","9997642","9997647","9997650","10248052","10248054","10248057","10248059","10248060","10248062","10248063","10248066","10395268","10463973","10464656","10777603","112252...

Backtrace
line 121 of [PROJECT_ROOT]/lib/tasks/orangeindex.rake: block (3 levels) in <top (required)>
line 113 of [PROJECT_ROOT]/lib/tasks/orangeindex.rake: each
line 113 of [PROJECT_ROOT]/lib/tasks/orangeindex.rake: block (2 levels) in <top (required)>

View full backtrace and more info at honeybadger.io

This request is going to catalog which doesn't seem to be a collection or alias on solr. Cron jobs should be reviewed.

Looks like this was an ad-hoc run that just contained a typo; close this issue when that task has successfully been run again.

Removed stale ad-hoc job


bitwarden: 1.23.0 -> 1.23.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/bitwarden/desktop/releases.
meta.description for bitwarden is: "A secure and free password manager for all of your devices"
meta.homepage for bitwarden is: "https://bitwarden.com"
meta.changelog for bitwarden is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 1.23.1 with grep in /nix/store/lmhqr7dhzlb9ycprpa9fgs67g74z9qiw-bitwarden-1.23.1

directory tree listing: https://gist.github.com/3936b1be9082e61c8688a7c6d9b2f21c

du listing: https://gist.github.com/382ed38ba43948446f403e8c8b74ad5f

Rebuild report (if merged into master) (click to expand)

4521 total rebuild path(s)

1223 package rebuild(s)

1177 x86_64-linux rebuild(s)
1130 i686-linux rebuild(s)
1067 x86_64-darwin rebuild(s)
1147 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
_3mux
act
aerc
age
alertmanager-bot
amass
amazon-ecr-credential-helper
amfora
aminal
antibody
aptly
arachne-pnr
archiver
arduino-cli
argo
argocd
asciigraph
asmfmt
assh
atlantis
audacious
audaciousQt5
autospotting
avrdude
avrdudess
awless
aws-env
aws-iam-authenticator
aws-okta
aws-rotate-key
aws-vault
awsweeper
azure-storage-azcopy
azure-vhd-utils
bat-extras.prettybat
bazel-buildtools
bazel-gazelle
bazel-kazel
bazel-remote
bazel-watcher
bazelisk
berglas
bettercap
bitwarden
blackmagic
blockbook
bmon
bombadillo
boohu
boringssl

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/lmhqr7dhzlb9ycprpa9fgs67g74z9qiw-bitwarden-1.23.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A bitwarden https://github.com/r-ryantm/nixpkgs/archive/a199759150d8425634555a74a73181b7f0347132.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/lmhqr7dhzlb9ycprpa9fgs67g74z9qiw-bitwarden-1.23.1
ls -la /nix/store/lmhqr7dhzlb9ycprpa9fgs67g74z9qiw-bitwarden-1.23.1/bin

Pre-merge build results
NixPkgs review skipped

Maintainer pings
cc @Kiwi for testing.

Result of nixpkgs-review pr 105850 run on x86_64-darwin 1

Result of nixpkgs-review pr 105850 run on x86_64-linux 1

1 package failed to build:

bitwarden

error: --- Error --- nix-daemon
builder for '/nix/store/97p23vk8rnm4lrv07p6ni3ipj9hqk2n3-tracker-3.0.1.drv' failed with exit code 1; last 10 log lines:
    File "/nix/store/i9lzacdfrwlj1ayw551c016s0fq71p7j-python3-3.8.6/lib/python3.8/os.py", line 213, in makedirs
      makedirs(head, exist_ok=exist_ok)
    File "/nix/store/i9lzacdfrwlj1ayw551c016s0fq71p7j-python3-3.8.6/lib/python3.8/os.py", line 213, in makedirs
      makedirs(head, exist_ok=exist_ok)
    File "/nix/store/i9lzacdfrwlj1ayw551c016s0fq71p7j-python3-3.8.6/lib/python3.8/os.py", line 223, in makedirs
      mkdir(name, mode)
  PermissionError: [Errno 13] Permission denied: '/usr'
  FAILED: meson-install
  /nix/store/kmnciwbf7m4kcdy6fjdqaamdpy54f41f-meson-0.56.0/bin/meson install --no-rebuild
  ninja: build stopped: subcommand failed.

Hmm, both main suspects (tracker wrapper changes and meson bump) are already on master so it must be something else.

Looks like there is a regression in systemd pkg-config variables, this will break many packages:
--- /nix/store/6fkka81sc5w9ip4y5mnlw56w73jhzs5f-systemd-246.6-dev/share/pkgconfig/systemd.pc
+++ /nix/store/9dr7dzc4lywln6swpma98gwppx688mr0-systemd-247-dev/share/pkgconfig/systemd.pc
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -11,8 +11,8 @@
 # considered deprecated (though there is no plan to remove them). New names
 # shall have underscores.

-prefix=/nix/store/iyayrhagfqccsrfzw2fqs2q8n4b6h2lg-systemd-246.6
-root_prefix=/nix/store/iyayrhagfqccsrfzw2fqs2q8n4b6h2lg-systemd-246.6
+prefix=/usr
+root_prefix=/nix/store/n9lzlyhq8d9gv9hdi0gay1plmzlz70j9-systemd-247
 rootprefix=${root_prefix}
 sysconf_dir=/etc
 sysconfdir=${sysconf_dir}
@@ -26,10 +26,10 @@
 systemd_system_preset_dir=${rootprefix}/lib/systemd/system-preset
 systemdsystempresetdir=${systemd_system_preset_dir}

-systemd_user_unit_dir=${prefix}/lib/systemd/user
+systemd_user_unit_dir=/usr/lib/systemd/user
 systemduserunitdir=${systemd_user_unit_dir}

-systemd_user_preset_dir=${prefix}/lib/systemd/user-preset
+systemd_user_preset_dir=/usr/lib/systemd/user-preset
 systemduserpresetdir=${systemd_user_preset_dir}

 systemd_system_conf_dir=${sysconfdir}/systemd/system
@@ -48,7 +48,7 @@
 systemd_system_generator_dir=${root_prefix}/lib/systemd/system-generators
 systemdsystemgeneratordir=${systemd_system_generator_dir}

-systemd_user_generator_dir=${prefix}/lib/systemd/user-generators
+systemd_user_generator_dir=/usr/lib/systemd/user-generators
 systemdusergeneratordir=${systemd_user_generator_dir}

 systemd_system_generator_path=/run/systemd/system-generators:/etc/systemd/system-generators:/usr/local/lib/systemd/system-generators:${systemd_system_generator_dir}
@@ -63,7 +63,7 @@
 systemd_shutdown_dir=${root_prefix}/lib/systemd/system-shutdown
 systemdshutdowndir=${systemd_shutdown_dir}

-tmpfiles_dir=${prefix}/lib/tmpfiles.d
+tmpfiles_dir=/usr/lib/tmpfiles.d
 tmpfilesdir=${tmpfiles_dir}

 sysusers_dir=${rootprefix}/lib/sysusers.d
@@ -78,7 +78,7 @@
 modules_load_dir=${rootprefix}/lib/modules-load.d
 modulesloaddir=${modules_load_dir}

-catalog_dir=${prefix}/lib/systemd/catalog
+catalog_dir=/usr/lib/systemd/catalog
 catalogdir=${catalog_dir}

 system_uid_max=999
@@ -99,4 +99,4 @@
 Name: systemd
 Description: systemd System and Service Manager
 URL: https://www.freedesktop.org/wiki/Software/systemd
-Version: 246
+Version: 247

cc @flokli @FRidh

I don't think that will break anything. Those PKG config variables are there to install Systemd units to the right place. Which doesn't make any sense in NixOS as it points to a path that is immutable and in NixOS instead we use the module system to install Systemd units.

Edit: ah but the prefix might matter. I see. As that isn't interpolated anymore Does NixOS modify that in third-party pkg-configs?

Normally, projects are expected to override prefix to their own prefix in the pkg-config variables, see https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/. Of course that is not possible when the prefix is hardcoded.

systemd's pkgconfig has changed in https://github.com/systemd/systemd/commit/6e65df89c348242dbd10036abc7dd5e8181cf733, which was part of https://github.com/systemd/systemd/pull/17009. If I read https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/ and pick

If you are defining a path inside your project’s pkg-config file, always make sure you’re using a relative path!

out of this… Should we open an upstream issue?

Yes, we should consider this an upstream regression.
This is important for two reasons:

Installing to non-FHS package-specific prefixes for distros with immutable roots like NixOS. Those cannot use /usr and it is their responsibility to ensure systemd can find the service files.
Installing to local path for development purposes. This is a compromise between running program from a build directory and running a program fully installed to system prefix. You will not want to write to your system prefix in that use case.

In either case you want to support overridable prefix so a project can be successfully installed as per https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/. Hardcoding the prefix means projects will no longer have reason (or a sensible way) to install the data relative to prexix (which will be /usr anyway on modern FHS distros) and it will force users wanting to use one of the aforementioned use cases to patch each project’s build system.

I reverted the said commit for now. And upstream solution might take more time than I would want to block staging for: https://github.com/NixOS/nixpkgs/pull/106044

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 105850 run on x86_64-linux 1

1 package built:

bitwarden

@Kiwi the pkg-config build issue is resolved

oh yeah I built it on staging/staging-next/and master last night but forgot to comment


Add code for retrieving opam dependencies of the switch for monorepo builds

Emit these dependencies in the opam file in the switch export in the x-orb-dependencies section for further processing
This is a prerequisite for fixing opam-graph visualization of mirageos 4 builds (which should then read the x-orb-dependencies).
I tested the code in duni_deps locally. /cc @reynir

since it is all guarded with a try..catch, I'll merge and see whether this works on builder-web :)


docs: update example endpoints in Readme.md

This PR Closes #308
Changes in this PR

Updated the curl requests and responses in Readme.md file
Added a missing supported field blockHashFromNumber for indexingStatus

Pull Request Test Coverage Report for Build<PHONE_NUMBER>3
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 73.957%

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
4998

Relevant Lines:
6758

💛  - Coveralls


imported templates are being cached for too long

I have a template called main.html. It {% imports %} a module called module_a (without context). module_a {% imports %} module_b in the same way.
When I change module_a, the template loader recognizes this and reloads it.
When I change module_b, the template loader does not recognize it. I have to restart the process.
I believe this is due to the fact that the generated code for module_a does the imports in its root() function. get_template sees that module_a is up to date, so does not reload it, so does not rerun its root() function.
I'm not sure how to address this. Obviously calling root() on each call to get_template is bad. The fullest solution would be to keep track of each template's dependencies, but that's a lot of work.

I just ran into this as well. This is pretty annoying in development because it means that I have to set cache_size to 0, and then things get very slow (as one could expect).
I'll try to dig in the internals to see if I come up with something. In the meantime, if someone with more experience could suggest with a solution or even some direction that would be really great!

The problem is that imports are cached but not tracked. I'm not sure sure what the best way to deal with this would be.

Ok, so the problem here isn't with the caching of the template but the caching of variables passed into the imported macros.
(at least in my case)
My workaround was to use a method that returns my updated context values to be rendered.
In my scenario I was making a macro for pagination. The macro needed the request object.
initial approach within the macro
{% set pagenum, limit = request.args.pg , request.args.limit  %}
This will work initially, but on subsequent requests the macro context values are forever cached unless a server reboots
working approach within the macro
{% set pagenum, limit = request.get_params()  %}
This will now return my updated request parameters on every call without sacrificing the caching of my macros.
I also noticed that caching the macros has an ~2.5 x speed up in my response times.
Without caching ~= 450ms
With caching ~= 150ms

We also found that setting cache_size = 0 made our development environments too slow. Which lead us to find another way which would clear the cache for every new request. Clearing the cache before each new request allowed us to see new changes made in nested templates, without restarting the wsgi process, but did cache repeated calls to the same template within a request.
We are using the Django framework which allowed us to create a middleware which is only enabled for the development environment. The middleware has access to the Jinja environment class, which exposes the cache property which can be cleared using the clear method
from django.template import engines

class JinjaClearCacheMiddleware:
    def __init__(self, get_response):
        self.get_response = get_response

    def __call__(self, request):
        engines['jinja2'].env.cache.clear()

        return self.get_response(request)

We created the middleware in a separate file and registered it in the middeware config list in our local Django settings.


[$500] Camera view is blank when using ‘Scan’

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.43-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @adelekennedy
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1708450419664849
Action Performed:

Navigate to FAB > request money
Tap on the Scan tab
Allow access
Camera view does not open in app
Take picture
Picture appears once split request is made

Expected Result:
Camera view should appear once access is granted
Actual Result:
Camera view does not appear
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[x] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/38435837/d1593624-da71-4553-929b-01587269b3c0

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01a341d74fdcb2a534
Upwork Job ID:<PHONE_NUMBER>189869568
Last Price Increase: 2024-02-21

I could not reproduce on Android

I tried this on Safari in my iPhone 14 and the camera works fine after granting permissions. I was not able to reproduce this.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~012b58e691fb39254f

I think this was an iOS issue! I was able to repro on v 16.7.5. Then I updated to 17.3.1 and was no longer able to repro -- the camera asked for permissions straight away, then after granting permissions it worked fine. So I think this is not our bug and has been resolved in the latest iOS version


Call to protected method Symfony\Bundle\FrameworkBundle\Controller\AbstractController::getParameter()

Hi, there is a problem in the simulator class : src/G6K/Model/Simulator.php
In the loadDatabases method, you call getParameter(), who is a protected method from AbstractController.
To solve the problem , i inject the Container class in the constructor .

Hi,
Under what circumstances do you have this message?
What is the version of symfony?
What is the version of php?

having same error on Symfony 4
php version 7.4.6

Please tell me how I can reproduce this error?

after installing projet by using your process,
i have executed run-script g6k-script
when i'm tried to perform index.php/demo this error occured


Add ci_activity to email notifications Cc list

Why:

Closes https://github.com/github/docs/issues/4327
The Filtering email notifications section of the Configuring notifications documentation lists the ways in which GitHub includes notification metadata in notification emails. Part of that metadata is the Cc field which includes a reason why the user is receiving the email.
Currently, email notifications about completed action runs are sent with<EMAIL_ADDRESS>in the Cc field. This is not documented here, so I believe it should be added.
What's being changed:
I've added the following element to the Cc row in the table:

ci_activity: An action run that you initiated finished.

I'm not completely sure about the wording here. I chose not to use the GitHub Actions product name because this is referring to an instance of a GitHub Actions "thing". I also wasn't sure if "action run" is necessary or simply "action" is sufficient. I'll differ to you for the specific terminology that should be used (e.g. workflow, action, ci run, etc.)
Also, as noted in https://github.com/github/docs/issues/4327, I don't know if the wording should be modified to not be exclusive to GitHub Actions CI. If non-GHA CI would also trigger these notifications, it may make more sense to use generic wording such as:

ci_activity: A CI run that you initiated finished.

Check off the following:

[x] I have reviewed my changes in staging. (look for the deploy-to-heroku link in your pull request, then click View deployment)
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

As this PR hasn't yet been reviewed, I'd like it to remain open.

@Rylan12 Thanks so much for opening a PR! I'll get this triaged for review ✨ Sorry about the delay, I was out last week 💛

Wow I a so pleased to hear you are ON THE BALL man!!!!!! Great job(✷‿✷)(✷‿✷)(✷‿✷)
This is my usual face the first 7 years! LoL maybe you can teach me some cool gigs
Sent from Yahoo Mail on Android
On Mon, Mar 29, 2021 at 12:44 AM, @.***> wrote:
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Sent from Yahoo Mail on Android
On Mon, Mar 29, 2021 at 12:47 AM, heidi @.***> wrote:   Wow I a so pleased to hear you are ON THE BALL man!!!!!! Great job(✷‿✷)(✷‿✷)(✷‿✷)
This is my usual face the first 7 years! LoL maybe you can teach me some cool gigs
Sent from Yahoo Mail on Android
On Mon, Mar 29, 2021 at 12:44 AM, @.***> wrote:
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


perf: compress images

All except project logos, which were compressed using compressor.io

Moved to https://github.com/davidlj95/website/discussions/313


Sessions seem to disappear/delete automatically

Hello, we have some teams in our org using this extension and in the last week and a half they are all reporting their sessions are getting deleted, but no rhyme or reason as to why. I cannot troubleshoot in any way within ADO; there is no logging attached to this extension and I cannot see any history related to their sessions or help advise on a solution (if appropriate).
I don't know what other next steps to take to troubleshoot, can someone help advise on what actions I might be able to take?

Hi!, a session can be deleted if someone resets the extension.

Hello - can you help advise how extensions are generally reset? I am an admin in my ADO workspaces and don't seem to have a general 'reset' option from the extension main page. I only see options to disable and uninstall the extension or view its details on the marketplace.
We haven't changed any internal process(es) that I know of that would automate a reset of the extension either.

![Screenshot 2023-08-03 at 11 19 07](https://github.com/microsoft/azure-boards-estimate/assets/54841342/1ffcf3ed-556a-456f-8d87-7dbb
If you choose to reset, all sessions will be cleared.

If you choose to reset, all sessions will be cleared.

Ah, I see it's session-specific. Yes, I think the option for creator-only would help us greatly! Thanks so much.

Certainly, it will be available for release next week.


Add a macro target count to the Package page

Fixes #2426
Adds a count of macro targets to the Package page alongside libraries, executables, and plugins.

Notes:

I’m pulling target information in with a separate query similar to what we do with products. You may want us to consolidate some of these queries @finestructure, but I thought it best to get it working this way first so we know what we’re working with.
I’ve deliberately not added tests for the target query code in case we consolidate the queries. Tests exist for all the other parts of this change, though.
I am only pulling macro targets through to the API level as we do with products. We should probably consider pulling everything through to the API at some point, but that should be consistent across products and targets rather than something we do in this PR.
This PR does not change the layout, as I suggested it should in #2426. I’d like to see how this feels and will open a new issue if it needs changes.
I also took the opportunity to fix up the plugins icon, which has been bugging me since I made it, as its “weight“ differs significantly from the other icons here. This probably should have been a separate PR, but it’s such a minor change I bundled it together.

Deploying as 2.89.8


Update book.html

Fixed nav bar css after clicking book now
Related Issue
None
Fixes:  #1142
Description
i have changed spacing in navbar elements which made it look better
Type of PR

[x] Bug fix

Screenshots / videos (if applicable)
Before

After

Checklist

[x] I have made this change from my own.
[ ] I have taken help from some online resources.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@PriyaGhosal i have done it

@Nikhil-Banthia This looks very much compact.Find another issue or feature to contribute to. Thank you!


continue reconcile loop for fatal error case

We have seen etcdcluster ended at a Failed state. Then it cannot be recovered.
After carefully checking the code, it is mostly because etcd-operator encountered a Fatal error.
The fatal error could be, failed to connection with apiserver, which happens when underlay malfunctional.
This fix is basically swallow the fatal error, continue reconcile loop, hope in the future, it can recover from fatal error.

@khenidak,
I am doing this, mostly try to make on-call easy. We don't need to fix each etcd-operator after a major underlay issue.


Added 9 Icons, Updated 3, Linked 4

Type of change
:x: Bug fix (non-breaking change which fixes an issue)
:white_check_mark: Icon addition (non-breaking change that adds/modifies Lawnicons's icons)
:x: General change (non-breaking change that doesn't fit the above categories like copyediting)
Icons addition information
Icons added

CapCut (com.lemon.lvoverseas)
Crunchyroll (com.crunchyroll.crunchyroid)
Figma Mirror (com.figma.mirror)
Mi Music (com.miui.player)
Mi Video (com.miui.videoplayer)
Meu Tim (br.com.timbrasil.meutim)
Steam (com.valvesoftware.android.steam.community)
Steam Link (com.valvesoftware.steamlink)
Generic Download (for generic apps who use an super inspired arrow, examples at "Icons linked")

Icons updated

Mi Files (com.mi.android.globalFileexplorer)
Mega (mega.privacy.android.app)
Stremio (com.stremio.one)

Icons linked

Download Twitter Videos (tweeter.gif.twittervideodownloader)
InsMate Pro (repost.share.instagram.videodownloader.photodownloader)
Miui Clock (com.android.deskclock)
Floating Clock (com.dslit.floatingclock)

mega.svg has been exported wrong. I had no choice but to flatten it, yet keeping the 12px line width.


The  compile error is to buid tensorflow1.4 source code in vs15

Cmake tensorflow1.4 source code,but the error is unable to open file  to tensorflow.def  in vs15 windows

It looks like you haven't used a template to create this issue. Please resubmit your issue using a template from here. We ask users to use the template because it reduces overall time to resolve a new issue by avoiding extra communication to get to the root of the issue. We will close this issue in lieu of the new one you will create from the template. Thank you for your cooperation.


Issue with Cosmos DB Emulator on Mac with M2 Chip - ERR_CONNECTION_REFUSED when accessing via Local IP

Describe the bug
I am encountering an issue while trying to use the Cosmos DB Emulator on my Mac with an M2 chip. When following the Microsoft documentation, I successfully start the emulator using the command below:
Microsoft.Azure.Cosmos.Emulator.exe /AllowNetworkAccess /Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==

To Reproduce
Steps to reproduce the behavior:

Install Parallels and set up a Windows virtual machine.
Download and install the Cosmos DB Emulator within the virtual machine.
Run the emulator using the provided command.
Attempt to access the emulator from my Mac using the local IP obtained from ipconfig.
Observe the ERR_CONNECTION_REFUSED error.

Here's the local IP I'm trying to use: <IP_ADDRESS>
Link to the Microsoft guide I followed: cosmos-db-local-emulator
Expected behavior
I expect to be able to access the Cosmos DB Emulator running on my Windows virtual machine using the local IP address from my Mac.
Actual behavior
Currently, when attempting to access the emulator using the local IP, I receive an ERR_CONNECTION_REFUSED error.
Environment summary

Cosmos DB Emulator Version: 2.14.12
OS Version: MacOS: Ventura 13.4.1 (22F82)

Additional context

Parallels network settings: Running in "shared" mode.
I tried port forwarding via Parallels, but it didn't resolve the issue.
I attempted using the "nofirewall" flag, deleted emulator contents, disabled the firewall, and added allow rules without success.
Output of netstat -a | findstr 8081 shows the emulator listening on <IP_ADDRESS>:8081, which might be the cause of the problem.

Its not CosmosDB SDK issue.
You can create this issue at this place https://github.com/Azure/azure-cosmos-db-emulator-docker/issues


close the connection when the client sends a TLS version < TLS 1.3

Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25494.
In this fuzz case, the client sent a valid ClientHello that offered a TLS version different from TLS 1.3. We need to make sure that the server closes the connection in this case.

Merging this to get confirmation from OSS-Fuzz as quickly as possible.


Regex test filtering

Would it be possible to introduce regex test filtering? There are cases where we want a subset of our test suite to run but can't achieve it with a simple string filter. Maybe my thinking is naive, but it seems like we should be able to take the filter string and cast it to a regular expression and test the test names against it.
This would probably require an additional config option to treat the filter as a regular expression as opposed to a string value.

This is a good question and I would like to discuss before making a decision.
I currently have some limited filters as filtering by the test names, the module filters and using QUnit.only for single test blocks.
It does not look like a problem to cast the filter string to a regular expression.
QUnit.pending (not implemented yet) would be helpful here but it targets a different strategy.

The config option might be too much, we should try casting the filter string as a regular expression without any option to enable or disable it, the option would be an unnecessary complexity.

Using the existing parameter is fine by me, but we'll need some in-band method of differentiating string matches from regex patterns (similar to the preexisting leading ! for filter inversion) so regex-special characters can still be matched literally. E.g., something like filter=/regexp?/i (optional "p") vs. filter=regexp? (literal "?").

seems right.
We may also trigger the regexp match if the filter value matches a valid regexp literal notation (using the /content/params?
I'm interested to see how it might be implemented. @trentmwillis would you like to try a PR with it?

These cases are actually why I thought an additional config option might be valuable as it takes some of the guess work out of determining what sort of pattern we're using. For example, what I'm seeing with the above is:
/components/g -> Does a global regex search for components
/components/s -> Does a regex search for /components/s?
I think trying to determine if we should be treating values as regex patterns or literals would add uncertainty to the end user.

The mechanism doesn't matter to me, as long as behavior is predictable and we maintain backwards compatibility with respect to non-initial special characters.

Did an implementation that added an additional config option. @leobalter if you feel strongly that we should not add another config option, I can explore other alternatives.

Btw. I feel strongly that we should not add another config option.

Noted, will attempt the other approach and update my PR.


removed hidden overflow for schema compare splitview

Fixes #6609.

Is there an issue associated with this change? Let's make sure we have issues tracking all fixes/improvements we're making!

Thanks @Charles-Gagnon, my apologies--just updated the description to reflect that this fixes #6609.

Thanks @Charles-Gagnon, I didn't know this! Also including another gif to show overflow with the terminal panel visible.

@kburtram, @yualan - is the double scroll bar okay fix for accessibility?

@ellbosch can you please resolve conflicts and complete this. That will give people a way to test new vs old behavior. Let's discuss if there are any concerns.

@ellbosch do you still need this branch?


Gorouter access log format changed, doc needs updating

In https://docs.cloudfoundry.org/concepts/architecture/router.html there is a section about the access log format for the gorouter.
I created a grok filter that parses the gorouter logs in Logstash based on the given format, but it seems that the format has recently changed, specifically the "gorouter_time" and "app_time" fields were added. As a result the grok filter failed. I took a look at the gorouter repo and saw that app_time is being removed, so I am not sure whether these are temporary or permanent.
In any case, if the addition of these fields are permanent, the documentation should be updated accordingly.

Hello @acwwat,
We were unable to prioritize this request at the time the issue was filed.
If this issue is still relevant, submit a new pull request (preferred) or a new GitHub issue.
I am closing this request. Thank you so much for your contribution.


Consistent icons

The icons used with the view mappings screen need to be consistent. The edit icon needs to be visible both while a mapping is in progress and after a mapping is completed.

Made this priority 2 as I think it makes sense to deal with other functionality / UI issues so as to make it clearer what we need icons for.


Forgetting a Widget's build() context argument can lead to confusion

The trivial app below is wrong because the build function is missing its BuildContext argument. I have made this mistake several times.
import 'package:flutter/material.dart';

class BadApp extends StatelessComponent {

  Widget build() {
    return new Text("FAIL");
  }
}

void main() {
  runApp(new MaterialApp(
    routes: {
      '/': (RouteArguments args) => new BadApp()
    }
  ));
}

I assume that the analyzer would have warned me off running the app. Doing so yields 128 stack frames, only one of which comes from the app.  The failure mode is somewhat confusing, moreso in the context of a larger app.
android: --------- beginning of system
android: I/flutter : -- EXCEPTION CAUGHT BY WIDGETS LIBRARY ---------------------------------
android: I/flutter : Exception caught while building _ModalScopeStatus(active)
android: I/flutter : type '() => Widget' is not a subtype of type 'WidgetBuilder' of 'value'.
android: I/flutter : Stack trace:
android: I/flutter : #0      ComponentElement._builder= (packages/flutter/src/widgets/framework.dart:1136)
android: I/flutter : #1      StatelessComponentElement.StatelessComponentElement (packages/flutter/src/widgets/framework.dart:1206)
android: I/flutter : #2      StatelessComponent.createElement (packages/flutter/src/widgets/framework.dart:309)
...
android: I/flutter : #128    main (/builds/dev/flutter/examples/widgets/test.dart:15)

I don't know if it would be worth doing something about this.

The analyzer didn't say anything??

@pq

I'm surprised by this... You should really see a static warning notifying you that you're missing the parameter.  If you're not, please open a bug on the Dart SDK, and feel free to assign it to me.

And to be clear, the issue is that BadApp should look more like this?
class GoodApp extends StatelessComponent {
  Widget build(BuildContext context) => new Text('success');
}

Are you running with strong mode enabled?
If not, then I believe that the problem is that the literal map does not have an explicit type annotation, which means that it is a Map<dynamic, dynamic>, which is assignable to a Map<String, RouteBuilder>, hence no warning.

Oh, hey, that literal doesn't have type annotations. There ya go.
So this is basically just a duplicate of the "analyzer should complain when you imply dynamic" feature request.

FWIW I ran into this same problem. I had to add an explicit parameterized type to the routes parameter to get the analyzer to warn me that I put the wrong thing in the value.

Just for the record, I'm going to provide a translation of my own text, since it required decoding. And I'm sorry about not having been being clear:

I assume that the analyzer would have warned me off running the app. Doing so yields

Translation:

I assume that if I'd run the Dart analyzer, it would have warned me about the missing build() method parameter. I didn't run the analyzer, because I'm often impatient. When I ran the app it produced [the following exception]

because I'm often impatient

You might want to keep Atom running in the background, only to provide real-time analysis. There's no real-time display of analyzer output to the console, but Atom's "problem view" is the next best thing.

This will be caught by the analyzer.


Add experimental feature DeferSendableChecking

This PR begins a project to add more sophisticated Sensibility checking to Swift's Concurrency model. In particular, sending non-Sendable values between differing isolations should only produce a diagnostic if it is possible that those values are accessible from, or permit access to, other values that would remain in scope after the send. This PR is the first step in that process. It adds an experimental feature flag DeferSendableChecking that, when enabled, prevents the Sema AST passes from emitting diagnostics about non-Sendable arguments passed to isolation-crossing calls. Instead, a SIL pass is added that checks ApplyInst instances in emitted SIL to see if their corresponding ApplyExprs would've produced diagnostics. This pass will be the vehicle for more sophisticated checking in future PRs.

@swift-ci please smoke test

Overall I like this a lot more than the previous iteration!

@swift-ci please smoke test


Incorrect behaviour for mixed list types?

For the following data (I'll prepend this at the beginning of each section to avoid scrolling to compare with output):
* unordered, item 1
  * sub-unordered item 1
  * sub-unordered item 2
  1. sub-ordered item 1
  2. sub-ordered item 2
  * sub-unordered item 3
    1. sub-sub ordered item 1
* unordered, item 2

This data produces different results for each parser I've tested in, so I'm not clear on what the standard actually should be. That said my expectation would have been that, the parser would honour the solution closest the the user input.
This isn't a bug-report per-say, because I'm not entirely sure that it is a bug, but more a query to see if Parsedown is acting as expected?
The aforementioned expected result is as follows
Expected
Source
* unordered, item 1
  * sub-unordered item 1
  * sub-unordered item 2
  1. sub-ordered item 1
  2. sub-ordered item 2
  * sub-unordered item 3
    1. sub-sub ordered item 1
* unordered, item 2

Result

#### HTML

unordered, item 1

sub-unordered item 1

sub-unordered item 2

sub-ordered item 1

sub-ordered item 2

sub-unordered item 3

sub-sub ordered item 1

unordered, item 2

However, these are the results of tested parsers:
Parsedown
Source
* unordered, item 1
  * sub-unordered item 1
  * sub-unordered item 2
  1. sub-ordered item 1
  2. sub-ordered item 2
  * sub-unordered item 3
    1. sub-sub ordered item 1
* unordered, item 2

Result

#### HTML

unordered, item 1

sub-unordered item 1

sub-unordered item 2

sub-ordered item 1

sub-ordered item 2

sub-unordered item 3

sub-sub ordered item 1

unordered, item 2

Markdown PHP 1.3
Source
* unordered, item 1
  * sub-unordered item 1
  * sub-unordered item 2
  1. sub-ordered item 1
  2. sub-ordered item 2
  * sub-unordered item 3
    1. sub-sub ordered item 1
* unordered, item 2

Result

#### HTML

unordered, item 1

sub-unordered item 1

sub-unordered item 2

sub-ordered item 1

sub-ordered item 2

sub-unordered item 3

sub-sub ordered item 1

unordered, item 2

GitHub
Source
* unordered, item 1
  * sub-unordered item 1
  * sub-unordered item 2
  1. sub-ordered item 1
  2. sub-ordered item 2
  * sub-unordered item 3
    1. sub-sub ordered item 1
* unordered, item 2

Result
Obviously this one is horrendously wrong, still, it's a comparison point:

HTML

unordered, item 1

sub-unordered item 1

sub-unordered item 2

sub-ordered item 1

sub-ordered item 2

sub-unordered item 3

sub-sub ordered item 1

unordered, item 2

First of all: Perhaps the most serious problem of Markdown is, that it never really was standardized. The only common denominator of all Markdown parsers is a descriptive document from John Gruber and his original Markdown.pl parser as some sort of a reference parser. His description of Markdown is very ambiguous, partially even contradicts itself and even the reference parser violates its own rules in many ways. The result is, that all Markdown parsers behave more or less differently - especially in cases which aren't really covered by John Gruber's document or in cases in which Markdown.pl produces impractical results.
However, in the recent past some people started the CommonMark project to resolve these uncertainties. The project is very promising, it comes with both a pretty complete specification of Markdown and a (very slow) reference parser. Many Markdown parser projects have already declared that they will try to improve compliance to the CommonMark specs and Parsedown is no exception here.
Anyway, to cut a long story short, if there's a problem or open question about how Parsedown behaves or should behave, the CommonMark specs should be consulted.
In this case the expected result you're describing matches the specs (unfortunately there's no matching example in the specs, it results from the "of-the-same-type" rule). You can also have a look at the CommonMark reference parser. Therefore

Okay, since it's a bug I'll take a look at a fix ;-)
It doesn't look too bad upon first glance, so I'll take a stab at it later on when I get a chance to test out some changes :)

Great, as long as it doesn't conflict with CommonMark and doesn't add too much complexity I'm in favor :)

Getting the blockListContinue function to correctly identify one of the offending lists isn't too difficult a change.
i.e.
* unordered, item 1 (new list 1)
  * sub-unordered item 1 (new list 1.1)
  * sub-unordered item 2
  + sub-unordered item 1 (new list 1.2)
  - sub-unordered item 1 (new list 1.3)
  1. sub-ordered item 1 (new list 1.4)
  2. sub-ordered item 2
  * sub-unordered item 4 (new list 1.5)
    1. sub-sub ordered item 1 (new list 1.5.1)
* unordered, item 2

Can produce the following

You'll notice the above isn't quite correct – a problem I'm having is checking whether the list nesting is the same as the list that has currently been started. I figured that $Block['indent'] === $Line['indent'] should be sufficient, however, it's not proving to be enough to determine list depth.
Any ideas on another piece of data I could use to determine the depth of the current line relative to the block? Or should the line indent vs. block indent be enough?

@aidantwoods
I'm super busy these days working on @careteditor.
I could give it more thought later this month.

@aidantwoods: See http://spec.commonmark.org/0.26/#example-255

A sublist must be indented the same number of spaces a paragraph would need to be in order to be included in the list item.

Thus comparing the block's and line's indent is completely fine to determine whether the list is continued or not, and whether a sublist is started or not.
fyi: You can use test/CommonMarkTest.php or test/CommonMarkTestWeak.php from #423 to test whether your changes comply to the CommonMark specs or not.

@PhrozenByte
Oh yeah, I get that comparing the indent is inline with the spec (that's why I picked that method) – more my issue is that the code isn't behaving in the way I'm expecting it to regarding the reported indentation.
I'm creating a pull request, just so you can see the changes I've made to start this off – obviously it's not fit for merging yet.

#439 is merged, closing


Formatting Settings

I would like to be able to have more control over the auto formatting features provided by the Ionide plugin. For example, for some projects I'd like to be able to change the 4 spaces indentation to 2. I have read that Ionide uses fantomas under the hood which seems to surface more configuration options. Would it be possible to surface these via plugin settings?

Ionide should automatically find and load Fantomas configuration file (https://github.com/fsprojects/fantomas/blob/master/docs/Documentation.md#--config-path-to-file-or-folder) put in the root of your workspace/solution or next to the project file. We don't plan to expose Fantomas settings via plugin settings.

Old Link:
https://github.com/fsprojects/fantomas/blob/v4.7.9/docs/Documentation.md
New Doku:
https://fsprojects.github.io/fantomas/docs/end-users/Configuration.html
Short:
file: .editorconfig in root of your workspace/solution or next to the project file
[*.{fs,fsx}]
max_line_length=100


Can't get smile expression video

try with --exp_img smile or --exp_img "smile_face.jpeg" did not work, still get nerual face result.

Same issue ^^

Same issue

same