run,commit: clean up parents of mount targets, too#6233
Merged
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom Jun 22, 2025
Merged
run,commit: clean up parents of mount targets, too#6233openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
Conversation
43681bf to
b83bf4d
Compare
The TempVolumes field is used to track data that's specific to a Run() call, and there can be more than one of those going at a time. Merge its data into the runMountArtifacts struct, which already keeps a list of locations that we have to clean up in exactly the same way. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Always call the nested TarWriter's Flush() method after writing file contents. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When RUN requires us to create the target for a mountpoint, make note of it and any parent directories that needed to be created, and clear them all out if they look basically the same after the command finishes. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When RUN requires us to create the target for a mountpoint, make note of it and any parent directories that needed to be created, and filter them out when generating a layer diff or --output data. The exceptions will be directories that the conformance tests confirm that BuildKit also leaves behind, though for compatibility with the classic builder, we have to make that conditional. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, nalind The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
/lgtm |
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/podman
that referenced
this pull request
Jul 23, 2025
As of Buildah v1.41, the return from the `podman diff` command has changed due to how Buildah build is now ignoring mount targets use for RUN instructions. This was per a request from the OSTREE group, and the associated PR is: containers/buildah#6233 Buildah v1.41 will be part of Podman v5.6 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/podman
that referenced
this pull request
Jul 23, 2025
As of Buildah v1.41, the return from the `podman diff` command has changed due to how Buildah build is now ignoring mount targets use for RUN instructions. This was per a request from the OSTREE group, and the associated PR is: containers/buildah#6233 Buildah v1.41 will be part of Podman v5.6 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
TomSweeneyRedHat
added a commit
to TomSweeneyRedHat/podman
that referenced
this pull request
Jul 23, 2025
As of Buildah v1.41, the return from the `podman diff` command has changed due to how Buildah build is now ignoring mount targets use for RUN instructions. This was per a request from the OSTREE group, and the associated PR is: containers/buildah#6233 Buildah v1.41 will be part of Podman v5.6 Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
What this PR does / why we need it:
When RUN requires us to create the target for a mountpoint, make note of it and any parent directories that needed to be created, clear them all out if they look basically the same after the command finishes, and make sure to filter them out when generating a layer diff or
--outputdata.The exceptions will be directories that the conformance tests confirm that BuildKit also leaves behind, though for compatibility with the classic builder, we have to make that conditional.
How to verify it
New conformance tests!
Updated integration tests!
Which issue(s) this PR fixes:
Related to #3525
Fixes #4242
Special notes for your reviewer:
Does this PR introduce a user-facing change?