microsoft / microsoft/azure-devops-python-api

get_artifact_content_zip() does not follow redirect from 302

Đang mở
#332 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
684
Fork
218
Merge trung bình
8 ngày 10 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại điểm vào get_artifact_content_zip() và theo dõi cách yêu cầu của nó xử lý phản hồi 302 từ Azure DevOps. Tái hiện trường hợp tải xuống một artifact nhỏ, sau đó xác minh rằng URL artifact được chuyển hướng trả về nội dung zip thay vì 404.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, python
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.