Project

General

Profile

Actions

Bug #24082

closed

hammer content-view purge not deleting unused versions if one is in use by a published view

Added by Rimma Ashkinadze almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

In this content view, there are 2 versions published in environments, 5 unpublished. One of the 5 unpublished can be removed initially. Then no other versions can be removed because one is in use. Once I delete the version of the composite that is in use, then I am able to proceed. Shouldn't purge be able to remove the unused ones that aren't in published composites?

$ hammer content-view version list --content-view my-el7-cv --organization-id 1
------|-----------------------|---------|-------------------------
ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS
------|-----------------------|---------|-------------------------
15753 | my-el7-cv 2726.0 | 2726.0 | Library, Development, QA
15748 | my-el7-cv 2725.0 | 2725.0 |
15743 | my-el7-cv 2724.0 | 2724.0 |
15736 | my-el7-cv 2722.0 | 2722.0 | Staging, Production
15725 | my-el7-cv 2719.0 | 2719.0 |
15712 | my-el7-cv 2716.0 | 2716.0 |
15563 | my-el7-cv 2683.0 | 2683.0 |
------|-----------------------|---------|-------------------------

$ hammer content-view purge --id 259 --organization-id 1 --count 3
[...............................................................................................................................................................................................] [100%]
Version '2725.0' of content view 'my-el7-cv' deleted.
Cannot delete version while it is in use by composite content views: xxx-comp-cv Version 1494.0

$ hammer content-view version list --content-view my-el7-cv --organization-id 1
------|-----------------------|---------|-------------------------
ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS
------|-----------------------|---------|-------------------------
15753 | my-el7-cv 2726.0 | 2726.0 | Library, Development, QA
15743 | my-el7-cv 2724.0 | 2724.0 |
15736 | my-el7-cv 2722.0 | 2722.0 | Staging, Production
15725 | my-el7-cv 2719.0 | 2719.0 |
15712 | my-el7-cv 2716.0 | 2716.0 |
15563 | my-el7-cv 2683.0 | 2683.0 |
------|-----------------------|---------|-------------------------

$ hammer content-view purge --id 259 --organization-id 1 --count 3
Cannot delete version while it is in use by composite content views: xxx-comp-cv Version 1494.0

$ hammer content-view version list --content-view my-el7-cv --organization-id 1
------|-----------------------|---------|-------------------------
ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS
------|-----------------------|---------|-------------------------
15753 | my-el7-cv 2726.0 | 2726.0 | Library, Development, QA
15743 | my-el7-cv 2724.0 | 2724.0 |
15736 | my-el7-cv 2722.0 | 2722.0 | Staging, Production
15725 | my-el7-cv 2719.0 | 2719.0 |
15712 | my-el7-cv 2716.0 | 2716.0 |
15563 | my-el7-cv 2683.0 | 2683.0 |
------|-----------------------|---------|-------------------------

After I remove xxx-comp-cv Version 1494.0:

$ hammer content-view purge --id 259 --organization-id 1 --count 3
[...............................................................................................................................................................................................] [100%]
Version '2719.0' of content view 'my-el7-cv' deleted.

$ hammer content-view version list --content-view my-el7-cv --organization-id 1
------|-----------------------|---------|-------------------------
ID | NAME | VERSION | LIFECYCLE ENVIRONMENTS
------|-----------------------|---------|-------------------------
15753 | my-el7-cv 2726.0 | 2726.0 | Library, Development, QA
15743 | my-el7-cv 2724.0 | 2724.0 |
15736 | my-el7-cv 2722.0 | 2722.0 | Staging, Production
15712 | my-el7-cv 2716.0 | 2716.0 |
15563 | my-el7-cv 2683.0 | 2683.0 |
------|-----------------------|---------|-------------------------

Actions #1

Updated by Andrew Kofink almost 6 years ago

  • translation missing: en.field_release set to 349
Actions #2

Updated by Jonathon Turel over 5 years ago

  • Assignee set to Andrew Kofink
  • Target version changed from Katello 3.8.0 to Katello Backlog
Actions #3

Updated by Andrew Kofink over 5 years ago

  • Team Backlog Brad added
Actions #4

Updated by Christine Fouant over 5 years ago

  • Assignee changed from Andrew Kofink to Christine Fouant
Actions #5

Updated by The Foreman Bot over 5 years ago

  • Pull request https://github.com/Katello/hammer-cli-katello/pull/599 added
Actions #6

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
Actions #7

Updated by Christine Fouant over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF