-
Notifications
You must be signed in to change notification settings - Fork 115
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
As a user I can re-upload artifacts if the file has gone missing or corrupted #1941
Comments
From: @goosemania (ttereshc)
I would explicitly mention here that the checksums should match, the one in the DB and the checksum of newly uploaded file (checksum in the DB should not be updated, just used for comparison)
how about option3 (a more explicit version of option2): introduce a flag which will be specified at upload time |
From: @ipanova (ipanova@redhat.com) ttereshc wrote:
I was imagining the artifat._init_and_validate would calculate all the checksums of the upload in course and when saving it in case of existing artifact we would handle the IntegrityError
This is a good compromise for the user experience improvement. |
From: @goosemania (ttereshc) ipanova@redhat.com wrote:
Right, it's a part of the try/except you mention, ok. Disregard my comment then. |
From: @goosemania (ttereshc) After some offline discussion, it turned out that this ticket implies that the upload of existing artifact (which is good and NOT corrupted or missing) will also return the existing artifact and won't fail. We also need to be sure that it's only affecting upload workflows and not the artifact creation during sync. |
From: daviddavis (daviddavis) ttereshc wrote:
#7114 asks the pulp href be returned if the artifact already exists. It does not ask that the end point should succeed and no longer fail. Also, IMO this proposal would break semantic versioning. Changing the response when a user uploads the exact same artifact twice would be a backwards incompatible change. |
From: daviddavis (daviddavis)
To me this makes the most sense. It's backwards compatible and is clear to the user what's happening. Fixing an artifact by calling the create endpoint without a special param seems a bit too strange/magical/clever IMO. |
From: @ipanova (ipanova@redhat.com) daviddavis wrote:
The caveat of this option is if a client is trying get content into pulp, like podman, there is no way to specify this option on the client side, since the pulp upload layer is in the middle of the process. I am not advocating to adjust the whole proposal based on this specific usecase, but we'd need to whether hardcode the 'force' flag in the plugin code during the upload or come up with something else to enable container plugin to deal with the corrupted content. |
From: daviddavis (daviddavis) ipanova@redhat.com wrote:
That's a good point. What about introducing a new endpoint (smart_update?)? Also, just to call it out: another option is to bump the pulpcore major version. We have some other changes in our queue that would benefit from being able to make some backwards incompatible changes to the API (e.g. https://pulp.plan.io/issues/7762) |
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution! |
Author: @ipanova (ipanova@redhat.com)
Redmine Issue: 7791, https://pulp.plan.io/issues/7791
If an artifact has gone missing or corrupted(bit rot) there is no way to re-upload it back to the filesystem
"non_field_errors": [
"sha384 checksum must be unique."
]
}
While we have /repair/ endpoint it will not work for the operations where artifact has no remoteartifact.
Problem statements:
1. If a file is missing it is impossible to upload a new one
2. If a file is corrupted it is impossible to re-upload and replace it with a valid one
It will replace broken bits if checksum of the newly uploaded file matches a checksum in the DB.
The recalculation of a checksum will happen on_demand this way and not for every upload attempt.
The text was updated successfully, but these errors were encountered: