Skip to content

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

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

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

Conversation

@eunomie

@eunomie eunomie commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Supersedes #14714 (moved from a fork branch to a branch on the canonical repo).

What

31 commits move 14 Go Dagger modules to the go-sdk Dang entrypoint, in two phases; 6 more pin go-sdk main:

  • 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.

Pins: go-sdk main at 3c5ed3595d (dagger/go-sdk#79). The generated files match v1.0.0-beta.21, which includes #14813.

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

On this head, with v1.0.0-beta.21:

  • dagger check -l and generate -l --require-load.
  • go-sdk/generate/stale passes on a local checkout and on a Git workspace.
  • go build/go vet of the touched modules.

On #14714 before this rebase:

  • release:publish-with-mock-endpoints passed on the final tree.
  • Targeted docs, php and elixir checks passed; python-client/python-310/unit matched main.
  • 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, #73 and #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; #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]>
dagger/go-sdk#79 matches same-repo clients when dagger prints a Git
module's ref as <clone>#<version>:<subpath>, so a Git workspace binds
them by path again.

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