Pick the exec instance deterministically and say which one - #219
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ring deployment execpicked its default instance withinstances.into_iter().next(), and nothing upstream sorts:list_instances_with_namesreturns whatever order the Docker daemon gave. On an autoscaled deployment two consecutive execs could therefore land in different replicas, which is the failure mode where a fix looks like it did not take effect. The session also never said which replica it entered.The default is now the first instance by name, with the id as a tiebreaker so duplicate names cannot reintroduce an arbitrary order. Sorting lives in
resolve_instancerather than in each runtime, so no runtime has to remember to do it.The chosen instance comes back on the upgrade response (
x-ring-exec-instance, plus position and total), and the CLI printsConnecting to web-3b81d4 (1 of 3 running instances)...before the session takes over the screen. It goes on the handshake rather than as a first frame because the frame stream is the PTY: anything injected there would have to be escaped out of the user's own output. The qualifier only appears when there is more than one replica, and a client that ignores the headers still gets a working session.--containeris unchanged: still an exact match on id or name, still a 404 when it matches nothing.The first commit is unrelated cleanup that CI needed:
clippy::result_large_errnow fires on two user handlers that predate this branch, silenced the same wayrequire_scopeand the token handlers already do.