Actions
Issue #4293
closedContent delivery fails if downloaded Artifact happens to exist.
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
Currently, the content app fails to save an association between a content unit and a downloaded artifact if the artifact happens to already exists in the database.
This may happen if multiple content instances share the same artifact or if the content type does not
have enough metadata to ensure uniqueness without downloading the actual artifact (i.e. no digest in metadata).
Fix this by get()
ting the existing Artifact if saving it fails.
Additionally, move the saving code into a method of its own to allow derived content handlers to implement additional checks/saving steps.
Actions
Improve Artifact generation and saving for content app
Refactor Artifact generation for "on_demand" policy into method of its own. This allows derived plugin content handlers to customize the saving part.
Don't fail if the Artifact already exists. This may happen if multiple content instances share the same artifact or if the content type does not have enough metadata to ensure uniqueness without downloading the actual artifact (i.e. no digest in metadata).
fixes #4293 https://pulp.plan.io/issues/4293