Skip to content

Retry Bugzilla API on 502 & 429 #192

@AaronMT

Description

@AaronMT

Bugzilla API tends to hit 502's which requires manually re-running the Job. We can add a retry.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/testops-dashboard/testops-dashboard/./__main__.py", line 201, in <module>
    main()
  File "/home/runner/work/testops-dashboard/testops-dashboard/./__main__.py", line 197, in main
    COMMAND_MAP[report_type](args)
  File "/home/runner/work/testops-dashboard/testops-dashboard/handlers/bugzilla.py", line 15, in handle_bugzilla_qe_verify
    client = BugzillaClient()
             ^^^^^^^^^^^^^^^^
  File "/home/runner/work/testops-dashboard/testops-dashboard/api/bugzilla/api_bugzilla.py", line 80, in __init__
    self.BugzillaHelperClient = BugzillaHelper()
                                ^^^^^^^^^^^^^^^^
  File "/home/runner/work/testops-dashboard/testops-dashboard/api/bugzilla/api_bugzilla.py", line 53, in __init__
    self.bugzilla = Bugz()
                    ^^^^^^
  File "/home/runner/work/testops-dashboard/testops-dashboard/api/bugzilla/api_bugzilla.py", line 28, in __init__
    self.conn = BugzillaAPIClient()
                ^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/testops-dashboard/testops-dashboard/lib/bugzilla_conn.py", line 33, in __init__
    self.bz_client = bugzilla.Bugzilla(self.URL, api_key=self.key)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/base.py", line 254, in __init__
    self.connect(url)
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/base.py", line 529, in connect
    version = self._backend.bugzilla_version()["version"]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_backendxmlrpc.py", line 146, in bugzilla_version
    return self._xmlrpc_proxy.Bugzilla.version()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_backendxmlrpc.py", line 125, in _ServerProxy__request
    ret = ServerProxy._ServerProxy__request(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_backendxmlrpc.py", line 100, in request
    return self.__request_helper(url, request_body)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_backendxmlrpc.py", line 44, in __request_helper
    response = self.__bugzillasession.request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_session.py", line 115, in request
    raise BugzillaHTTPError(
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/bugzilla/_session.py", line 109, in request
    response.raise_for_status()
  File "/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
bugzilla.exceptions.BugzillaHTTPError: 502 Server Error: Bad Gateway for url: https://bugzilla.***.org/xmlrpc.cgi

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions