Azure / Azure/azure-cli-extensions

[Feature request] Add compatibility validation between CLI extension and CLI Core "azext.minCliCoreVersion"

Open
#4,640 7 comments 0 reactions 1 assignee Claimed by @jsntcy View on GitHub
Auto-Assign CI feature-request Test
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

# Feature request

## Background
For Spring-cloud extension, we released `3.1.0` including introduce new SDK for 2022-03-01-preview apiVersion. However, this sdk imports a library available in Azure CLI Core from version `2.30.0`, however, the `azext.minCliCoreVersion` for `3.1.0` is `2.25.0`. Customer who uses Azure CLI among [`2.25.0`, `2.30.0`) will failed all commands for `spring-cloud` extension `3.1.0`.

### Related PR
- [Vendor AppPlatform 2022-03-01-preview SDK](https://github.com/Azure/azure-cli-extensions/pull/4552)
- [Add support for AppMSI](https://github.com/Azure/azure-cli-extensions/pull/4598)
- [Upgrade min version requirement of azure cli for spring-cloud](https://github.com/Azure/azure-cli-extensions/pull/4621)
- #4626

## Request
In the pull request of an extension, run the CI with at least 2 Azure CLI version:
1. Version specified in "azext.minCliCoreVersion" for an extension.
2. latest

## Known issue
In `src/spring-cloud/azext_spring_cloud/tests/latest/test_asc_scenario.py::ByosTest::test_persistent_storage`, there is an annotation `@StorageAccountPreparer()`, when running the test, with azure-cli `2.34.1`, it's calling to storage account with apiVersion `2020-08-01`, where older azure-cli is using `2020-06-01`, which mean cannot find the request in recording file. However, it's the unit test self failure, not the extension failure.
```python
class ByosTest(ScenarioTest):

@ResourceGroupPreparer()
@StorageAccountPreparer()
def test_persistent_storage(self, resource_group, storage_account):
template = 'storage account keys list -n {} -g {} --query "[0].value" -otsv'
accountkey = self.cmd(template.format(storage_account, resource_group)).output
```

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.