Skip to content

Make concurrent package signing race-safe - #1483

Open
daviddavis wants to merge 1 commit into
pulp:mainfrom
daviddavis:signing-integritryerror
Open

Make concurrent package signing race-safe#1483
daviddavis wants to merge 1 commit into
pulp:mainfrom
daviddavis:signing-integritryerror

Conversation

@daviddavis

Copy link
Copy Markdown
Contributor

_sign_package used a non-atomic check-then-create for DebPackageSigningResult, so concurrently signing the same original artifact with the same fingerprint could violate the (sha256, package_signing_fingerprint) unique constraint and abort signed_add_and_remove. Wrap the writes in a transaction and reuse the existing result on IntegrityError.

fixes #1482

Assisted-by: Claude Opus 4.8 noreply@anthropic.com

@daviddavis
daviddavis force-pushed the signing-integritryerror branch from 76c1e6b to be24d96 Compare July 22, 2026 13:34
_sign_package used a non-atomic check-then-create for DebPackageSigningResult,
so concurrently signing the same original artifact with the same fingerprint
could violate the (sha256, package_signing_fingerprint) unique constraint and
abort signed_add_and_remove. Wrap the writes in a transaction and reuse the
existing result on IntegrityError.

fixes pulp#1482

Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
@daviddavis
daviddavis force-pushed the signing-integritryerror branch from be24d96 to 1f3c969 Compare July 24, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent package signing raises IntegrityError

1 participant