build: restore BuildOptions.Version for selecting the builder#667
Open
amitmishra11 wants to merge 1 commit into
Open
build: restore BuildOptions.Version for selecting the builder#667amitmishra11 wants to merge 1 commit into
amitmishra11 wants to merge 1 commit into
Conversation
v3's BuildOptions had a Version field ("1" for classic, "2" for
BuildKit) that was dropped during the v4 moby client rewrite, even
though the underlying client.ImageBuildOptions already supports it.
Add it back and pass it through.
Fixes ory#663
This PR was written primarily by Claude Code; I reviewed the change
and ran the build test suite against a local Docker daemon before
submitting.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
This PR was written primarily by Claude Code; I reviewed the change and ran the build test suite against a local Docker daemon before submitting.
Problem
v3's
BuildOptionshad aVersionfield controlling which builder the daemon uses ("1" for classic, "2" for BuildKit, added in #416). That field is missing from v4'sBuildOptions, even though the underlyingmobyclient.ImageBuildOptions(used internally) already has an equivalentVersion build.BuilderVersionfield. The v4 rewrite (#631) just never carried it over.Fix
Version stringback toBuildOptions(build.go), matching v3's field name, type, and doc comment.build.BuilderVersion(buildOpts.Version)toimageBuildOpts.Version.Testing
TestBuildAndRunWithBuildKit, which builds and runs an image withVersion: "2"set, following the same pattern as the existingTestBuildAndRun*tests.TestBuild*suite against a local Docker daemon: all 6 tests pass, including the new one.go build ./...,go vet ./...clean.Fixes #663