Azure / Azure/azure-devops-cli-extension

Issue with downloading universal artifact from az cli

Open
#1,306 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az artifacts universal download
Extension Name: azure-devops. Version: 0.25.0.`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
File is not a zip file
Traceback (most recent call last):
File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
return cmd_copy.exception_handler(ex)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/exception_handler.py", line 31, in azure_devops_exception_handler
reraise(*sys.exc_info())
File "/opt/az/lib/python3.10/site-packages/six.py", line 703, in reraise
raise value
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/artifacts/universal.py", line 98, in download_package
return artifact_tool.download_universal(organization, project, feed, name, version, path, file_filter)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 42, in download_universal
return self.run_artifacttool(organization, args, "Downloading")
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool.py", line 57, in run_artifacttool
artifacttool_dir = self._artifacttool_updater.get_latest_artifacttool(organization)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 43, in get_latest_artifacttool
artifacttool_binary_path = self._get_artifacttool(organization)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 74, in _get_artifacttool
_update_artifacttool(release_uri, release_id)
File "/root/.azure/cliextensions/azure-devops/azext_devops/dev/common/artifacttool_updater.py", line 114, in _update_artifacttool
f = zipfile.ZipFile(content)
File "/opt/az/lib/python3.10/zipfile.py", line 1267, in __init__
self._RealGetContents()
File "/opt/az/lib/python3.10/zipfile.py", line 1334, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

```

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

- _Put any pre-requisite steps here..._
- `az artifacts universal download --organization {} --project {} --scope {} --feed {} --name {} --version {} --path {}`

## Expected Behavior

## Environment Summary
```
Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.27, Ubuntu 18.04.6 LTS
Python 3.10.5
Installer: DEB

azure-cli 2.41.0

Extensions:
azure-devops 0.25.0

Dependencies:
msal 1.20.0b1
azure-mgmt-resource 21.1.0b1
```
## Additional Context
I've set az config to disable auto-upgrade:
`az config get`
```
{
"auto-upgrade": [
{
"name": "enable",
"source": "{redacted}",
"value": "no"
}
],
"cloud": [
{
"name": "name",
"source": "{redacted}",
"value": "AzureCloud"
}
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.