Project

Profile

Help

Issue #4272

closed

ArtifactFileField's validation is too strict

Added by dkliban@redhat.com almost 6 years ago. Updated almost 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:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

ArtifactFileField validates that the file being saved does not already exist in Artifact storage[0]. However, when bulk_get_or_create encounters a problem during bulk_create, it already moves the file into place before falling back to saving each model individually[1]. As a result, the validation logic from ArtifactFileField throws a ValueError because the file is already in Artifact storage, however it is still not saved to the database.

The validation should allow the file to be already in Artifact storage as long as it's being "saved" to the exact same location as it is at already.

[0] https://github.com/pulp/pulp/blob/master/pulpcore/app/models/fields.py#L31
[1] https://github.com/pulp/pulp/blob/master/pulpcore/app/models/content.py#L46

Actions #1

Updated by dkliban@redhat.com almost 6 years ago

  • Tags Pulp 3 added

Added by mdellweg almost 6 years ago

Revision a73e29d0 | View on GitHub

Do not fail if file already moved to storage

https://pulp.plan.io/issues/4272 closes #4272

Added by mdellweg almost 6 years ago

Revision a73e29d0 | View on GitHub

Do not fail if file already moved to storage

https://pulp.plan.io/issues/4272 closes #4272

Actions #2

Updated by mdellweg almost 6 years ago

  • Status changed from NEW to MODIFIED
Actions #3

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #4

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #5

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF