Skip to content

Commit

Permalink
Fixes #37863 - delete container push repos properly on org delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Sep 27, 2024
1 parent 89fdf9d commit c2cabf9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ def invoke_external_task
to_delete = content_view.repository_references.select do |repository_reference|
repo = repository_reference.root_repository.library_instance
if delete_href?(repository_reference.repository_href, content_view)
tasks << repo.backend_service(smart_proxy).delete_repository(repository_reference)
if repo.root.is_container_push?
tasks << repo.backend_service(smart_proxy).delete_distributions
else
tasks << repo.backend_service(smart_proxy).delete_repository(repository_reference)
end
true
else
false
end
end
to_delete.each(&:destroy)

output[:pulp_tasks] = tasks
output[:pulp_tasks] = tasks.compact
end

#migrated composites may have the same RepositoryReference as their component
Expand Down

0 comments on commit c2cabf9

Please sign in to comment.