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

stage_executor,layers: burst cache of layers if heredoc content is changed #5261

Merged

Conversation

flouthoc
Copy link
Collaborator

When using buildah with --layers then buildah must correctly burst layer cache if heredoc content is changed. Following is achieved via properly adding heredoc content to the history of the built image.

Closes: #5225

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake
/kind other

What this PR does / why we need it:

Closes: #5225

How to verify it

Newly added integration test

Which issue(s) this PR fixes:

Closes: #5225

Special notes for your reviewer:

Does this PR introduce a user-facing change?

stage_executor,layers: burst cache of layers if heredoc content is changed

Copy link
Contributor

openshift-ci bot commented Jan 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@flouthoc
Copy link
Collaborator Author

@containers/buildah-maintainers PTAL

@rhatdan
Copy link
Member

rhatdan commented Jan 11, 2024

LGTM
@nalind @umohnani8 @Luap99 @giuseppe PTAL

internal/mkcw/embed/entrypoint_amd64 Outdated Show resolved Hide resolved
internal/mkcw/embed/entrypoint_amd64.o Outdated Show resolved Hide resolved
@giuseppe
Copy link
Member

LGTM after the two extra files are removed

@umohnani8
Copy link
Member

LGTM after comments addresses
/hold
/lgtm

@flouthoc
Copy link
Collaborator Author

Done.

@flouthoc flouthoc force-pushed the heredoc-add-to-history branch 2 times, most recently from a39392e to 6dc71f6 Compare January 11, 2024 18:43
When using buildah with `--layers` then buildah must correctly burst
layer cache if `heredoc` content is changed. Following is achieved via
properly adding `heredoc` content to the history of the built image.

Closes: containers#5225

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
@rhatdan
Copy link
Member

rhatdan commented Jan 12, 2024

/lgtm
/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit e676f85 into containers:main Jan 12, 2024
34 checks passed

# on third run since we have changed heredoc so `Cache burst` must be printed.
run_buildah build $WITH_POLICY_JSON --layers -t source -f $contextdir/Dockerfile
expect_output --substring "Cache burst"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion: "Cache burst add diff"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@edsantiago I have fixed this is a new PR with another feature: #5314

@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build --layers does not rebuild layer on heredoc change
6 participants