[BUG] v1alpha1 Build Strategies with builder-image
parameters fail
#1431
Labels
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
Is there an existing issue for this?
Kubernetes Version
1.27
Shipwright Version
v0.12.0
Current Behavior
If a build strategy is created using the
v1alpha1
API and includes a parameter with the namebuilder-image
, its value is not set correctly if theBuild
orBuildRun
usesparamValues
to set the parameter value.Expected Behavior
Builds should succeed if the
builder-image
parameter is declared in the build strategy, even for v1alpha1 APIs. The conversion webhook should not overwrite values if they are present.Steps To Reproduce
Create a
ClusterBuildStrategy
that uses thev1alpha1
API and abuilder-image
parameterCreate a
Build
that utilizes the build strategy:$ shp build create s2i-ex --strategy source-to-image ...
Start a build referencing this strategy:
$ shp build run s2i-ex
Anything else?
Work-around is to use a parameter name that is not
builder-image
.For example, source-to-image build strategies can use the
s2i-builder-image
parameter.Root issue likely due to the fact we are using "magic parameters" to translate fields that were deprecated in v1alpha1 and removed in v1beta1. I suspect we'll see a similar bug with the
dockerfile
parameter.https://github.com/shipwright-io/build/blob/main/pkg/apis/build/v1beta1/build_conversion.go#L167-L186
The text was updated successfully, but these errors were encountered: