Skip to content

Publish the Go and PHP SDKs again, and check release on the engine that publishes - #15123

Merged
sipsma merged 4 commits into
mainfrom
sipsma/publish-sdk-source-repo
Nov 9, 2026
Merged

sipsma merged 4 commits into
mainfrom
sipsma/publish-sdk-source-repo

Conversation

@sipsma

@sipsma sipsma commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

After #15080 merged, main's Publish failed to publish the Go and PHP SDKs. This restores them, makes release's publish check run on the engine that actually publishes, and moves the workspace's golang module to dagger/go's merged per-package build.

What Publish failed on

Publish runs release on the released engine that .github/actions/call pins, v1.0.0-beta.25. Release serves go-client-dev and php-client-dev from its own tree. #15080 stopped passing those two SDKs a source repository, relying on its engine change that gives a module served from a module's tree its contextual git. The released engine doesn't have that change, so it can't serve a GitRepository default to a module served from release's tree:

  • Go: the default resolved to the module's own checkout, a single commit with no branches: repository does not contain ref "main".
  • PHP: the default resolved to nothing, and php-client-dev panicked on a nil sourceRepo.

The mock publish check missed it because it ran release on an engine built from the tree, and its main publish didn't check the SDKs.

What each commit does

  1. release: pass the go and php SDKs their source repository again. Release passes its workspace head as those two SDKs' source repository, so main and tagged releases publish them again. A comment says to drop it once the pinned engine includes the engine change.

  2. release: run the publish check on the engine Publish runs on. release/publish-with-mock-endpoints runs release on the engine image of the version .github/actions/call pins, read from the action's default, with that image's CLI, and its main publish now also requires the Go and PHP SDKs. The image is pinned in dagger.lock, like the check's other images.

    The trade: the check no longer tests release on the tree's engine. That engine isn't what publishes, and a change release needs from a newer engine has to wait for the pin to move anyway. Bumping the pin now runs this check on the new version before Publish does.

  3. golang: move to dagger/go's merged per-package build. One line in dagger.toml, to the merge of go: per-package builds that share module downloads and plans, with faster edits, lints and gobuild loads go#95. It lists a custom base's tests without building the base, and globs the generate patterns once per listing rather than once per Go module. Nothing regenerates.

  4. util/compressutil: make the reuse test's streams before it opens one. Test-only. The decoder-reuse test Fresh dagger check -l of dagger/dagger in under 5 s: per-package Go builds, a pre-warmed engine cache, and faster module loading and check planning #15080 brought to main failed intermittently here, on two of this PR's three test runs, because the test's own allocations let the garbage collector empty the decoder pool. The same commit is on engine: remote cache fixes — relocate module source references, keep a cached module's core API version, fewer lookups, exports without the Cloud's offers, module results per CPU architecture, faster cache-volume collection and network teardown at stop, graph-lock profiling — and remove the test fixture #14828 and drops out when that PR is rebased.

Verification

The changed check, run through Dagger on a 16-CPU, 32 GB machine, one run per arm:

Tree Result
Main with commit 2 alone Fails as Publish did: the PHP panic on a nil sourceRepo, and repository does not contain ref "main"
Main with commits 1 and 2 Passes, in about 17 minutes

Peak memory is unchanged, at about 11 GB of 30.7.

The golang pin's effect

dagger check -l --all of this repository, on an m8gd.4xlarge, each fresh run on a new engine; three fresh and two warm runs per pin:

Previous pin This pin
Fresh 50.9, 52.3, 54.05 s 39.5, 39.7, 40.0 s
Warm 4.85, 4.85 s 2.3, 2.9 s

The machine's first four fresh runs, not included above, were slower for a reason we didn't find: 81.3 and 53.9 s with the previous pin, 50.8 and 55.4 s with this one. The 849 rows listed are byte-identical between the two pins. Plain dagger check -l isn't affected. The workspace still loads on the released engine.

main's Publish failed to publish the Go and PHP SDKs. Publish runs release
on the engine .github/actions/call pins, v1.0.0-beta.25, and release serves
go-client-dev and php-client-dev from its own tree. That engine predates
"core: give a module served from a module's tree its contextual git", so
their +defaultPath="/" source repository resolved without that change: the
Go SDK's to the module's checkout, a single commit with no branches, which
has no ref "main"; the PHP SDK's to nothing, since its context holds no
.git, and php-client-dev panicked on a nil sourceRepo.

Pass release's own repository, its workspace head as a repository of the
remote, as release did before "release: let the go and php SDKs default
their source repository". Drop it once the engine the call action pins
includes the engine change.

Signed-off-by: Erik Sipsma <[email protected]>
The publish check ran release on an engine and a CLI built from the tree,
but Publish runs release on the dagger version .github/actions/call pins.
So the check passed while main's Publish failed to publish the Go and PHP
SDKs: the tree's engine resolves a served module's default source
repository, and the pinned one doesn't. Its main publish also checked only
the engine and the CLI, so the SDKs a main publish releases went unchecked.

Run the check's nested release engine from the engine image of the version
the call action pins, read from its default, with that image's CLI, and
check that the main publish releases the Go and PHP SDKs too.

The check no longer runs release on the tree's engine. That isn't what
publishes: a release is published by the pinned version, including the
release that first ships a new engine, so a change release needs from a newer
engine has to wait for the pin to move. Bumping the pin now runs the check on
the new version before Publish does.

Signed-off-by: Erik Sipsma <[email protected]>
The workspace's golang module moves to the merge of dagger/go#95, which
lists a custom base's tests without building the base and globs the
generate patterns once per listing, not once per Go module.

Signed-off-by: Erik Sipsma <[email protected]>
The test of decoders reused across streams requires that more than 20 of
its 99 opens get the decoder the stream before returned, and it failed
once under the race detector at 19. It made each round's streams between
one stream's close and the next open, which allocates enough for the
garbage collector to empty the decoder pool: under the race detector, 20
runs reused 39 to 58 times, and a loaded CI machine went lower. With every
stream made before the first is opened, 20 runs reused 69 to 83 times,
about the three quarters the race detector's own drops leave. The test
checks the same streams in the same order.

Signed-off-by: Erik Sipsma <[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.

2 participants