Repository navigation
engine/client, cli: let nested dagger run/dagger session serve their children - #14708
Merged
marcosnils merged 3 commits intoOct 19, 2026
Merged
Conversation
A CLI that finds DAGGER_SESSION_PORT replaced its own token with the exec's, so `dagger run` and `dagger session` in an exec answered 401 to the token they gave their child. Signed-off-by: Yves Brissaud <[email protected]>
The child failed on an HTTP/2 framing error, since these servers spoke HTTP/1.1 only. Serving it would make it the parent's own client, whose shutdown would end the parent's client. Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
eunomie
marked this pull request as draft
October 16, 2026 12:57
eunomie
marked this pull request as ready for review
October 16, 2026 20:35
TomChv
approved these changes
Oct 19, 2026
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.
dagger runanddagger sessioninside awithExecthat joins the caller's session (the default from the v1.0 API) answered HTTP 401 to the token they gave their own child. A CLI that findsDAGGER_SESSION_PORTreplaced its own token with the exec's token, then checked its child against it. The client now keeps the exec's token for its own requests to the engine, and checks its children against its own token.A Dagger CLI as the child of
dagger runordagger sessionfailed withhttp2: frame too large, on a host as well as in an exec: these two servers spoke HTTP/1.1, and the CLI speaks only HTTP/2. Serving such a child needs more than HTTP/2: it would reach the engine as its parent's client, so its shutdown would end the parent's client. The two servers now also speak HTTP/2 and refuse a CLI child withconnecting a Dagger CLI to the session served by `dagger run` is not supported yet.dagger listenis unchanged.How it was verified
TestContainer/TestNestedDaggerCLIServesChild: an HTTP child and a CLI child ofdagger runand ofdagger session, in an exec that joins the caller's session and in one withdaggerInDaggerNewSession. Without the first commit, the two nested HTTP cases fail with 401. Without the second, the four CLI cases fail withframe too large. All eight pass with both.TestNestedClientServesItsOwnTokenandTestSessionServerRefusesCLIClients;TestListen; golangci-lint.frame too largefailures.Not covered
dagger sessionno longer setsReadHeaderTimeout, likedagger listenand the engine, because it caps the lifetime of an unencrypted HTTP/2 connection.Walkthrough: https://gistpreview.github.io/?b1e8e650de710e33a96e9de538847ead