FrostyX / fedora-review-service

Fedora package reviews CI
9 stars 1 forks source link

Sometimes patch is uploaded but comment is missing #31

Closed FrostyX closed 1 year ago

FrostyX commented 1 year ago

This is a high-priority issue. It wasn't easy to debug but finally, I have some info

[2023-10-17 00:02:08,526][  INFO]: Recognized Copr message: 06b9e6e7-d903-48ce-9786-45205c1a73fc
[2023-10-17 00:02:10,424][  INFO]: This build's spec file and the previous spec are the same
[2023-10-17 00:02:10,424][  INFO]: RHBZ: #2244404, patch uploaded
[2023-10-17 00:02:10,468][ ERROR]: FAILED TO COMMENT ON RHBZ: #2244404
[2023-10-17 00:02:10,468][ ERROR]: 'NoneType' object has no attribute 'url'
Traceback (most recent call last): 
  File "/src/fedora_review_service/consumer.py", line 110, in handle_copr_message
    url = None if bug.url else remote_spec(copr.spec_url).url
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'url'
[2023-10-17 00:02:10,474][  INFO]: Finished processing Copr message: 06b9e6e7-d903-48ce-9786-45205c1a73fc
FrostyX commented 1 year ago

Possibly also

[2023-10-16 22:06:51,549][  INFO]: Patch uploaded successfully
[2023-10-16 22:06:51,550][  INFO]: RHBZ: #2243093, patch uploaded
[2023-10-16 22:06:51,608][ ERROR]: FAILED TO COMMENT ON RHBZ: #2243093
[2023-10-16 22:06:51,608][ ERROR]: line 45: Unknown tag: %py_provides python3-mat2
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/specfile/spec_parser.py", line 201, in get_rpm_spec
    return rpm.spec(tmp.name, flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: can't parse specfile

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/src/fedora_review_service/consumer.py", line 110, in handle_copr_message
    url = None if bug.url else remote_spec(copr.spec_url).url
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/src/fedora_review_service/helpers.py", line 107, in remote_spec
    specfile = Specfile(fp.name)
               ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/specfile/specfile.py", line 72, in __init__
    self._parser.parse(str(self))
  File "/usr/lib/python3.11/site-packages/specfile/spec_parser.py", line 353, in parse
    self.spec, self.tainted = self._do_parse(content, extra_macros)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/specfile/spec_parser.py", line 269, in _do_parse
    spec = get_rpm_spec(content, rpm.RPMSPEC_ANYARCH | rpm.RPMSPEC_FORCE)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/specfile/spec_parser.py", line 203, in get_rpm_spec
    raise RPMException(stderr=stderr) from e
specfile.exceptions.RPMException: line 45: Unknown tag: %py_provides python3-mat2