Project

Profile

Help

Task #3954

closed

Prevent duplicate Package content in repos

Added by daviddavis about 6 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
No
Tags:
Sprint:
Sprint 46
Quarter:

Description

Packages are unique in a repo by NEVRA. When implemented, this will cause the most recently added unique NEVRA to be kept and other duplicate NEVRA to be removed. Duplicate NEVRA could have different checksums.

[{
    'model': Package,
    'field_names': ['name', 'epoch', 'version', 'release', 'arch']
}]

Use a RemoveDuplicates stage provided by pulpcore-plugin.


Related issues

Related to RPM Support - Test #4297: Prevent duplicate Package content in RPM reposCLOSED - COMPLETEragbalakActions
Blocked by Pulp - Story #3934: As a plugin writer, I can have a stage that removes duplicatesCLOSED - CURRENTRELEASEamacdona@redhat.com

Actions
Actions #1

Updated by daviddavis about 6 years ago

  • Blocked by Story #3934: As a plugin writer, I can have a stage that removes duplicates added
Actions #2

Updated by daviddavis about 6 years ago

  • Description updated (diff)
Actions #3

Updated by daviddavis about 6 years ago

  • Description updated (diff)
Actions #4

Updated by daviddavis about 6 years ago

  • Sprint/Milestone deleted (Pulp 3 RPM MVP)
Actions #5

Updated by daviddavis about 6 years ago

  • Subject changed from Remove duplicate RPM and Erratum content from repos after sync to Prevent duplicate RPM and Erratum content in repos

This isn't specific to sync. We need to handle the case where content is associated to a repo (ie via upload or copied) as well.

Actions #6

Updated by bmbouter almost 6 years ago

  • Subject changed from Prevent duplicate RPM and Erratum content in repos to Prevent duplicate Package and Erratum content in repos
  • Description updated (diff)
Actions #7

Updated by bmbouter almost 6 years ago

  • Description updated (diff)
Actions #8

Updated by ttereshc almost 6 years ago

  • Subject changed from Prevent duplicate Package and Erratum content in repos to Prevent duplicate Package content in repos
  • Description updated (diff)
  • Groomed changed from No to Yes
Actions #9

Updated by ttereshc almost 6 years ago

  • Status changed from NEW to POST
  • Assignee set to ttereshc
  • Sprint set to Sprint 46
Actions #10

Updated by bherring almost 6 years ago

  • Related to Test #4297: Prevent duplicate Package content in RPM repos added

Added by ttereshc almost 6 years ago

Revision 94132db1 | View on GitHub

Remove RPM duplicates from a repo version

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

Actions #11

Updated by ttereshc almost 6 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #12

Updated by ragbalak over 5 years ago

@Daviddavis

For testing this, do we need to have fixture that has a duplicate file with the same NEVRA. If this is the case, how do we ensure the most recently added package is the one which is present.

Or is this related to sync a repository and then try to upload the same package using single request upload. If this is the case, is this related to https://pulp.plan.io/issues/4536

Please let me know your thoughts on this.

Actions #13

Updated by daviddavis over 5 years ago

ragbalak, a fixture couldn't contain two packages with the same NEVRA because the filenames in the repo are based on NEVRA so the two packages couldn't both be served.

What I would do for testing probably is to have two different rpms with the same nevra but different checksums. I would upload one (package A) and then sync down the second (package B). Then you should see both in pulp and you could just check which is associated with your repo. It should be package B and only package B.

Actions #14

Updated by ragbalak over 5 years ago

Awesome. Thanks @Daviddavis

Actions #15

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #16

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF