Repository navigation
sdk/go: announce the library version by default - #14879
Merged
Merged
Conversation
The default connection sent no --version, so a standalone client running a custom or PATH CLI announced that CLI's version, not the release its generated code targets. An explicit WithVersionOverride still wins. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
marked this pull request as ready for review
October 27, 2026 17:14
TomChv
approved these changes
Oct 28, 2026
This was referenced Oct 28, 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.
The Go library's default connection sent no
--versionto thedagger sessionit spawns, so a standalone client that ran a custom CLI (_EXPERIMENTAL_DAGGER_CLI_BIN) or thedaggerfound onPATHannounced that CLI's version, not the release its core was generated for.engineconn.cliSessionArgsnow defaults--versionto the library's own release, the generatedCLIVersion, when the caller set noWithVersionOverride. An explicit override still wins. With the downloaded CLI nothing changes, because that CLI's version already equalsCLIVersion. The existing-session path (DAGGER_SESSION_PORT) spawns no CLI and still announces nothing.session --versionexists in every CLI since v0.13.0, so every binary the library can reach accepts the flag.The default lives in the one place all spawned-CLI paths share, so the core constructors,
ModuleGraphQLClientand generated clients all get it.The change reaches modules only through library tags that contain it; older tags keep announcing the CLI's version.
Checks run: three new tests in
sdk/go/engineconn/session_test.go(default announcesCLIVersion, explicit override wins, existing-session path announces nothing), the fullengineconntests, andgo buildandgo vetinsdk/go. Removing either version assignment fails the matching test.Not run here: engine-backed integration tests. A changelog fragment is not added yet because the repo keys fragments on the PR number.