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
Overwriting existing packages in backend storage can lead to caching issues #5149
Comments
I was able to reproduce this with a pulp dev environment using minio. Steps to reproduce:
Here's the output I see:
So the Like Azure, there is a |
Adding a check here before save to try to fetch any existing artifact seems to fix the problem. I think what's happening is that django-storages updates the file in storage regardless of whether the artifact already exists or not. |
@daviddavis do you want to open a PR? |
…ngo-storages was being updated on duplicate uploads. Closes pulp#5149
…ngo-storages was being updated on duplicate uploads. Closes pulp#5149
Fixes a bug where the Last-Modified header of a package stored in django-storages was being updated on duplicate uploads. Closes pulp#5149
Fixes a bug where the Last-Modified header of a package stored in django-storages was being updated on duplicate uploads. Closes #5149
If an existing package is re-added to pulp, the default behavior will overwrite the existing file in backing storage. This is typically fine.
AZURE_OVERWRITE_FILES
tofalse
this partially mitigates the issue (Last-Modified/ETag are unmodified). However, this results in duplicate copies written to storage (with a suffix to differentiate from the original).The text was updated successfully, but these errors were encountered: