Investigate/test fetcher retries
Mantenedores costumam responder em até 10 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Precisa de esclarecimento
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- networking
Direção de pesquisa
Comece em tuf/ngclient/urllib3_fetcher.py, especialmente em _chunks, e rastreie como download_file de tuf/ngclient/fetcher.py consome o fluxo de resposta. Reproduza o timeout de sigstore-probers, se possível, e inspecione o comportamento de retry do urllib3 para leituras em streaming. Está concluído quando as três tentativas esperadas para falhas HTTP comuns forem verificadas ou quando o comportamento ausente for claramente identificado com uma cobertura de testes focada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
I'm expecting urllib3 to retry 3 times on common http failures when using urllib3fetcher
There's an interesting failure in sigstore-probers where this does not seem to happen:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 754, in _error_catcher
yield
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 879, in _raw_read
data = self._fp_read(amt, read1=read1) if not fp_closed else b""
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 862, in _fp_read
return self._fp.read(amt) if amt is not None else self._fp.read()
~~~~~~~~~~~~~^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/http/client.py", line 479, in read
s = self.fp.read(amt)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/socket.py", line 719, in readinto
return self._sock.recv_into(b)
~~~~~~~~~~~~~~~~~~~~^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/ssl.py", line 1304, in recv_into
return self.read(nbytes, buffer)
~~~~~~~~~^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/ssl.py", line 1138, in read
return self._sslobj.read(len, buffer)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
TimeoutError: The read operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.13.4/x64/bin/tuf-on-ci-test-client", line 8, in <module>
sys.exit(client())
~~~~~~^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/click/core.py", line 1161, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf_on_ci/client.py", line 84, in client
updater.refresh()
~~~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/updater.py", line 170, in refresh
self._load_timestamp()
~~~~~~~~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/updater.py", line 425, in _load_timestamp
data = self._download_metadata(
Timestamp.type, self.config.timestamp_max_length
)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/updater.py", line 313, in _download_metadata
return self._fetcher.download_bytes(url, length)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/fetcher.py", line 139, in download_bytes
with self.download_file(url, max_length) as dl_file:
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/contextlib.py", line 141, in __enter__
return next(self.gen)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/fetcher.py", line 102, in download_file
for chunk in chunks:
^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/tuf/ngclient/urllib3_fetcher.py", line 105, in _chunks
yield from response.stream(self.chunk_size)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 1066, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 955, in read
data = self._raw_read(amt)
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 878, in _raw_read
with self._error_catcher():
~~~~~~~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/contextlib.py", line 162, in __exit__
self.gen.throw(value)
~~~~~~~~~~~~~~^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.4/x64/lib/python3.13/site-packages/urllib3/response.py", line 759, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.") from e # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='tuf-repo-cdn.sigstore.dev', port=443): Read timed out.
- Linguagem predominante
- Python
- Estrelas
- 1.7k
- Forks
- 304
- Merge médio
- 9h 25min
- PRs com merge (30d)
- 14
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de theupdateframework/python-tuf
-
switch to main branch?Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
theupdateframework/python-tuf#3001 ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
theupdateframework/python-tuf#2979 · 1 comentário ·
Mantenedores costumam responder em até 10 dias
-
Use Immutable ReleasesAbertaenhancement github_actions
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
theupdateframework/python-tuf#2920 · 1 comentário · 2 reações ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
theupdateframework/python-tuf#2836 · 7 comentários ·
Mantenedores costumam responder em até 10 dias
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
theupdateframework/python-tuf#2676 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 10 dias
Todas as issues de theupdateframework/python-tuf
Issues semelhantes
-
bug status/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
prowler-cloud/prowler#12887 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
area: desktop platform: macos priority: p3 status: ready type: enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
use-agent-os/agent-os#3484 ·
Mantenedores costumam responder em até 2 dias
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
open-telemetry/opentelemetry-python-contrib#5113 · 2 comentários · 2 reações ·
Mantenedores costumam responder em até 1 dia
-
external
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
langchain-ai/docs#6255 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia