Repository navigation
fix(go): match same-repo clients in the explicit Git URL form - #79
Merged
Merged
Conversation
Since dagger v1.0.0-beta.20 (dagger/dagger 81e1c30405), a module of a Git workspace prints its ref in the explicit Git URL form, <clone>#<version>:<subpath>, instead of <clone>/<subpath>@<version>. gitSelector only knew the second form, so no module of a Git workspace was recognized as part of it: every same-repo client embedded the workspace URL and commit, and go-sdk/generate/stale failed on each push. Read the version after "#" up to ":" as well. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
Point the go-sdk module at github.com/eunomie/go-sdk@fix-same-repo-clients-beta20 (dagger/go-sdk#79) and regenerate the same-repo clients with it, so that Cloud runs this PR with that change. With it, the go module's caches use main's namespace on a Git workspace. Drop this commit once dagger/go-sdk#79 is merged and the dagger.io/sdk/go@main pin is bumped. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
added a commit
to eunomie/dagger
that referenced
this pull request
Oct 22, 2026
Point the go-sdk module at github.com/eunomie/go-sdk@fix-same-repo-clients-beta20 (dagger/go-sdk#79) and regenerate the same-repo clients with it, so that Cloud runs this PR with that change. With it, the go module's caches use main's namespace on a Git workspace. Drop this commit once dagger/go-sdk#79 is merged and the dagger.io/sdk/go@main pin is bumped. Signed-off-by: Yves Brissaud <[email protected]>
eunomie
force-pushed
the
fix-same-repo-clients-beta20
branch
from
October 22, 2026 20:51
3f8b1ac to
a117894
Compare
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.
What
Recognize same-repo clients when dagger prints a Git module's ref in the explicit Git URL form,
<clone>#<version>:<subpath>.Why
Since dagger v1.0.0-beta.20 (dagger/dagger@81e1c30405), a module of a Git workspace prints its ref as
<clone>#<version>:<subpath>.gitSelectoronly knew<clone>/<subpath>@<version>, so in a Git workspace no client was recognized as same-repo. Each one embedded the workspace URL and commit, andgo-sdk/generate/stalefailed in Git mode on every commit (dagger/dagger#14714: 70 files, +1010 -1010).gitSelectornow also reads the version after#, up to:.The cache-namespace slowness of same-repo clients is addressed in the engine by dagger/dagger#14813 (merged).
How verified
go test ./...andgo vet ./...pass incmd/dagger-go-sdk-codegen. NewTestWorkspaceModuleExplicitGitURLcovers GitHub, a git server, a branch selector, another selector, another repository and the repository root; 4 of its cases fail without the fix.main, the go-sdk changeset is that problem and nothing else: 25 client addresses, 940 source-link comments and 45 manifest hashes.Not covered
End to end on a GitHub workspace, which always loads go-sdk from
main: after merge, bump the pin in dagger/dagger#14714 and rerungo-sdk/generate/stale.