Project

Profile

Help

Story #4901

Repository Version creation api should provide an easy way to clear out all units when adding new units

Added by jsherril@redhat.com 10 months ago. Updated 4 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Katello-P2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 54

Description

When creating a new repository version, its very easy to add units or remove units, but if I want to specify some list of units I want the repository version to have, i must first clear out all the existing units which is very cumbersome.

Solution

Allow users to specify ['*'] for remove_content_units. This will let users remove all content units from a repo version. They can also specify add_content_units which will add back units to the empty repo version.

Note that we'll need to change the current logic to add units after removing units. We want to document these behaviors clearly in the docs too.


Checklist


Related issues

Related to Pulp - Test #4956: As a user, I can clear all units from a new repository version CLOSED - COMPLETE Actions

Associated revisions

Revision 5c5bbfa4 View on GitHub
Added by daviddavis 10 months ago

Allow users to remove all content units from repo versions

fixes #4901 https://pulp.plan.io/issues/4901

History

#1 Updated by jsherril@redhat.com 10 months ago

  • Tags Katello-P2 added

#2 Updated by dkliban@redhat.com 10 months ago

What about letting the user submit ['*'] for remove_content_units?

#3 Updated by bmbouter 10 months ago

@dkliban I was thinking the same thing! wow.

#4 Updated by daviddavis 10 months ago

What if I submit a list of add_content_units (e.g. A, B, C) along with ['*'] for remove_content_units? Then my repo version has just A, B, C?

#5 Updated by dkliban@redhat.com 10 months ago

Yes. However, I don't think that will happen always now. If A, B, C were in the previous version, they will not be present in the new version because we add first and then remove.

https://github.com/pulp/pulpcore/blob/master/pulpcore/app/tasks/repository.py#L72

#6 Updated by daviddavis 10 months ago

  • Checklist item Update code to accept ['*'] for remove_content_units added
  • Checklist item Document that ['*'] is accepted for remove_content_units and will clear content from the repo version added
  • Checklist item Reverse order of adding units to be after removing units added
  • Checklist item Document for users that units are added to a repo version AFTER removing units added
  • Checklist item Write a functional test or open a Test issue for QE added
  • Description updated (diff)

#7 Updated by dkliban@redhat.com 10 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
  • Sprint set to Sprint 54

#8 Updated by daviddavis 10 months ago

  • Tracker changed from Issue to Story
  • % Done set to 0

#9 Updated by daviddavis 10 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#10 Updated by daviddavis 10 months ago

  • Related to Test #4956: As a user, I can clear all units from a new repository version added

#11 Updated by daviddavis 10 months ago

  • Checklist item Update code to accept ['*'] for remove_content_units set to Done
  • Checklist item Write a functional test or open a Test issue for QE set to Done

#12 Updated by daviddavis 10 months ago

  • Checklist item Document that ['*'] is accepted for remove_content_units and will clear content from the repo version set to Done
  • Checklist item Reverse order of adding units to be after removing units set to Done

#13 Updated by daviddavis 10 months ago

  • Checklist item Document for users that units are added to a repo version AFTER removing units set to Done

#14 Updated by daviddavis 10 months ago

  • Status changed from ASSIGNED to POST

#15 Updated by daviddavis 10 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#16 Updated by bmbouter 4 months ago

  • Sprint/Milestone set to 3.0.0

#17 Updated by bmbouter 4 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF