openSUSE / openSUSE-release-tools

Tools to aid in staging and release work for openSUSE/SUSE
GNU General Public License v2.0
62 stars 95 forks source link

suppkg_rebuild.py throws http 403 when run with osc 1.8 #3132

Open DimStar77 opened 1 month ago

DimStar77 commented 1 month ago

Tumbleweed, and thus also the container running on botmaster, has received osc 1.8.x

subpkg-rebuld fails in this case with:

INFO:root:Gathering support package list from openSUSE:Factory
INFO:root:Checking rebuild data...
Traceback (most recent call last):
  File "/godata/pipelines/Factory.Rebuild.Support/./suppkg_rebuild.py", line 186, in <module>
    sys.exit(main(args))
             ^^^^^^^^^^
  File "/godata/pipelines/Factory.Rebuild.Support/./suppkg_rebuild.py", line 167, in main
    uc.crawl()
  File "/godata/pipelines/Factory.Rebuild.Support/./suppkg_rebuild.py", line 148, in crawl
    if need_rebuild and not self.api.is_repo_dirty(stgname, 'standard'):
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/godata/pipelines/Factory.Rebuild.Support/osclib/stagingapi.py", line 1293, in is_repo_dirty
    root = ET.parse(http_GET(url)).getroot()
                    ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/connection.py", line 396, in http_GET
    return http_request("GET", *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/connection.py", line 149, in new_func
    return func(method, url, headers, data, file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/osc/connection.py", line 386, in http_request
    raise urllib.error.HTTPError(url, response.status, response.reason, response.headers, response)
urllib.error.HTTPError: HTTP Error 403: Forbidden
[script-executor] Script completed with exit code: 1.

(this only happens if any of the stagings actually contains a package that qualifies for this support-rebuild; otherwise it passes)

Running this against osc 1.5.1 on Leap 15.6 is successful.

DimStar77 commented 1 month ago

possibly related to https://github.com/openSUSE/osc/pull/1476