Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique constraint for Advisory packages #2754

Open
pavelpicka opened this issue Sep 2, 2022 · 1 comment
Open

Unique constraint for Advisory packages #2754

pavelpicka opened this issue Sep 2, 2022 · 1 comment
Labels

Comments

@pavelpicka
Copy link
Contributor

Describe the bug
When sync pulp doesn't check unique constrain advisory package so duplicate could appear in DB.

To Reproduce
right now to sync Alma linux repositories (BaseOS, AppStream and PowerTools)

Expected behavior
Deduplication at sync time.

We need to imporove advisory package unique constrain.

@dralley dralley changed the title Unique constrain for Advisory packages Unique constraint for Advisory packages Sep 2, 2022
@ggainey
Copy link
Contributor

ggainey commented Sep 2, 2022

This fixes at a higher level the problem being addressed in #2648 . It is def useful to "fix" data like this as it comes in, we want to keep the current fix ( #2727 ) since it doesn't require a migration or a data fix and will fix existing users who have already sync'd, exported, and are attempting to import the suboptimal repositories.

After discussion around the implications of "mirror", we've realized that this doesn't break mirror - we de-dup the data in "our" database, but the published-metadata artifact is "whatever we sync'd from the remote". Import/export is unaffected because we do not export Publications or Distributions.

@pavelpicka pavelpicka self-assigned this Sep 6, 2022
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Sep 9, 2022
Added uniq constraint to UpdateRecordPackage
Added rpm-datarepair command to deduplicate UpdateCollectionPackages if duplicates already in DB.

closes: pulp#2754
pulp#2754
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Sep 9, 2022
Added uniq constraint to UpdateRecordPackage
Added rpm-datarepair command to deduplicate UpdateCollectionPackages if duplicates already in DB.

closes: pulp#2754
pulp#2754
@pavelpicka pavelpicka removed their assignment Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants