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

Ensure we always normalize history before saving #269

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

natalieparellano
Copy link
Member

@natalieparellano natalieparellano commented Apr 22, 2024

Prior to this commit, we were normalizing history whenever layers were added (either via AddLayer or ReuseLayer),
but when rebasing, if the new base image has empty layer history, the information about the empty/non-empty aspect of the history will be lost if "preserve history" isn't set on the image.

Prior to the "v1 refactor" in #257 we were also normalizing history before saving, so this is restoring previous behavior.

Previously, we normalized history whenever layers were added
(either via AddLayer or ReuseLayer),
but when rebasing, if the new base image has empty layer history
the information about the empty/non-empty aspect of the history will be lost
if "preserve history" isn't set on the image.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano requested a review from a team as a code owner April 22, 2024 16:28
Copy link
Member

@jjbustamante jjbustamante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! This fixes a problem with were having on pack with the acceptance tests when bumping to the latest version of lifecycle and imgutil

@natalieparellano natalieparellano merged commit 30b0025 into main Apr 22, 2024
3 checks passed
natalieparellano added a commit to buildpacks/lifecycle that referenced this pull request Apr 22, 2024
Signed-off-by: Natalie Arellano <narellano@vmware.com>
natalieparellano added a commit to buildpacks/lifecycle that referenced this pull request Apr 22, 2024
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants