Azure / Azure/azure-devops-cli-extension

`az devops extension install` asks for "extension-id" and "publisher-id" but really wants names.

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

Description

[Reference](https://github.com/Azure/azure-devops-cli-extension/blob/accd854214d002bd5f22dffd5b9131b45c0da661/azure-devops/azext_devops/devops_sdk/v5_0/extension_management/extension_management_client.py#L90-L109)

## Summary

See the subject.

## Expected behaviour

```sh
# This command should install the "Terraform" extension when referenced by ID, as described below.
$: az devops extension install --publisher-id "0cd0a1f5-ca4c-4f83-ba90-e7c0e65f23d0" --extension-id "caa2c5e9-7390-4371-a9f6-185f778db5d2" --organization https://dev.azure.com/$AZ_DEVOPS_EXT_ORG
{
"baseUri": null,
"constraints": null,
"contributionTypes": null,
"contributions": null,
"demands": null,
"eventCallbacks": null,
"extensionId": "custom-terraform-tasks",
"extensionName": "Terraform",
"fallbackBaseUri": null,
"files": null,
"flags": null,
"installState": {
"flags": "none",
"installationIssues": null,
"lastUpdated": "2020-07-29T20:29:19.367000+00:00"
},
"language": null,
"lastPublished": "2019-12-18T15:22:56.747000+00:00",
"licensing": null,
"manifestVersion": null,
"publisherId": "ms-devlabs",
"publisherName": "Microsoft DevLabs",
"registrationId": null,
"restrictedTo": null,
"scopes": null,
"serviceInstanceType": null,
"version": "0.1.8"
}
```

## Actual Behaviour

```sh
# However, when one does this, they get this:
$: az devops extension install --publisher-id "0cd0a1f5-ca4c-4f83-ba90-e7c0e65f23d0" --extension-id "caa2c5e9-7390-4371-a9f6-185f778db5d2" --organization https://
dev.azure.com/$AZ_DEVOPS_EXT_ORG
ERROR: request failed: Error occurred in request., RetryError: HTTPSConnectionPool(host='extmgmt.dev.azure.com', port=443): Max retries exceeded with url: /$AZ_DEVOPS_EXT_ORG/_apis/ExtensionManagement/InstalledExtensionsByName/0cd0a1f5-ca4c-4f83-ba90-e7c0e65f23d0/caa2c5e9-7390-4371-a9f6-185f778db5d2 (Caused by ResponseError('too many 500 error responses'))
```

## How To Resolve

Either:

1. Change these parameters to `--extension-name` and `--publisher-name`, or
2. Allow users to provide an ID and use the `ExtensionManagement` API to resolve them to names.

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.