Project

Profile

Help

Issue #7291

closed

Advisory merge incorrectly reuses UpdateCollections

Added by ggainey over 3 years ago. Updated over 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
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

Also available in: Atom PDF