microsoft / microsoft/azure-devops-python-api

get_artifact_content_zip() does not follow redirect from 302

Ouverte
#332 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Python
Étoiles
684
Forks
218
Merge moyen
8 j 10 h
PR mergées (30 j)
1

Description

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?)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez au point d’entrée get_artifact_content_zip() et suivez la manière dont sa requête gère la réponse 302 d’Azure DevOps. Reproduisez le cas de téléchargement d’un petit artefact, puis vérifiez qu’une URL d’artefact redirigée renvoie le contenu du zip au lieu d’une erreur 404.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
azure, python
Domaine
api
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.