Skip to content

Move the repository's Go modules to the go-sdk Dang entrypoint - #14714

Closed
eunomie wants to merge 37 commits into
dagger:mainfrom
eunomie:go-sdk-entrypoint-migration
Closed

eunomie wants to merge 37 commits into
dagger:mainfrom
eunomie:go-sdk-entrypoint-migration

Conversation

@eunomie

@eunomie eunomie commented Oct 17, 2026

Copy link
Copy Markdown
Member

What

31 commits move 14 Go Dagger modules to the go-sdk Dang entrypoint, in two phases:

  • Phase A: a generated Dang entrypoint and unified clients per module; dagger.lock pins go-sdk main.
  • Phase B: no global client; per-dependency client packages, and core types from dagger.io/dagger/core.

apko and python-client-dev stay on the legacy runtime.

Behaviour changes

  • No engineVersion means the v1 view: execs nest, so execs that start a Dagger client unset DAGGER_SESSION_PORT/DAGGER_SESSION_TOKEN.
  • A module called by another gets no workspace: callers pass source/workspaceDir/sourceRepo and filter directories with the callee's +ignore list.
  • Checks of v1 dependencies are Check objects; a legacy callee's check gets a Void client, so python-client-dev stays legacy.

How verified

  • release:publish-with-mock-endpoints passes on the final tree.
  • Targeted docs, php and elixir checks pass; python-client/python-310/unit matches main.
  • dagger check -l, generate -l --require-load, clean git-mode generation, go build/go vet at every commit.
  • Not run: a full workspace dagger check (not completed), the release dry-run closures, golangci-lint at the tip, SDK suites and test-split shards.

No go-sdk tag has the beta.18 sources contract (dagger/go-sdk#67), the
include migration (dagger/go-sdk#69) or dependencies through the global
client (dagger/go-sdk#70).

Signed-off-by: Yves Brissaud <[email protected]>
The entrypoint takes the module description from the main type's doc
comment, not from the package doc comment.

Signed-off-by: Yves Brissaud <[email protected]>
go-sdk refuses [[dependencies]] and [codegen] in a manifest it moves to
an entrypoint; wolfi stays a client of the scope in dagger.toml.

Signed-off-by: Yves Brissaud <[email protected]>
go-sdk needs go.mod in the module directory and refuses
source = "dagger", so the code moves up from dagger/. The entrypoint
has no module description, so the main type's doc comment carries it.

Signed-off-by: Yves Brissaud <[email protected]>
The entrypoint takes the module description from the main type's doc
comment, not from the package doc comment.

Signed-off-by: Yves Brissaud <[email protected]>
Unified clients name the cli-dev client after its module, so the
dagger-cli alias of the old manifest becomes CliDev. Core types now
come from dagger.io/dagger/core, so staticcheck flags GitRef.Commit.

Signed-off-by: Yves Brissaud <[email protected]>
dagger/go-sdk#71 drops [codegen] and the [[dependencies]] that scope
clients provide when a module moves to the Dang entrypoint.

Signed-off-by: Yves Brissaud <[email protected]>
go-sdk refuses [[dependencies]] and [codegen] in a manifest it moves to
an entrypoint; alpine stays a client of the scope in dagger.toml.

Signed-off-by: Yves Brissaud <[email protected]>
An entrypoint manifest cannot carry disableDefaultFunctionCaching;
+cache="session" on each function keeps the per-session caching.

Signed-off-by: Yves Brissaud <[email protected]>
Unified clients name the engine-dev client after its module, so the
dagger-engine alias of the old manifest becomes EngineDev. Execs nest
on the v1 API, so phpunit and the codegen dagger call drop the outer
session to reach the dev engine, as with the v0.21.9 engineVersion.

Signed-off-by: Yves Brissaud <[email protected]>
Unified clients name the engine-dev client after its module, so the
dagger-engine alias of the old manifest becomes EngineDev. Execs nest
on the v1 API, so cargo test drops the outer session to reach the dev
engine, as with the v0.21.9 engineVersion.

Signed-off-by: Yves Brissaud <[email protected]>
The v1 client exposes the ReleaseDryRun checks of cli-dev and
rust-client-dev as Check objects, so the dry run reads each check's
failure from Check.error. Called from an entrypoint, contextual
defaults resolve against the callee's own module, so release passes
the workspace root as php's and python's workspaceDir and its head as
go's and php's sourceRepo. A passed directory skips the callee's
+ignore, so release filters each one with a copy of the callee's
pattern list. Execs nest on the v1 API, so the publish check's CLI
drops the outer session to reach the dev engine.

Signed-off-by: Yves Brissaud <[email protected]>
dagger/go-sdk#72, dagger#73 and dagger#74 fix dependency type aliases, same-repo
clients in git workspaces and otel-go's genproto requirements.

Signed-off-by: Yves Brissaud <[email protected]>
Core types now come from dagger.io/dagger/core, so staticcheck flags
GitRef.Commit. Called from engine-dev or release, cli-dev's default
source would resolve against its entrypoint sources, which lack
cmd/dagger, so those callers pass their source. A passed directory
skips the callee's +ignore, so they filter it with a copy of cli-dev's
pattern list.

Signed-off-by: Yves Brissaud <[email protected]>
go-sdk refuses [[dependencies]] and [codegen] in a manifest it moves to
an entrypoint; the four dependencies stay clients of the scope. The v1
API of the unified client deprecates GitRef.ref in favour of name.
release passes docs-dev's source, whose default would resolve against
the entrypoint sources, filtered with a copy of docs-dev's +ignore
list, which a passed directory skips.

Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Cloud generates from a git workspace. A beta.18 run on a local checkout
wrote these source links one directory short; dagger#14665,
released in v1.0.0-beta.19, fixes that, so both modes now agree.

Signed-off-by: Yves Brissaud <[email protected]>
dagger/go-sdk#75 continues the engine's trace in the dispatcher. Git
workspaces resolve go-sdk main live instead of the lock pin, so Cloud
already generates with it.

Signed-off-by: Yves Brissaud <[email protected]>
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]>
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

eunomie commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Superseded by #14840 (same changes, moved from a fork branch to a branch on this repository).

@eunomie eunomie closed this Oct 23, 2026
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