Skip to content
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

Caching bug when changing architectures #348

Open
dmikusa opened this issue Jun 21, 2024 · 0 comments
Open

Caching bug when changing architectures #348

dmikusa opened this issue Jun 21, 2024 · 0 comments
Labels
type:bug A general bug

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Jun 21, 2024

Expected Behavior

When you build an image on AMD64, and then switch to ARM64, the cache is not invalidated. I would expect that the cache is invalidated where appropriate.

Current Behavior

Cached items are not invalidated based on architecture changes.

Possible Solution

I think we can handle this in libpak, so that individual buildpacks don't need to know all handle this. If we look at the present architecture, we can compare that to metadata from previous installs. If the arch changes, then invalidate the cache on that layer and recreate it.

Steps to Reproduce

See paketo-buildpacks/spring-boot#491 (comment)

Motivations

This is not a huge problem as most people can't just change their architecture, but on Mac M-series laptops you can. You can build for both architectures. This is where you can run into this problem.

@dmikusa dmikusa added the type:bug A general bug label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant