Fix IntegrityError on multi-source copy with dependency solving#4468
Open
guylain-lavoie wants to merge 1 commit into
Open
Fix IntegrityError on multi-source copy with dependency solving#4468guylain-lavoie wants to merge 1 commit into
guylain-lavoie wants to merge 1 commit into
Conversation
f40fe5b to
b871b76
Compare
Author
|
test_upload_signed_package is failing. It was modified 12 days ago, I do not think my code is in cause. Anyone knows if I am wrong? |
Member
|
Hey @guylain-lavoie, I've seen some sign on upload flaky errors lately, so I also believe it might not be your changes (and well, it doesn't really is related at all). |
Member
|
This is probably something related to shared fixtures, parallel runs, cleanups and test expectations about the uniqueness of artifacts... |
When copy_content ran with dependency_solving=True and multiple source repository versions in the config mapped to the same destination repository, the task failed with an IntegrityError on the unique (repository, number) constraint because new_version() was called once per source entry on the same destination inside a single @transaction.atomic block. Group units by destination repository before creating new versions, so that each destination receives exactly one new version regardless of how many source entries target it. closes pulp#4286 Assisted By: Claude (Anthropic)
b871b76 to
1ee7b39
Compare
Author
|
Thank you @pedro-psb for your help. Rebased and pushed back. Unfortunately, same problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When copy_content ran with dependency_solving=True and multiple source repository versions in the config mapped to the same destination repository, the task failed with an IntegrityError on the unique (repository, number) constraint, because new_version() was called once per source entry on the same destination inside a single @transaction.atomic block.
Group units by destination repository before creating new versions, so that each destination receives exactly one new version regardless of how many source entries target it.
closes #4286
Assisted By: Claude (Anthropic)
📜 Checklist
See: Pull Request Walkthrough