microsoft / microsoft/azure-devops-python-api
get_artifact_content_zip() does not follow redirect from 302
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 684
- Fork
- 218
- Merge medio
- 8g 10h
- PR unite (30g)
- 1
Descrizione
Appears that ADO puts small pipeline artifacts elsewhere and uses a 302 to redirect.
My code downloading artifacts from multiple builds works fine for the big artifacts but gets a 404 for the little ones. My suspicion (haven't traced through this one completely) is that the underlying API (from msrest?) is putting in the 404. Looking at the traffic in Fiddler I see that ADO is actually issuing a 302
HTTP/1.1 302 Found
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Location: https://artprodwus21.artifacts.visualstudio.com/*redacted*/_apis/artifact/*redacted*/content?format=zip
[---
rest of the stuff removed as I don't think it's of interest and
I'm not certain what/if should be removed before posting
---]
The link provided for the redirect works fine.
Looked through the azure-devops code to see if there was a flag to set to have it follow the redirect but didn't see it (in the base class (super in Python?) maybe?)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso get_artifact_content_zip() e segui il modo in cui la sua richiesta gestisce la risposta 302 di Azure DevOps. Riproduci il caso di download di un artefatto di piccole dimensioni, quindi verifica che un URL dell’artefatto reindirizzato restituisca il contenuto dello zip invece di un 404.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100