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

Avoid race condition when creating sidetag in Koji #2554

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

nforro
Copy link
Member

@nforro nforro commented Oct 1, 2024

There is a big time window between reading Koji name of a sidetag from the DB and updating it with a new value returned after a new sidetag in Koji is created, making race conditions possible.

Prevent this by doing everything in a single DB transaction.

Fixes #2545.

nforro added 3 commits October 1, 2024 15:37
There is a big time window between reading Koji name of a sidetag
from the DB and updating it with a new value returned after a new
sidetag in Koji is created, making race conditions possible.

Prevent this by doing everything in a single DB transaction.

Signed-off-by: Nikola Forró <[email protected]>
Signed-off-by: Nikola Forró <[email protected]>
@nforro nforro requested a review from a team as a code owner October 1, 2024 13:41
Copy link
Contributor

Copy link
Member

@lbarcziova lbarcziova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@nforro nforro added the mergeit When set, zuul wil gate and merge the PR. label Oct 2, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/10871d37d24641468c79ee8cecaf0eef

✔️ pre-commit SUCCESS in 2m 12s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit d0ad4fc into packit:main Oct 2, 2024
4 checks passed
@nforro nforro deleted the sidetags branch October 2, 2024 07:32
softwarefactory-project-zuul bot added a commit that referenced this pull request Nov 12, 2024
Actually fix race condition when creating sidetags in Koji

Related to #2545, #2554.

Reviewed-by: Maja Massarini
Reviewed-by: Laura Barcziová
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate sidetags
2 participants