Project

Profile

Help

Issue #4293

closed

Content delivery fails if downloaded Artifact happens to exist.

Added by gmbnomis almost 6 years ago. Updated about 5 years 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.

Added by gmbnomis almost 6 years ago

Revision 7de35c4c | View on GitHub

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

Added by gmbnomis almost 6 years ago

Revision 7de35c4c | View on GitHub

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

Actions #2

Updated by CodeHeeler almost 6 years ago

  • Status changed from NEW to POST
  • Triaged changed from No to Yes
Actions #3

Updated by gmbnomis almost 6 years ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #5

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #6

Updated by bmbouter about 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF