-
Notifications
You must be signed in to change notification settings - Fork 18
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
Image build without previous-image setting fails with interface conversion error #269
Comments
I can see why you're hitting this in the code, but trying to understand your circumstances/use case a little more. Can you reproduce this with |
Hey @dmikusa! I tried, but can't reproduce with For Our CI process runs on a Kubernetes cluster as a Jenkins Pipeline, and we run the lifecycle commands inside a |
OK, thanks for the context. Not sure what would be different about running the creator directly vs pack in this case. Good to know though. Thanks |
Good question. We built our pipeline based on the "official" Tekton pipeline (that uses the creator too), see: https://github.com/tektoncd/catalog/blob/main/task/buildpacks/0.6/buildpacks.yaml |
@dmikusa |
I was thinking it might be the Aside from that, it is likely that a prerequisite of the platform API spec isn't being met by your setup. When you run the creator directly, you're responsible for implementing the platform API spec. I'm basing that on the fact that pack, a known good implementation of the platform spec is working OK. What I would suggest is turning on debug logging.
These two lines run right before the problem and print the locations of the metadata files being compared. The second one is the problematic one. Locate that file, see if it exists and see what's in it. The code is iterating over the contents of the dependencies in that file. It looks like it gets something, but then fails to read part of one of the dependency objects. If we can get the contents of the source, it might be clear what other workarounds are available. To be clear, we do intend to fix this and make the code more robust. It is just a lower priority because it works with pack/Spring Boot build tools. Also, this is just a slow time of year with lots of people being OOO so there's not as many hands available to help fix things. |
Please let me know if you want me to create a separate ticket, but I do encounter a very similar problem. The The difference between a successful build and a failed one seems to be with how the deprecationDate is encoded. Sometimes (don't exactly understand in which case) it is encoded as a UTC date and it fails, but if it is encoded in the standard RFC3339 then it succeeds. Example of a failure (
Example of a success: (
Possible fix (workaround?) could be a type switch in
Would a MR like the above be acceptable? Any other things I can check to better isolate/reproduce? |
In addition to the above, I think I better understand the root cause now. We were using https://github.com/paketo-buildpacks/ca-certificates/releases/tag/v3.6.6 which relies on libpak v1.67.2. That version is more lenient in his parsing of layer metadata. In libpak v1.68 we essentially became more strict in what we accept as valid in the layer metadata due to this change: https://github.com/paketo-buildpacks/libpak/pull/261/files After updating ca-certificates to v3.6.7 we haven't seen this issue anymore. I'll create a MR however to prevent the panic in the Equal method when the metadata is not as expected. We are dealing with quite the ecosystem of various buildpack layers so that will make it a bit more robust. Do you agree @pivotal-david-osullivan ? |
@dmikusa any thoughts? Greatly appreciated |
Prevents panic as described in issue paketo-buildpacks#269. This change makes the Equals method more robust, by not panicking when the deprecationDate is present in the layer metadata in an unexpected format.
@jpastoor FYI, we cut release 1.68.2 of libpak this week. That has your fix and another fix from @pivotal-david-osullivan which should also fix a caching bug. We've updated all of the buildpacks, as soon as we get them all released you'll be able to pick up that fix. That might happen with today's release, or worst case, next week's release cycle. |
Thanks, appreciate the work!
Op vr 16 feb 2024 14:36 schreef Daniel Mikusa ***@***.***>:
… @jpastoor <https://github.com/jpastoor> FYI, we cut release 1.68.2
<https://github.com/paketo-buildpacks/libpak/releases/tag/v1.68.2> of
libpak this week. That has your fix and another fix from
@pivotal-david-osullivan <https://github.com/pivotal-david-osullivan>
which should also fix a caching bug. We've updated all of the buildpacks,
as soon as we get them all released you'll be able to pick up that fix.
That might happen with today's release, or worst case, next week's release
cycle.
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFTA6U33CI55WJVQH4GQM3YT5OHRAVCNFSM6AAAAAA2SVOMLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBYGM4TSMJXGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I believe this to have been resolved with the 1.68.2 release. Closing. |
After PR #261 it looks like that image creation without any previous image fails with an error.
Expected Behavior
The image can be built without any previous image.
Current Behavior
The following error occurs during image build:
Possible Solution
Rollback the base image maximum 0.3.279-base
Steps to Reproduce
Create an image with the following command inside a buildpacks/base based container:
The text was updated successfully, but these errors were encountered: