Project

Profile

Help

Task #7150

Do not have FK pointing to a main repo from a DistributionTree Variant

Added by ttereshc 5 months ago. Updated 4 months ago.

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

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 77
Quarter:

Description

Since DistributionTree is tied to a Repository, we need to create a new DistributionTree for each. In order to achieve that, we should introduce a new field repository_id and have it as a unique index.

Also fix the Addon and Variant models to point to RpmRepository rather than the master model.

Migration is needed, during which a new DistributionTree will be created in case it belongs to multiple repos.

Make sure that only one DistributionTree can be in a repo by performing a check in finalize_repo_version. The newest (incoming) DistributionTree always wins.

All the current problems with Distribution Trees are due to the fact that they have a circular dependency from a Variant to a main repo a Distribution Tree belongs to. The main tree needs to be managed by user like a normal RPM repo, so Distribution Tree Varian and the main repo should be detached. It also solves problems with copy of a DistributionTree and a repo deletion.


Related issues

Related to Migration Plugin - Issue #6950: Migration of a distribution tree fails when it is present in multiple reposCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to RPM Support - Issue #7046: Adding a distribution tree to another repo doesn't work correctlyCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks RPM Support - Story #6739: As a user, I can export and import kickstart treesCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision ca39e84c View on GitHub
Added by ttereshc 4 months ago

Remove FK to the main repo from a distribution tree Variant.

No issues with repository removal. No issues with copying the same distribution tree into multiple repos.

closes #7150 https://pulp.plan.io/issues/7150

closes #7096 https://pulp.plan.io/issues/7096

closes #7046 https://pulp.plan.io/issues/7046

[nocoverage]

History

#1 Updated by ttereshc 5 months ago

  • Related to Issue #6950: Migration of a distribution tree fails when it is present in multiple repos added

#2 Updated by ttereshc 5 months ago

  • Related to Issue #7046: Adding a distribution tree to another repo doesn't work correctly added

#3 Updated by ttereshc 5 months ago

  • Description updated (diff)

#4 Updated by ttereshc 5 months ago

  • Assignee set to ttereshc

#5 Updated by dalley 5 months ago

  • Description updated (diff)
  • Groomed changed from No to Yes

#6 Updated by dalley 5 months ago

  • Groomed changed from Yes to No

Should we prevent DistributionTree content w/ a given repository_id to be added to a different repository? Or is that out of scope for this issue.

#7 Updated by ttereshc 5 months ago

We definitely should. I suggest it to be a part of copy fix (for both modify and copy endpoints)

#8 Updated by ttereshc 5 months ago

  • Description updated (diff)

#9 Updated by ttereshc 5 months ago

  • Description updated (diff)

#10 Updated by ttereshc 5 months ago

  • Description updated (diff)

#11 Updated by pulpbot 5 months ago

  • Status changed from NEW to POST

#13 Updated by ttereshc 4 months ago

  • Subject changed from Add a repository_id to a DistributionTree and set it as a key to Do not have FK pointing to a main repo from a DistributionTree Variant
  • Description updated (diff)

#14 Updated by ttereshc 4 months ago

  • Sprint set to Sprint 77

#15 Updated by daviddavis 4 months ago

  • Blocks Story #6739: As a user, I can export and import kickstart trees added

#16 Updated by ttereshc 4 months ago

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

#17 Updated by ttereshc 4 months ago

  • Description updated (diff)

#18 Updated by ttereshc 4 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#19 Updated by ttereshc 4 months ago

  • Sprint/Milestone set to Pulp RPM 3.5.0

Please register to edit this issue

Also available in: Atom PDF