mozilla-services / mozilla-services/updatebot

ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got le...

Open
#370 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Sentry Issue: UPDATEBOT-PROD-1K

ValueError: invalid literal for int() with base 16: b''
  File "urllib3/response.py", line 748, in _update_chunk_length
    self.chunk_left = int(line, 16)

InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)
  File "urllib3/response.py", line 443, in _error_catcher
    yield
  File "urllib3/response.py", line 815, in read_chunked
    self._update_chunk_length()
  File "urllib3/response.py", line 752, in _update_chunk_length
    raise InvalidChunkLength(self, line)

ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
  File "contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)

ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
(6 additional frame(s) were not displayed)
...
  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 242, in find_open_bugs
    return findOpenBugs(self.config['url'], filtered_ids)
  File "apis/bugzilla_api.py", line 152, in findOpenBugs
    r = requests.get(url + "bug?resolution=---&id=%s&include_fields=id" % ",".join([str(b) for b in bugIDs]))

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 findOpenBugs and trace its caller in components/bugzilla.py, then follow the vendoring path from automation.py. Reproduce or characterize the empty chunk response shown in the Sentry trace and determine the expected behavior for the failed request; done means the vendoring task handles this case as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.