Add support for overwrite when adding content - #1458
Conversation
|
This PR includes the changes from the package signing PR. Only the last commit is new. |
22e7906 to
82a7ee4
Compare
82a7ee4 to
db5b02e
Compare
db5b02e to
69de407
Compare
|
If you rebase to latest main branch, the deprecations test should turn green. |
Plumb the new pulpcore `overwrite` parameter to sign_and_create and signed_add_and_remove and override AptRepository.check_content_overwrite to exempt incoming packages already in the version that were produced by the signing workflow (tracked via DebPackageSigningResult). Assisted-By: GitHub Copilot (Claude)
69de407 to
3ac2202
Compare
|
Thanks, looks like it's green now. |
quba42
left a comment
There was a problem hiding this comment.
I had to look up what overwrite is and does. As I understand it, what it does is the following: Where in the past a upload content to repository might have failed on repo uniqueness constraints, with overwrite=True it instead succeeds by kicking out the content it collides with. Did I get this right?
Some more questions for my comprehension:
- It looks like this is making use of something in pulpcore. I don't see the
check_content_overwritemethod getting invoked anywhere in these changes, so I am guessing something in pulpcore will use it. Am I getting this right? - It looks like this PR is disabling this overwrite mechanism only for cases where package signing is on and packages have already been signed in the caching mechanism? I am not sure I fully understand why this is needed. Are the overwrite mechanism and the "cached signed package" mechanisms clashing somehow for cases where they are both active?
|
Mostly right. Before the overwrite feature, duplicate content was always quietly replaced in Pulp. This is what happens now when Now with This method Without this custom logic, they would hit a |
quba42
left a comment
There was a problem hiding this comment.
Based on my code review and my cost-benefit-risk intuition, I think we should go ahead and merge this, so we can release it as part of 3.10.0!
Plumb the new pulpcore
overwriteparameter to sign_and_create and signed_add_and_remove and override AptRepository.check_content_overwrite to exempt incoming packages already in the version that were produced by the signing workflow (tracked via DebPackageSigningResult).