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

Duplicate sidetags #2545

Closed
2 tasks
nforro opened this issue Sep 24, 2024 · 1 comment · Fixed by #2554
Closed
2 tasks

Duplicate sidetags #2545

nforro opened this issue Sep 24, 2024 · 1 comment · Fixed by #2554
Assignees
Labels
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/bug Something isn't working.

Comments

@nforro
Copy link
Member

nforro commented Sep 24, 2024

The podman-releases sidetag group is shared between podman, buildah, skopeo and containers-common packages. When releasing podman and buildah while skipping the other two packages using /packit koji-tag --all-branches to tag them, somehow it happened that two sidetags were created for f41 and f40. One set of them as a result of the command and the other set most likely during a build of buildah. This then messed up resolving dependencies which prevented Bodhi update for f40 from being triggered and would have caused issues in the future if the duplicate sidetags weren't manually removed.

TODO:

  • add unique constraint on (sidetag_group_id, target) pair in the sidetags table so that there can be only one sidetag per group and dist-git branch
  • figure out how it could have happened in the first place and fix it
@nforro nforro added the kind/bug Something isn't working. label Sep 24, 2024
@mfocko mfocko added area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. impact/low This issue impacts only a few users. gain/high This brings a lot of value to (not strictly a lot of) users. labels Sep 26, 2024
@mfocko mfocko moved this from new to priority-backlog in Packit Kanban Board Sep 26, 2024
@mfocko mfocko moved this from priority-backlog to refined in Packit Kanban Board Sep 26, 2024
@nforro nforro self-assigned this Sep 30, 2024
@nforro nforro moved this from refined to in-progress in Packit Kanban Board Sep 30, 2024
@nforro
Copy link
Member Author

nforro commented Sep 30, 2024

There is a race condition between workers, Koji API calls take enough time to make it possible to create multiple sidetags in Koji before recording sidetag Koji name in the DB. This happened mainly because podman packages are misconfigured and the koji_build job of buildah was triggered 3 times, nevertheless the race condition needs to be fixed.

@nforro nforro moved this from in-progress to in-review in Packit Kanban Board Oct 1, 2024
softwarefactory-project-zuul bot added a commit that referenced this issue Oct 2, 2024
Avoid race condition when creating sidetag in Koji

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.

Reviewed-by: Laura Barcziová
@github-project-automation github-project-automation bot moved this from in-review to done in Packit Kanban Board Oct 2, 2024
softwarefactory-project-zuul bot added a commit that referenced this issue 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
area/fedora Related to Fedora ecosystem complexity/single-task Regular task, should be done within days. gain/high This brings a lot of value to (not strictly a lot of) users. impact/low This issue impacts only a few users. kind/bug Something isn't working.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants