As a user I can re-upload artifacts if the file has gone missing or corrupted
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
The issue names artifact upload handling, storage_path, and the existing /repair/ endpoint but no files or tests. Start by tracing those entry points and comparing the missing-file and corrupted-file cases. Agree on the recovery approach and API behavior with maintainers; done means users can restore missing or corrupted artifact data without the current checksum error.
Written by the indexing model from the issue text.
Description
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
- upload an artifact
- rm /var/lib/pulp/artifacts/<some_artifact> or corrupt it
- upload same artifact
- 400 error with {
"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
- when saving artifact add try/except, look for existing one
- verify whether storage_path is an existing location if not update it with the newly uploaded bits
- Issue 400 due to duplicated artifact, but in addition return the href of the existing artifact.
2. If a file is corrupted it is impossible to re-upload and replace it with a valid one
- option1 Running repair can find corrupted files. It should remove the corrupted file to get back to the case outlined in 1. .
- Repair can be run against specific repo version, potentially can extend the functionality to repair a specific artifact/content
- option2 We could recalculate the checksum on all upload attempts.
- Might be a lot of overhead for a rare failure
- option3 Introduce a flag which will be specified at upload time E.g. --repair, or --force, or --validate-checksum.
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.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pulp/pulpcore
-
Issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Feature
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Feature
-
upgrading to 3.117.1 fails without saying which Distribution base_paths are violating constraint OpenIssue
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Issue Triage-Needed
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100