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

contenthash: include basename in content checksum for wildcards #2018

Merged
merged 1 commit into from
Apr 14, 2021

Conversation

tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Mar 12, 2021

fixes #2008

While we generally ignore the basename in this layer, for wildcards
there in no other place to add the basename to the checksum as they
can not be resolved earlier. Before the basename that was in the
checksum was the wildcard itself, so if the wildcard remained same,
content remained same but the file where wildcard pointed to was
renamed, the cache was not invalidated.

Unfortunately, this change breaks cache for all copy commands that
use a wildcard.

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

@AkihiroSuda
Copy link
Member

needs rebase

@thaJeztah
Copy link
Member

@tonistiigi should we cherry-pick this one for v0.8.x ?

While we generally ignore the basename in this layer, for wildcards
there in no other place to add the basename to the checksum as they
can not be resolved earlier. Before the basename that was in the
checksum was the wildcard itself, so if the wildcard remained same,
content remained same but the file where wildcard pointed to was
renamed, the cache was not invalidated.

Unfortunately, this change breaks cache for all copy commands that
use a wildcard.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@thaJeztah
Copy link
Member

@AkihiroSuda @tiborvass @hinshun I see this was rebased; ptal

@AkihiroSuda AkihiroSuda merged commit c47972d into moby:master Apr 14, 2021
@tonistiigi tonistiigi mentioned this pull request Apr 22, 2021
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.

Not invalidating cache when renaming a file and COPY wildcard
3 participants