Project

Profile

Help

Issue #4293

Content delivery fails if downloaded Artifact happens to exist.

Added by gmbnomis about 2 years ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
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.

Associated revisions

Revision 7de35c4c View on GitHub
Added by gmbnomis about 2 years 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 about 2 years 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 about 2 years ago

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

#3 Updated by gmbnomis about 2 years ago

  • Status changed from POST to MODIFIED

#4 Updated by daviddavis almost 2 years ago

  • Sprint/Milestone set to 3.0.0

#5 Updated by bmbouter almost 2 years ago

  • Tags deleted (Pulp 3)

#6 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF