mozilla-services / mozilla-services/updatebot

Output the Bugzilla Response Code

Open Beginner friendly
#401 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Easy Enhancement
Dominant language
Python
Stars
9
Forks
8
PR merge metrics
No merged PRs in 30d

Description

[task 2025-10-13T18:26:52.778+00:00] [Warning](BugzillaProvider aom job_id=1140) Comment on Bug 1994052 is too long: 114601 characters; truncating.
[task 2025-10-13T18:26:52.997+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:26:52.997+00:00] [Info]   (CommandProvider aom job_id=1140) Running ['hg', 'checkout', '-C', '.']
[task 2025-10-13T18:26:56.188+00:00] [Info]   (CommandProvider aom job_id=1140) Return: 0 Runtime (s): 3
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) stdout:
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) 43 files updated, 0 files merged, 0 files removed, 0 files unresolved
[task 2025-10-13T18:26:56.188+00:00] 
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) stderr:
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) 
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:26:56.188+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:26:56.188+00:00] [Info]   (CommandProvider aom job_id=1140) Running ['hg', 'purge', '.']
[task 2025-10-13T18:27:01.461+00:00] [Info]   (CommandProvider aom job_id=1140) Return: 0 Runtime (s): 5
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) stdout:
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) 
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) stderr:
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) 
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:27:01.461+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:27:01.461+00:00] [Info]   (CommandProvider aom job_id=1140) Running ['hg', 'update', 'ad1cc8da83e97959bee0a5da12d86593d9f8811e']
[task 2025-10-13T18:27:01.850+00:00] [Info]   (CommandProvider aom job_id=1140) Return: 0 Runtime (s): 0
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) stdout:
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[task 2025-10-13T18:27:01.850+00:00] 
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) -------
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) stderr:
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) 
[task 2025-10-13T18:27:01.850+00:00] [Debug]  (CommandProvider aom job_id=1140) ----------------------------------------------
[task 2025-10-13T18:27:01.850+00:00] [Error]  (None aom job_id=1140) Caught an exception while processing library aom task type vendoring
[task 2025-10-13T18:27:01.851+00:00] Traceback (most recent call last):
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/apis/bugzilla_api.py", line 110, in commentOnBug
[task 2025-10-13T18:27:01.851+00:00]     j = json.loads(r.text)
[task 2025-10-13T18:27:01.851+00:00]         ^^^^^^^^^^^^^^^^^^
[task 2025-10-13T18:27:01.851+00:00]   File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
[task 2025-10-13T18:27:01.851+00:00]     return _default_decoder.decode(s)
[task 2025-10-13T18:27:01.851+00:00]            ^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-10-13T18:27:01.851+00:00]   File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
[task 2025-10-13T18:27:01.851+00:00]     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[task 2025-10-13T18:27:01.851+00:00]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2025-10-13T18:27:01.851+00:00]   File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
[task 2025-10-13T18:27:01.851+00:00]     raise JSONDecodeError("Expecting value", s, err.value) from None
[task 2025-10-13T18:27:01.851+00:00] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[task 2025-10-13T18:27:01.851+00:00] 
[task 2025-10-13T18:27:01.851+00:00] The above exception was the direct cause of the following exception:
[task 2025-10-13T18:27:01.851+00:00] 
[task 2025-10-13T18:27:01.851+00:00] Traceback (most recent call last):
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/./automation.py", line 233, in run
[task 2025-10-13T18:27:01.851+00:00]     taskRunner.process_task(lib, task)
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/tasktypes/vendoring.py", line 79, in process_task
[task 2025-10-13T18:27:01.851+00:00]     self._process_new_job(library, task, new_version, timestamp, most_recent_job)
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/components/logging.py", line 38, in func_wrapper
[task 2025-10-13T18:27:01.851+00:00]     ret = func(*args, **kwargs)
[task 2025-10-13T18:27:01.851+00:00]           ^^^^^^^^^^^^^^^^^^^^^
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/tasktypes/vendoring.py", line 155, in _process_new_job
[task 2025-10-13T18:27:01.851+00:00]     self.bugzillaProvider.comment_on_bug(created_job.bugzilla_id, CommentTemplates.COULD_NOT_VENDOR_ALL_FILES(library, msg))
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/components/logging.py", line 38, in func_wrapper
[task 2025-10-13T18:27:01.851+00:00]     ret = func(*args, **kwargs)
[task 2025-10-13T18:27:01.851+00:00]           ^^^^^^^^^^^^^^^^^^^^^
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/components/bugzilla.py", line 231, in comment_on_bug
[task 2025-10-13T18:27:01.851+00:00]     raise e
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/components/bugzilla.py", line 224, in comment_on_bug
[task 2025-10-13T18:27:01.851+00:00]     commentOnBug(
[task 2025-10-13T18:27:01.851+00:00]   File "/builds/worker/updatebot/apis/bugzilla_api.py", line 112, in commentOnBug
[task 2025-10-13T18:27:01.851+00:00]     raise Exception("Could not decode a bugzilla response as JSON: " + r.text) from e
[task 2025-10-13T18:27:01.851+00:00] Exception: Could not decode a bugzilla response as JSON: 
[task 2025-10-13T18:27:01.851+00:00] 

We got an empty response back from bugzilla; don't know why, having the response code would be helpful.

We could also retry the request.

Contributor guide

Open the contributing guide

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.

Research direction

Start in apis/bugzilla_api.py at commentOnBug, then trace its caller in components/bugzilla.py. Check how the response is handled when JSON decoding fails, and verify that the Bugzilla response code is available in the resulting error; retry behavior is also suggested but not defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.