kpack: Churn bug when clusterstack run image digest is out of date with tagged run image
When clusterstack run image is not fully qualified and is instead a soft pointer like paketo-buildpacks/run and the last reconcile of the clusterbuilder is out of date with the current tagged image on dockerhub, then an infinite number of builds are scheduled as kpack is trying to get a build to produce an image with the old run image.
To reproduce: Create a stack with spec.image.run-image pointing to a run image with tag Create a builder and build with this stack Update image ref by tag Trigger a new build
Here are also some other reproduction steps reported in issue #979
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (11 by maintainers)
Update
Hi Guys, based on what we discussed last Friday, I just created a Draft PR with some changes that I tested locally. I ran my test scenario and the bug was also solved with the changes describe in the Pull Request and here are a couple of screenshots with the pod execution data.
Build-2
Nothing new, the manual build triggered just right after the run-image was updated.
Build-3
New stack build executed just right after the build-2 finished. Here we can see the
--run-imageflag with the data took it from the new field added to BuildSpec and we can also see thenewandoldpointers are switchedBuild-4
New stack build executed just right after the build-3 finished. We can see similar data to Build-3 but now the
newandoldreferences points to the correct valuesThanks @zhoufenqin,
I managed to reproduce it, triggering the new build right after I pushed my run-image. I will try to check the code tomorrow!
Hi @zhoufenqin I wasn’t able to work on this last week, but, my plan is to do it this week. I will keep everybody up to date.
Hi @jjbustamante , any update on this issue? Which kpack version will fix this?
Thank you @jjbustamante 😃 I added some details, once the cluster runImage is updated and the builder configured stack runImage hasn’t been updated, multiple builds will be triggered. The
image.kpack.io/reasonisSTACKorCONFIG, STACK