cmd/docker: Allow interactive cloud context resolution - #7356
Merged
thaJeztah merged 2 commits intoOct 5, 2026
Merged
Conversation
Forward stdin and stderr to cloud context providers when both are terminals, allowing prompts during --cloud resolution. Pass file handles directly to preserve terminal detection and leave piped or redirected input available to the requested command. Use the standard console handles when Windows terminal wrappers hide their underlying files. Keep stdout reserved for the JSON response. Signed-off-by: Nicolas Beck <nicolas.beck@docker.com>
- extract setResolverStdio for resolver terminal wiring - extract validateResolvedContext for context/endpoint checks Signed-off-by: Nick Sieger <nick@nicksieger.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
thaJeztah
approved these changes
Oct 5, 2026
thaJeztah
left a comment
Member
There was a problem hiding this comment.
LGTM (assuming CI is happy once GitHub is no longer AWOL)
docker-agent
reviewed
Oct 5, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
Member
|
FWIW; this test failure is unrelated, and can be ignored; |
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.
Replaces #7354, which was opened from a fork branch that I cannot update. This PR carries the same change plus a follow-up commit that fixes the
gocyclolint failure onresolveCloudContext.Follow up to #7343.
Summary
Allow
--cloudcontext providers to prompt during interactive resolution by forwarding stdin and stderr when both are terminals. Stdout remains reserved for the JSON response.Pass terminal files directly to preserve terminal detection and avoid intermediary input buffering. On Windows, use the corresponding standard console handles when terminal wrappers do not expose their underlying files. Piped or redirected stdin remains available to the requested command.
resolveCloudContextis split intosetResolverStdioandvalidateResolvedContextto bring its cyclomatic complexity under the lint limit. Behavior is unchanged.🤖 Generated with Claude Code