packit-service
packit-service copied to clipboard
AttributeError: 'NoneType' object has no attribute 'commit_sha'
Sentry Issue: PCKT-002-PACKIT-SERVICE-6AR
AttributeError: 'NoneType' object has no attribute 'commit_sha'
(2 additional frame(s) were not displayed)
...
File "packit_service/service/api/testing_farm.py", line 121, in get
"ref": tf_result.commit_sha,
File "packit_service/models.py", line 443, in commit_sha
return self.group_of_targets.commit_sha
The problem here is when the TFTTestRunTargetModel doesn't have any associated group to it, which should not happen as we always pass a group when creating that model (see the code).
This again looks like some race condition and doesn't happen that often (started happening 2023-08-09 and since then there are 3 such records):
packit=# select * from tft_test_run_targets WHERE tft_test_run_group_id IS NULL ORDER BY id DESC LIMIT 10;
id | pipeline_id | status | target | web_url | data | submitted _time | identifier | tft_test_run_group_id
--------+--------------------------------------+--------+------------------------+---------+-----------------------------------+----------------------------+------------------+-----------------------
262016 | | error | centos-7-x86_64 | | {"base_project_url": "https://github.com/oamg/convert2rhel"} | 2023-08-29 18:19:38.837528 | tier0 |
260552 | | error | oraclelinux-8.6-x86_64 | | {"base_project_url": "https://github.com/oamg/convert2rhel"} | 2023-08-25 20:07:27.764577 | tier0 |
253427 | | error | centos-stream-9-x86_64 | | {"base_project_url": "https://github.com/teemtee/fmf"} | 2023-08-09 13:45:09.154787 | |
143113 | b8130211-89d1-44f2-825d-1bf7a28884f9 | error | centos-8.4-x86_64 | | {"base_project_url": "https://github.com/oamg/convert2rhel"} | 2022-11-23 08:2
6:52.489707 | tier0 |
...
I haven't found any occurences in the last 90 days, closing.