Skip to content

core: serve the v1.0.0-beta.25 view as beta.25 did - #15134

Merged
sipsma merged 8 commits into
mainfrom
gate-post-beta25-api-impl
Nov 10, 2026
Merged

sipsma merged 8 commits into
mainfrom
gate-post-beta25-api-impl

Conversation

@eunomie

@eunomie eunomie commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Makes the v1.0.0-beta.25 schema view return what the released beta.25 engine returns, so beta.27 can "go back to the beta.25 schema when asked". Later views are unchanged.

  • Every API added after beta.25 is gated AfterVersion("v1.0.0-beta.26"), on the narrowest element (arguments over fields over types), including withPlatform, resolveBrokenSymlinks, the naming APIs and the internal underscore fields.
  • Query.identifier, formatIdentifiers and namingDictionary, removed by the naming rework, are served again for views before beta.26, with a beta.25 dictionary (without K8s/K3s).

The first two commits and a later one move the pins so the built-in Go SDK and go-sdk build with dagger/go b0476af (platform-aware gobuild, gomod declaring v1.0.0-beta.26 with distinct type names), the commit go-sdk names as daggerGo. The workspace's own dagger/go module stays on its older pin because the checks' engine loads it. Field and enum-value order of a few types still differs from beta.25 (casing work, left alone).

Checks: focused go test ./core/schema tests pass. The three updated integration tests (TestModuleNaming/...) pass on an engine built from this branch (11 passed, before the withPlatform gate and the pin move). CI of the rebased branch is pending. No full dagger check was run.

@eunomie
eunomie force-pushed the gate-post-beta25-api-impl branch 3 times, most recently from d1dbb30 to 83895c3 Compare November 10, 2026 16:57
@eunomie
eunomie marked this pull request as ready for review November 10, 2026 17:03
@eunomie
eunomie requested a review from a team as a code owner November 10, 2026 17:03
The engine image entries need go-sdk's daggerGo and the built-in Go
SDK to name the same dagger/go commit.

Signed-off-by: Yves Brissaud <[email protected]>
gomod calls Directory.withPlatform, which the v1.0.0-beta.25 view no
longer serves, so it has to declare v1.0.0-beta.26 or later.

Signed-off-by: Yves Brissaud <[email protected]>
v1.0.0-beta.27 must give callers that declare v1.0.0-beta.25 the API
the v1.0.0-beta.25 engine served.

Signed-off-by: Yves Brissaud <[email protected]>
@eunomie
eunomie force-pushed the gate-post-beta25-api-impl branch from 83895c3 to 3bca2db Compare November 10, 2026 17:37
sipsma added a commit to dagger/go-sdk that referenced this pull request Nov 10, 2026
dagger/go b0476af has both the per-platform builds that entrypoints of
modules targeting v1.0.0-beta.26 rely on (a prebuild that takes a
platform) and dagger/go's main, including its fix for the Gomod/GoMod
field collision. Dagger's built-in Go SDK moves to the same commit in
dagger/dagger#15134; the engine image's build requires the two to match.

Only a module that targets v1.0.0-beta.26 or later builds with dagger/go,
so modules on the default target are unchanged.

Signed-off-by: Erik Sipsma <[email protected]>
The engine image's entries call each Go module's prebuild with the
platform it builds for, which dagger/go's gobuild takes since its
per-platform build merged (dagger/go#100). The built-in Go SDK pinned a
dagger/go main from before that merge, whose prebuild takes no platform,
so the entries failed. It now pins dagger/go's main with that merge and
with gomod's beta.26 type names kept distinct (dagger/go#102), and go-sdk
moves to the commit that names the same dagger/go (dagger/go-sdk#103), as
the entries require. The workspace's own dagger/go module stays where it
was: the checks' engine loads it, and that engine is older than the
per-platform build needs.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma

sipsma commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

eunomie: I pushed one commit on top of yours, c3d3f6f, which moves two pins and nothing else.

Your pin pointed the built-in Go SDK at a dagger/go main that didn't have the per-platform build yet. Its gobuild prebuild takes no platform, so the engine image's entries failed at Module._prebuild(platform: ...). That build has since merged in dagger/go#100. dagger/go#102 then fixed gomod's type names under the beta.26 naming rules.

So the commit moves:

[modules.golang] stays where you had it, because CI's check engine is older than the per-platform build needs. Your two commits are unchanged.

Codegen wrote the Go release it was compiled with into the go line of
every go.mod it creates. The engine build compiles codegen with Wolfi's
go-1.27 package, which follows Go's patch releases, while the Go SDK
builds modules with a pinned golang image and GOTOOLCHAIN=local. When Go
1.27.4 came out, codegen built with it wrote "go 1.27.4", and the 1.27.3
toolchain that builds the module refused it:

  go: go.mod requires go >= 1.27.4 (running go 1.27.3; GOTOOLCHAIN=local)

Write the language version at patch 0 instead ("go 1.27.0"), which any
1.27 toolchain builds. Existing go.mod files are untouched, and one that
asks for a newer Go than codegen's is still refused.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma

sipsma commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Pushed 60d1e11 on top to fix the go: go.mod requires go >= 1.27.4 (running go 1.27.3; GOTOOLCHAIN=local) failures in this PR's module tests.

Cause: when a Go module has no go.mod, codegen creates one and writes the Go version codegen itself was compiled with as its go line. The engine build compiles codegen with Wolfi's go-1.27 package, which moved to Go 1.27.4 after its release. The Go SDK still builds modules with the pinned golang:1.27-alpine image, which is 1.27.3, with GOTOOLCHAIN=local. So every new Go module asked for a Go its builder doesn't have. Any engine that resolved Wolfi fresh broke, released or not.

Fix: codegen now writes the language version at patch 0 (go 1.27.0), which every 1.27 toolchain builds, so a new Go patch release can't break this again. Existing go.mod files are left alone.

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.

3 participants