TFTTestRunGroupModel DB inconsistencies
After the status of https://dashboard.packit.dev/jobs/testing-farm/919165 not being properly updated from babysit task, I checked the DB for this run:
>>> run = TFTTestRunTargetModel.get_by_pipeline_id("f7ce8de9-2651-4550-bff2-b6feb7c8376e")
>>> run
TFTTestRunTargetModel(id=919165, pipeline_id=f7ce8de9-2651-4550-bff2-b6feb7c8376e)
>>> e = run.get_project_event_model()
>>> run.group_of_targets.runs
[]
Since the DB doesn't contain the needed information, therefore the status can't be updated further.
From first look, it could be a race condition coming from here, when multiple TFTTestRunGroupModel are being created at the same time for a same PipelineModel.
Does the following job look like a similar problem?
- https://dashboard.packit.dev/jobs/testing-farm/927729
The github check says:
testing-farm:fedora-41-x86_64 Started 1 hour ago — Tests have been submitted ...
But the related Testing Farm job is completed
- https://artifacts.dev.testing-farm.io/092e72e4-5dfd-4b0b-9157-9c96ecef851a/
Does the following job look like a similar problem?
Yes, it seems to be the same issue.
Jelly reported a similar behaviour (missing check update) for an srpm build (logs confirm we didn't attempt to update the checks) probably the same race condition applies also to other models:
https://dashboard.packit.dev/jobs/srpm/432002 is 💚 but the status still show as 🟡 https://github.com/cockpit-project/cockpit/pull/22148/checks?check_run_id=44996463999
We also hit this issue:
https://github.com/teemtee/tmt/pull/3860
testing-farm:fedora-42-x86_64:core Tests have been submitted ...
testing-farm:fedora-42-x86_64:full Tests have been submitted ...
Seen at https://github.com/containers/container-libs/pull/4/checks?check_run_id=48014971351