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

Bodhi update fixes #2596

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

nforro
Copy link
Member

@nforro nforro commented Oct 23, 2024

Fixes #2573.

@nforro nforro requested a review from a team as a code owner October 23, 2024 20:40

This comment was marked as outdated.

Copy link
Contributor

cls,
koji_nvrs: str,
) -> set["BodhiUpdateTargetModel"]:
regexp = "|".join(re.escape(nvr) for nvr in set(koji_nvrs.split()))
Copy link
Member

Choose a reason for hiding this comment

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

👀 What could go wrong :D

session.query(BodhiUpdateTargetModel)
.filter(
BodhiUpdateTargetModel.status.in_(("queued", "retry", "success")),
BodhiUpdateTargetModel.koji_nvrs.regexp_match(regexp).compile(
Copy link
Member

Choose a reason for hiding this comment

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

Does this actually precompile?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, I followed an example from the documentation.

Copy link
Contributor

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

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

✔️ pre-commit SUCCESS in 2m 05s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 23bc167 into packit:main Oct 24, 2024
4 checks passed
@nforro nforro deleted the sidetags branch October 24, 2024 13:15
softwarefactory-project-zuul bot added a commit that referenced this pull request Oct 29, 2024
Remove the `compile()` statement from `regexp_match()`

Related to #2596.
Fixes #2605.

Reviewed-by: Laura Barcziová
Reviewed-by: Maja Massarini
softwarefactory-project-zuul bot added a commit that referenced this pull request Nov 4, 2024
…2609)

Make sure `bodhi_update` job runs don't get stuck in `queued` state

When an unhandled exception occurs, a Sentry issue is created but the job run stays in queued state, which breaks the condition that is supposed to prevent submitting the same update more than once, as it considers that job run to be in progress. Make sure the state is updated when that happens.
Question is, in such case should the exception and traceback be stored and issue with it created in the issue repository or do we consider that internal?
Related to #2596.

Reviewed-by: Matej Focko
Reviewed-by: Laura Barcziová
Reviewed-by: Nikola Forró
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.

Race condition when creating Bodhi updates
2 participants