#486 copr-build fails
Closed: fixed by frostyx. Opened by alexsaezm.

When running fedora-review --copr-build <BUILD_ID> it fails. Example:

$ fedora-review --copr-build 6137877
INFO: Processing COPR build: 6137877
ERROR: Exception down the road... (logs in /home/alex/.cache/fedora-review.log)
$ cat ~/.cache/fedora-review.log
07-10 13:15 root         DEBUG    fedora-review 0.9.0 6761b6c 2022-08-23 15:54:01 -0500 started
07-10 13:15 root         DEBUG    Command  line: /usr/bin/fedora-review --copr-build 6137877
07-10 13:15 root         INFO     Processing COPR build: 6137877
07-10 13:15 root         DEBUG    Exception down the road...
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 236, in run
    self._do_run(outfile)
  File "/usr/lib/python3.11/site-packages/FedoraReview/review_helper.py", line 216, in _do_run
    self.bug = CoprBug(Settings.copr_build_descriptor)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/FedoraReview/copr_bug.py", line 60, in __init__
    uri = self.get_location(build_id)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/FedoraReview/copr_bug.py", line 140, in get_location
    build_data = get_build_data(build_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/FedoraReview/copr_bug.py", line 41, in get_build_data
    build_data_file = urlopen(COPR_API_URL_TEMPLATE.format(build_id))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 557, in error
    result = self._call_chain(*args)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 749, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib64/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: NOT FOUND
07-10 13:15 root         ERROR    Exception down the road... (logs in /home/alex/.cache/fedora-review.log)
07-10 13:15 root         DEBUG    Report completed:  1.223 seconds

I can't investigate right now but I think it is probably the same issue as
https://github.com/FrostyX/fedora-review-service/issues/28

I can't investigate right now but I think it is probably the same issue as
https://github.com/FrostyX/fedora-review-service/issues/28

It looks like that, I also saw that behavior in COPR. Thanks.

I tried to reproduce this today (for a new Copr build) and it worked fine.
Can you try @alexsaezm if it works for you as well?

I can't either. Seems to work again. Thank you!

Thank you for the confirmation. Anyone, if you reproduce the issue, please reopen :-)

Metadata Update from @frostyx:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata