Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Could not decode a bugzilla response as JSON: #381

Open
sentry-io bot opened this issue Oct 8, 2024 · 2 comments
Open

Exception: Could not decode a bugzilla response as JSON: #381

sentry-io bot opened this issue Oct 8, 2024 · 2 comments
Labels
Bug Something isn't working Easy Enhancement New feature or request

Comments

@sentry-io
Copy link

sentry-io bot commented Oct 8, 2024

Sentry Issue: UPDATEBOT-DEV-19

JSONDecodeError: Expecting value: line 2 column 1 (char 1)
  File "apis/bugzilla_api.py", line 155, in findOpenBugs
    j = json.loads(r.text)
  File "__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None

Exception: Could not decode a bugzilla response as JSON: 
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>

  File "automation.py", line 233, in run
    taskRunner.process_task(lib, task)
  File "/builds/worker/updatebot/tasktypes/vendoring.py", line 35, in process_task
    open_bugs = self.bugzillaProvider.find_open_bugs([j.bugzilla_id for j in all_jobs])
  File "components/logging.py", line 38, in func_wrapper
    ret = func(*args, **kwargs)
  File "components/bugzilla.py", line 247, in find_open_bugs
    return findOpenBugs(self.config['url'], filtered_ids)
  File "apis/bugzilla_api.py", line 157, in findOpenBugs
    raise Exception("Could not decode a bugzilla response as JSON: " + r.text) from e
@sentry-io sentry-io bot added Bug Something isn't working Easy Enhancement New feature or request labels Oct 8, 2024
@mozfreddyb
Copy link
Collaborator

This seems to be the top most occurring bug and relatively simple to handle: Bugzilla is overloaded and it should retry (in this run or just as part of another run).

My understanding is that this is not critical and updatebot will continue to operate as intended for subsequent runs.

@tomrittervg
Copy link
Collaborator

tomrittervg commented Oct 9, 2024

Note that that was a -DEV issue, meaning it was bugzilla dev that timed out. I think/hope prod times out less frequently.

We should try to reuse the @retry mechanism when we try to fix this: https://github.com/mozilla-services/updatebot/blob/master/apis/phabricator.py#L40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Easy Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants