Skip to content

[release-1.41] Exclude pulled up parent directories at commit-time #6306

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

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #6296

/assign nalind

None

nalind added 4 commits July 31, 2025 14:56
Add an optional ModTimeNew field to MkdirOptions, for setting the
timestamp on newly-created directories.  Note that the timestamps on
parent directories of the topmost newly-created directories are not
something we affect, so they'll be updated as usual.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Have Ensure() also return the parent directories of items that it
created, along with information about them that can be used to filter
them out of the layer at commit-time.

This modifies the signature of Ensure(), but it was added in 1.41.0, and
shouldn't (yet) have any external users.

Signed-off-by: Nalin Dahyabhai <[email protected]>
When Ensure() tells us about the parent directories of a mountpoint
target that it created for us, add them to the list of items that we'll
exclude from the commit unless something else causes them to be
modified.

The "native" overlay diff method just walks the diff directory, so we
can get directories in the committed layer that look exactly like the
ones in the previous layer, depending on the storage driver.  And while
it's barely noticeable, we can still control for it.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add a test that causes parent directories of mount targets to be "pulled
up" if we're running on top of overlay in a situation where its native
diff method is available, and ensure that we can still avoid adding
those directories to the committed layer when we're the only reason they
were pulled up.

Signed-off-by: Nalin Dahyabhai <[email protected]>
@nalind
Copy link
Member

nalind commented Jul 31, 2025

Would like this and #6302 together.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Aug 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, openshift-cherrypick-robot

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

@openshift-ci openshift-ci bot added the approved label Aug 5, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 2ab5981 into containers:release-1.41 Aug 5, 2025
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants