[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methods
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- authentication
Direção de pesquisa
Read msal/application.py lines 716-718 and check how the mounted HTTPAdapter configures urllib3 retries for POST requests. The linked pull request #958 is already open; compare its change with the reported local reset repro and verify the retry behavior and existing tests before considering the issue done.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
msal/application.py lines 716-718 mount HTTPAdapter(max_retries=1) as "a minimal retry, better than nothing". For the token endpoint it is nothing: urllib3's Retry(1) keeps the default allowed_methods, which excludes POST, so a connection reset during the token request escapes after one attempt as requests.exceptions.ConnectionError.
Repro over a local TLS server that resets the first /token connection (self-signed cert, verify=False, nothing leaves 127.0.0.1): https://gist.github.com/HardMax71/fd1025dc346b2aefe1291e11cc343d8c
msal 1.38.0 | requests 2.33.0 | urllib3 2.7.0
default http_client (HTTPAdapter(max_retries=1)): ConnectionError escaped, connections after discovery=1: ('Connection aborted.', OSError(22, 'Invalid argument'))
custom http_client, Retry(allowed_methods=None): token=yes | connections after discovery=2
Same on 1.37.0. I know #432 settled on retries being an http-layer concern and a custom http_client being the answer, and that is what we run. This is narrower: the adapter MSAL itself mounts does not do what its comment says. HTTPAdapter(max_retries=Retry(total=1, connect=1, allowed_methods=None, backoff_factor=0.3)) keeps the same one-retry budget and makes it real for the POST. Can send the PR.
- Linguagem predominante
- Python
- Estrelas
- 971
- Forks
- 223
- Merge médio
- 1d 32min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem 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 AzureAD/microsoft-authentication-library-for-python
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
-
AzureSDK bug P1
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionTalvez já em andamento @HardMax71 assumiu há 55 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 25/100
-
public-client untriaged
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
-
[Bug] Interactive auth callback hangs forever when an idle connection reaches AuthCodeReceiver firstTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug public-client
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 48/100
AzureAD/microsoft-authentication-library-for-python#950 · 2 comentários · 3 reações ·
Todas as issues de AzureAD/microsoft-authentication-library-for-python
Issues semelhantes
-
bug severity:low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 2 dias
-
curriculum documentation quality
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
githubnext/gh-aw-workshop#5367 ·
Mantenedores costumam responder em até 3 dias
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
Create Noise Latents ignores randomize_seed and produces the same noise every runTalvez já em andamento @griptapeops assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
griptape-ai/griptape-nodes-library-diffusers#127 ·
Mantenedores costumam responder em até 1 dia
-
Jenkins capacity report: metrics history is lost when archiving a month failsTalvez já em andamento @RaphaelFakhri assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
adoptium/infrastructure#4568 ·
Mantenedores costumam responder em até 1 dia