Project

Profile

Help

Issue #4293

Content delivery fails if downloaded Artifact happens to exist.

Added by gmbnomis 10 months ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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.

Associated revisions

Revision 7de35c4c View on GitHub
Added by gmbnomis 10 months ago

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

Revision 7de35c4c View on GitHub
Added by gmbnomis 10 months ago

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

History

#2 Updated by CodeHeeler 9 months ago

  • Status changed from NEW to POST
  • Triaged changed from No to Yes

#3 Updated by gmbnomis 9 months ago

  • Status changed from POST to MODIFIED

#4 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#5 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF