feat: emit DockerBuildPlan when the CLI owns the build (#24) - #26
Merged
antoinetoussaint-byte merged 1 commit intoAug 23, 2026
Merged
Conversation
Gate Builder.Build on BuildRequest.output_directory: when the CLI requests recipe emission, render the recipe into that directory and return a DockerBuildPlan via SingleImageBuildResponse instead of running docker build in-process. The empty case keeps the legacy in-process build, so the change is backward compatible. Re-pin core to v0.3.6 -> v0.3.8, which ships the recipe runners (SingleImageBuildPlan / RecipeBuildPlatforms). core v0.3.8 requires go 1.27.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24.
Summary
WithDockerImagesinBuilder.Build, rather than delegating to the sharedrust.BuildRustDockerrunner. So it needs a code change, not just a re-pin.Builder.Buildnow gates onservices.BuildPlanRequested(req)(a non-emptyBuildRequest.output_directory): when the CLI owns the build, it emits aDockerBuildPlanover the rendered recipe vias.Builder.SingleImageBuildResponse(req, image.FullName())so the CLI runsdocker buildxmulti-arch (linux/amd64 + linux/arm64) and pushes a manifest list. The empty-output_directorycase keeps the in-process build, so the change is backward compatible — an unmigrated CLI still gets aDockerBuildResult.runners/rust/agent_builder.goin core v0.3.8) exactly, so this agent and the shared-runner agents converge on one recipe path.Notes / risk
v0.3.4 → v0.3.8. The recipe contract landed in v0.3.6 (core#332); the runners/helpers the migration uses (SingleImageBuildPlan,RecipeBuildPlatforms,SingleImageBuildResponse) landed in v0.3.8 (core#336). v0.3.6 shipped only the primitives, so v0.3.8 is the first release this migration can pin to.godirective is bumped accordingly (forced bygo mod tidy). The release workflow runs GoReleaser ingoreleaser-cross:v1.26.4(Go 1.26.x); Go's defaultGOTOOLCHAIN=autowill fetch go1.27.0 at build time, but if the release image is network-restricted the pin may need bumping to a goreleaser-cross release that bundles Go 1.27. Flagging rather than changing release infra in this PR.Test plan
go build ./...go vet ./...go test ./...(all pass, including the newTestBuildEmitsRecipeWhenOutputDirectorySet, which asserts the plan carries a singleDockerfile/.-context recipe with the amd64+arm64 platforms and verifies against the emitted tree)docker buildx build --platform linux/amd64 -f services/<svc>/builder/Dockerfile services/<svc>🤖 Generated with Claude Code