Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

Not possible to download build artifact with `az pipelines` using official az CLI Docker image #18438

Open jozala opened 3 years ago

jozala commented 3 years ago

Describe the bug

It is not possible to download nor upload artifacts with az pipelines using official az CLI Docker image (mcr.microsoft.com/azure-cli:2.24.2).

Command Name az pipelines runs artifact download Extension Name: azure-devops. Version: 0.18.0.

Errors:

Failed to update Universal Packages tooling.
 No release could be found based on the provided information.

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Expected Behavior

Download artifact from Azure DevOps build.

Environment Summary

Linux-5.8.0-55-generic-x86_64-with
Python 3.8.9
Installer: DOCKER

azure-cli 2.24.2

Extensions:
azure-devops 0.18.0

Additional Context

This log from debug seems to be the root cause:

azext_devops.devops_sdk.exceptions.AzureDevOpsAuthenticationError: The requested resource requires user authentication: https://dev.azure.com/{}/_apis/CustomerIntelligence/Events
urllib3.connectionpool: https://{}.vsblob.visualstudio.com:443 "GET /_apis/clienttools/ArtifactTool/release?osName=Linux&arch=x86_64&distroName=alpine&distroVersion=3.13.5 HTTP/1.1" 404 326
azext_devops.devops_sdk.client: Response content: b'{"$id":"1","innerException":null,"message":"No release could be found based on the provided information.","typeName":"Microsoft.VisualStudio.Services.BlobStore.WebApi.Exceptions.ClientToolNotFoundException, Microsoft.VisualStudio.Services.BlobStore.WebApi","typeKey":"ClientToolNotFoundException","errorCode":0,"eventId":3000}'
msrest.exceptions: No release could be found based on the provided information.
cli.azext_devops.dev.common.artifacttool_updater: No release could be found based on the provided information.

It looks to me that vsblob.visualstudio.com does not return link to the Artifact Tool for Alpine Linux which is base of Docker image. If I will call this URL without "&distroName=alpine&distroVersion=3.13.5", it returns link to the tool properly.

ghost commented 3 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @narula0781, @ashishonce, @romil07.

Issue Details
## Describe the bug It is not possible to download nor upload artifacts with `az pipelines` using official az CLI Docker image (mcr.microsoft.com/azure-cli:2.24.2). **Command Name** `az pipelines runs artifact download Extension Name: azure-devops. Version: 0.18.0.` **Errors:** ``` Failed to update Universal Packages tooling. No release could be found based on the provided information. ``` ## To Reproduce: Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. - `az pipelines runs artifact download --organization {} --project {} --run-id {} --artifact-name {} --path {} --debug` ## Expected Behavior Download artifact from Azure DevOps build. ## Environment Summary ``` Linux-5.8.0-55-generic-x86_64-with Python 3.8.9 Installer: DOCKER azure-cli 2.24.2 Extensions: azure-devops 0.18.0 ``` ## Additional Context This log from debug seems to be the root cause: ``` azext_devops.devops_sdk.exceptions.AzureDevOpsAuthenticationError: The requested resource requires user authentication: https://dev.azure.com/{}/_apis/CustomerIntelligence/Events urllib3.connectionpool: https://{}.vsblob.visualstudio.com:443 "GET /_apis/clienttools/ArtifactTool/release?osName=Linux&arch=x86_64&distroName=alpine&distroVersion=3.13.5 HTTP/1.1" 404 326 azext_devops.devops_sdk.client: Response content: b'{"$id":"1","innerException":null,"message":"No release could be found based on the provided information.","typeName":"Microsoft.VisualStudio.Services.BlobStore.WebApi.Exceptions.ClientToolNotFoundException, Microsoft.VisualStudio.Services.BlobStore.WebApi","typeKey":"ClientToolNotFoundException","errorCode":0,"eventId":3000}' msrest.exceptions: No release could be found based on the provided information. cli.azext_devops.dev.common.artifacttool_updater: No release could be found based on the provided information. ``` It looks to me that `vsblob.visualstudio.com` does not return link to the Artifact Tool for Alpine Linux which is base of Docker image. If I will call this URL without "&distroName=alpine&distroVersion=3.13.5", it returns link to the tool properly.
Author: jozala
Assignees: -
Labels: `DevOps`, `Pipelines`, `Service Attention`
Milestone: -
yonzhan commented 3 years ago

route to service team

filipsvensson commented 3 years ago

Any updates on this? We are having the same issue in our project.

george-ayris commented 3 years ago

Also having an issue with this while running az artifacts universal publish

yonzhan commented 3 years ago

devops service team should look into this

jozala commented 3 years ago

Any updates?