kpack
kpack copied to clipboard
Changing builder on Image does not trigger Build if last Build failed
Suppose I have two Builders - one with a nodejs buildpack only, and other with a java buildpack only.
If I create an Image referencing some nodejs source code, but mistakenly using the java Builder, a Build will be created that will fail at the detection phase.
If I then modify the Image to point to the correct nodejs buildpack, I would expect a new Build to be generated and for it to succeed. However no new Build is created. I don't believe this is the correct behaviour.
This line might be the problem: https://github.com/pivotal/kpack/blob/9081a1861d6551e86110653f80259c9a17c2b28f/pkg/reconciler/image/build_required.go#L108