Project

Profile

Help

Issue #3016

closed

Removal of an Artifact leaves repo with associated artifactless Content forever

Added by ttereshc over 6 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 29
Quarter:

Description

Steps to reproduce:

  • create repo
  • create importer with immediate policy
  • sync
  • remove Artifact by its id, e.g. http://127.0.0.1:8000/api/v3/artifacts/0585cddf-0782-47b2-886b-ba08d2cad163/

Observe no records in pulp_app_artifact, pulp_app_contentartifact, pulp_app_remoteartifact for the deleted Artifact (because of ON_CASCADE delete).
All the Content-related tables stay untouched => repository claims to have all the content.
Key attributes of deleted Artifact are left in pulp_file_filecontent (path and digest).

I don't think that importer is expected to recover from this state with a subsequent sync (e.g. RemoreArtifact doesn't exist for the deleted Artifact, so if this content no longer exists in the upstream repo + sync mode is additive, this artifactless Content will remain in repo.

Workaround: explicitly delete related Content.

Actions #1

Updated by dkliban@redhat.com over 6 years ago

Did you remove teh Artifact using REST API or directly in the database?

I don't think we want to allow the REST API for deleting Artifacts to support deletion of an Artifact if it belongs to Content that is associated with a repository.

Actions #2

Updated by ttereshc over 6 years ago

Using REST API: http DELETE http://127.0.0.1:8000/api/v3/artifacts/0585cddf-0782-47b2-886b-ba08d2cad163/

Actions #3

Updated by ttereshc over 6 years ago

  • Priority changed from Normal to High
  • Severity changed from 2. Medium to 3. High
  • Triaged changed from No to Yes
Actions #4

Updated by mhrivnak over 6 years ago

Agreed with all.

Is there a use case where we do want to enable Artifact deletion through the API? Or can we just disable that entirely?

Actions #5

Updated by mhrivnak over 6 years ago

  • Sprint/Milestone set to 45
Actions #6

Updated by ipanova@redhat.com over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com
Actions #7

Updated by jortel@redhat.com over 6 years ago

  • Sprint/Milestone changed from 45 to 46
Actions #8

Updated by mhrivnak over 6 years ago

  • Sprint/Milestone changed from 46 to 47
Actions #9

Updated by ttereshc over 6 years ago

  • Assignee changed from ipanova@redhat.com to ttereshc
Actions #10

Updated by rchan over 6 years ago

  • Sprint/Milestone changed from 47 to 48
Actions #11

Updated by daviddavis over 6 years ago

  • Tags Pulp 3 MVP added
Actions #12

Updated by ttereshc over 6 years ago

  • Status changed from ASSIGNED to POST

Added by ttereshc over 6 years ago

Revision 4f896e25 | View on GitHub

Delete an Artifact only if it is not associated with any Content

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

Added by ttereshc over 6 years ago

Revision 4f896e25 | View on GitHub

Delete an Artifact only if it is not associated with any Content

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

Actions #13

Updated by ttereshc over 6 years ago

  • Status changed from POST to MODIFIED
Actions #14

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 29
Actions #15

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (48)
Actions #16

Updated by dkliban@redhat.com about 6 years ago

  • Sprint/Milestone set to 3.0.0
Actions #17

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)
Actions #18

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF