Actions
Issue #7291
closedAdvisory merge incorrectly reuses UpdateCollections
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 79
Quarter:
Description
When combining content to make a new repository-version, there is a specific edge-case that results in an advisory that exists in both places to be merged into a single new advisory. In this case, current pulp_rpm code "reuses" the UpdateCollections from the previous advisory in such a way that they 'belong to' both the previous and the newly-merged/created advisory.
This is a different usage-pattern than that used for any other sub-object of an advisory. It also prevents us from linking an UpdateCollection directly (and only) to its 'owning' advisory, which is desirable for a number of reasons (see #5740 and #7195 for examples)
We need to:
- teach merge_advisories() to make a deep copy of the 'previous_advisory' collections and their packages
- point the new copies at the new advisory
- build a data-migration to find and fix existing instances of an UpdateCollection being linked to multiple advisories
Actions
Teach merge_advisory() to use its own copies of relevant UpdateCollections.
Added migration to clean up and data that is already in this broken state.
fixes #7291 [nocoverage]