az artifacts download fails on Github action.
See original GitHub issueDescribe the bug
az artifacts universal download --organization {myorg} --feed {myfeed} --name {artifactname} --version *.*.* --path .
fails with error : No release could be found based on the provided information.
This stopped working suddenly from one day to the other. We thought it was a transient error so we waited but after a couple of days we are still not able to download artifacts.
To Reproduce azure-cli (2.24.2) (latest) azure-devops (0.18.0)
Steps to reproduce the behavior: Use the following action in a github workflow (replace the values between { } witrh actual values.
- uses: azure/CLI@v1
env:
AZURE_DEVOPS_EXT_PAT: ${{ secrets.AZURE_DEVOPS_PAT_TOKEN }}
with:
inlineScript: |
az extension add --name azure-devops
az artifacts universal download --organization {myorg} --feed {myfeed} --name {artifactname} --version *.*.* --path .
Expected behavior The artifacts to be downloaded.
Debug logs We run the az with debug mode and we get the following:
2021-06-09T09:36:00.2566683Z DEBUG: azext_devops.devops_sdk.client: Route template: _apis/***area***/***toolName***/***resource***
2021-06-09T09:36:00.2568747Z DEBUG: azext_devops.devops_sdk.client: Api version '5.0-preview'
2021-06-09T09:36:00.2570739Z DEBUG: azext_devops.devops_sdk.client: GET https://vsblob.dev.azure.com/{myorg}/_apis/clienttools/ArtifactTool/release?osName=Linux&arch=x86_64&distroName=alpine&distroVersion=3.13.5
2021-06-09T09:36:00.2572604Z DEBUG: azext_devops.devops_sdk.client: Request content: None
2021-06-09T09:36:00.2573890Z DEBUG: msrest.universal_http: Configuring redirects: allow=True, max=30
2021-06-09T09:36:00.2575468Z DEBUG: msrest.universal_http: Configuring request: timeout=100, verify=True, cert=None
2021-06-09T09:36:00.2577009Z DEBUG: msrest.universal_http: Configuring proxies: ''
2021-06-09T09:36:00.2578244Z DEBUG: msrest.universal_http: Evaluate proxies against ENV settings: True
2021-06-09T09:36:00.5743143Z DEBUG: urllib3.connectionpool: https://vsblob.dev.azure.com:443 "GET /{myorg}/_apis/clienttools/ArtifactTool/release?osName=Linux&arch=x86_64&distroName=alpine&distroVersion=3.13.5 HTTP/1.1" 404 326
2021-06-09T09:36:00.5775785Z DEBUG: 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***'
2021-06-09T09:36:00.5805603Z DEBUG: msrest.exceptions: No release could be found based on the provided information.
2021-06-09T09:36:00.5807831Z DEBUG: cli.azext_devops.dev.common.artifacttool_updater: No release could be found based on the provided information.
2021-06-09T09:36:00.5809534Z Traceback (most recent call last):
2021-06-09T09:36:00.5848325Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
2021-06-09T09:36:00.5849940Z release = _get_current_release(organization, override_version)
2021-06-09T09:36:00.5851636Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 161, in _get_current_release
2021-06-09T09:36:00.5852914Z release = client.get_clienttool_release(
2021-06-09T09:36:00.5854814Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/client_tool/client_tool_client.py", line 44, in get_clienttool_release
2021-06-09T09:36:00.5856267Z response = self._send(http_method='GET',
2021-06-09T09:36:00.5857598Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 90, in _send
2021-06-09T09:36:00.5859028Z response = self._send_request(request=request, headers=headers, content=content, media_type=media_type)
2021-06-09T09:36:00.5860827Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 54, in _send_request
2021-06-09T09:36:00.5861966Z self._handle_error(request, response)
2021-06-09T09:36:00.5863354Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 233, in _handle_error
2021-06-09T09:36:00.5864666Z raise AzureDevOpsServiceError(wrapped_exception)
2021-06-09T09:36:00.5866397Z azext_devops.devops_sdk.exceptions.AzureDevOpsServiceError: No release could be found based on the provided information.
2021-06-09T09:36:00.5868212Z DEBUG: cli.azext_devops.dev.common.exception_handler: handling generic error
2021-06-09T09:36:00.5869801Z DEBUG: cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
2021-06-09T09:36:00.5871312Z DEBUG: cli.azure.cli.core.util: Traceback (most recent call last):
2021-06-09T09:36:00.5873023Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 59, in _get_artifacttool
2021-06-09T09:36:00.5874404Z release = _get_current_release(organization, override_version)
2021-06-09T09:36:00.5876071Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 161, in _get_current_release
2021-06-09T09:36:00.5877365Z release = client.get_clienttool_release(
2021-06-09T09:36:00.5878940Z File "/opt/az/azcliextensions/azure-devops/azext_devops/dev/common/client_tool/client_tool_client.py", line 44, in get_clienttool_release
2021-06-09T09:36:00.5880348Z response = self._send(http_method='GET',
2021-06-09T09:36:00.5881673Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 90, in _send
2021-06-09T09:36:00.5883095Z response = self._send_request(request=request, headers=headers, content=content, media_type=media_type)
2021-06-09T09:36:00.5884759Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 54, in _send_request
2021-06-09T09:36:00.5885892Z self._handle_error(request, response)
2021-06-09T09:36:00.5887279Z File "/opt/az/azcliextensions/azure-devops/azext_devops/devops_sdk/client.py", line 233, in _handle_error
2021-06-09T09:36:00.5888599Z raise AzureDevOpsServiceError(wrapped_exception)
2021-06-09T09:36:00.5890330Z azext_devops.devops_sdk.exceptions.AzureDevOpsServiceError: No release could be found based on the provided information.
Additional context We run our actions on a latest-ubuntu runner in github:
2021-06-09T09:35:03.3953438Z Current runner version: '2.278.0'
2021-06-09T09:35:03.3987837Z ##[group]Operating System
2021-06-09T09:35:03.3989264Z Ubuntu
2021-06-09T09:35:03.3990105Z 20.04.2
2021-06-09T09:35:03.3990908Z LTS
2021-06-09T09:35:03.3991788Z ##[endgroup]
2021-06-09T09:35:03.3992733Z ##[group]Virtual Environment
2021-06-09T09:35:03.3993801Z Environment: ubuntu-20.04
2021-06-09T09:35:03.3994766Z Version: 20210531.0
If I read the log and code correctly it tries to find the version for the image where the az artifact tool will run from ( in order to install it) and ends up resolving :
https://vsblob.dev.azure.com/{myorg}/_apis/clienttools/ArtifactTool/release?osName=Linux&arch=x86_64&distroName=alpine&distroVersion=3.13.5
which in turn returns an error. The distro name does not exist indeed and results in an error in
https://github.com/Azure/azure-devops-cli-extension/blob/effbefe7bc6a41d3f319790f287de49558bd5fa6/azure-devops/azext_devops/dev/common/artifacttool_updater.py#L59
Thanks in advance.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
@douglaswaights thanks for the tip. I took your suggestion and made it into a generic action: https://github.com/marketplace/actions/azcli-artifacttool-workaround you can use this for now to upload/download artifacts. I don’t know when this issue will/can be solved.
@fidou I managed to work around this by creating my own container image and installing the azure cli bits manually
I have a docker file based off ubuntu latest that looks something like this
FROM ubuntu as publisher ARG GIT_SHA ARG BUILD_ID ARG AZURE_DEVOPS_EXT_PAT ENV git_sha=$GIT_SHA ENV build_id=$BUILD_ID ENV AZURE_DEVOPS_EXT_PAT=$AZURE_DEVOPS_EXT_PAT WORKDIR /app
#trying to fix the issue of mcr.microsoft/azure-cli image being broken and failing to publish -> following the steps in https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt RUN apt-get update RUN apt-get install -y ca-certificates curl apt-transport-https lsb-release gnupg RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
RUN apt-get update RUN apt-get install -y azure-cli RUN az extension add --name azure-devops RUN export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 #end of the fix
#do stuff
RUN az artifacts universal publish blah blah
This works for me!
I put together the above steps from the ubuntu linux azure cli install page https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
Hope this helps!