Skip to content

Conversation

@majamassarini
Copy link
Member

No description provided.

@majamassarini majamassarini requested a review from a team as a code owner January 16, 2026 13:53
@majamassarini majamassarini requested review from nforro and removed request for a team January 16, 2026 13:53
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several valuable improvements to the database models. It correctly fixes a bug in CoprBuildTargetModel.get_all_by by changing the sorting from build_id (a string) to id (an integer), ensuring that the latest builds are retrieved correctly. This fix is well-supported by a new test case. Furthermore, the creation logic for TFTTestRunGroupModel is now more robust against race conditions. The changes, such as using session.flush() to get object IDs within a transaction and checking for existing relationships via foreign key IDs, are excellent practices for avoiding stale data. These modifications enhance the overall correctness and reliability of the database operations.

@majamassarini majamassarini force-pushed the testing-farm-race-conditions-2 branch from 8cfe963 to 1f95061 Compare January 16, 2026 13:57
@centosinfra-prod-github-app
Copy link
Contributor

new_run_model.copr_build_group = locked_run_model.copr_build_group
new_run_model.koji_build_group = locked_run_model.koji_build_group
new_run_model.test_run_group = test_run_group
new_run_model.test_run_group_id = test_run_group.id
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this enough? Why keep the line above?

Copy link
Member Author

@majamassarini majamassarini Jan 16, 2026

Choose a reason for hiding this comment

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

I think the real problem is the if test. We end up on the wrong branch of the if. And the same PipelineModel line is overriden by the "second" task. But I may be wrong.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, I get that, but my comment is about recording the relationship (in either branch). Both lines do effectively the same thing, don't they?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh ok, now I get your comment. Ok I think you are right, I think that removing the line above is safe.

@majamassarini majamassarini force-pushed the testing-farm-race-conditions-2 branch from 1f95061 to 2052492 Compare January 16, 2026 14:26
Copy link
Member

@nforro nforro left a comment

Choose a reason for hiding this comment

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

Let's try.

@majamassarini majamassarini added the mergeit Merge via Zuul label Jan 16, 2026
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app centosinfra-prod-github-app bot merged commit 15b93c8 into packit:main Jan 16, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Packit pull requests Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

Projects

Development

Successfully merging this pull request may close these issues.

2 participants