-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate the cache image and previous image in the analyze phase #1060
Validate the cache image and previous image in the analyze phase #1060
Conversation
I actually tested this end to end by creating a custom builder with my updated lifecycle and it seems like this is not sufficient to solve the issue. I can see the corrupt image is ignored during analysis but I am now getting a new error while exporting:
|
f8afa85
to
e13b372
Compare
OK figured it out, all is well. I got confused by some nested conditionals... I have now tested end to end and confirmed that this is working properly and it handles previous app images and cache images with missing layers. @natalieparellano @jabrown85 this is ready for review now. |
windows failures are fixed by this PR in imgutil: buildpacks/imgutil#196 |
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
d025e60
to
0e7002e
Compare
@matthewrobertson looks like we still have failures in windows about corrupt images. https://github.com/buildpacks/lifecycle/actions/runs/4758563102/jobs/8456787984?pr=1060#step:6:6897 If you don't have any ideas maybe we can get someone with a windows rig to help take a look |
I still see logs like "Ignoring cache image "xxx" because it was corrupt" in test output. I will poke around to see if I can figure out why they are failing the validation. |
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
@jabrown85 looks like the code was doing what it was supposed to do 😄 Windows base image layers weren't being pushed to the registry because of this: https://docs.docker.com/engine/reference/commandline/dockerd/#allow-push-of-nondistributable-artifacts Should be fixed now 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I'll let @natalieparellano weigh in as well before merge but it looks great to me and all the tests are now passing 😄
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
fc62705
to
bcd6cf1
Compare
Signed-off-by: Matthew Robertson <mattrobertson@google.com>
bcd6cf1
to
2e37951
Compare
Updates the analyzer to only reuse layers from the previous app image or cache image if they are not corrupt. This uses the new
imgutil::Valid()
that was added in buildpacks/imgutil#190Fixes #1044