mozilla-mobile / mozilla-mobile/testops-dashboard

Retry Bugzilla API on 502 & 429

Open
#192 1 comment 0 reactions 1 assignee View on GitHub

@AaronMT is already working on this.

Since Sep 10, 2025.

bug enhancement
Dominant language
Python
Stars
7
Forks
7
Avg merge
24m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.