Skip to content

fix(go): ignore the URL scheme when matching same-repo clients - #78

Merged
eunomie merged 1 commit into
dagger:mainfrom
eunomie:fix-same-repo-client-scheme
Oct 20, 2026
Merged

eunomie merged 1 commit into
dagger:mainfrom
eunomie:fix-same-repo-client-scheme

Conversation

@eunomie

@eunomie eunomie commented Oct 20, 2026

Copy link
Copy Markdown
Member

What

Compare the workspace address and a module's clone URL without the URL scheme when matching same-repo clients.

Why

A GitHub workspace address has no scheme (github.com/o/r@sha), but its modules' clone URL has https://. #73's prefix check never matched on github.com, so same-repo clients still embedded the workspace URL and commit, and go-sdk/generate/stale could never pass.

How verified

  • Move the repository's Go modules to the go-sdk Dang entrypoint dagger#14714 on Cloud: 70 files, +1009 -1009, all same-repo clients, expecting ModuleGraphQLClient(connection, "https://github.com/dagger/dagger/.dagger/modules/go@<merge sha>", "<merge sha>") instead of "/.dagger/modules/go", "".
  • TestWorkspaceModule GitHub row: false before, true after; the other-host row stays false.
  • go test ./... and go vet pass in cmd/dagger-go-sdk-codegen.

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 rerun the check.

A GitHub workspace address has no scheme while the clone URL of its
modules has https://, so the prefix check of dagger#73 never matched on
github.com and those clients still embedded the workspace URL and commit.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie marked this pull request as ready for review October 20, 2026 13:56
@eunomie
eunomie merged commit fb80116 into dagger:main Oct 20, 2026
8 of 9 checks passed
@eunomie
eunomie deleted the fix-same-repo-client-scheme branch October 20, 2026 15:17
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 20, 2026
dagger/go-sdk#78 matches same-repo clients regardless of the URL scheme,
so a GitHub workspace now binds them by path like a local checkout.

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 21, 2026
dagger/go-sdk#78 matches same-repo clients regardless of the URL scheme,
so a GitHub workspace now binds them by path like a local checkout.

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 22, 2026
dagger/go-sdk#78 matches same-repo clients regardless of the URL scheme,
so a GitHub workspace now binds them by path like a local checkout.

Signed-off-by: Yves Brissaud <[email protected]>
eunomie added a commit to eunomie/dagger that referenced this pull request Oct 22, 2026
dagger/go-sdk#78 matches same-repo clients regardless of the URL scheme,
so a GitHub workspace now binds them by path like a local checkout.

Signed-off-by: Yves Brissaud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant