ESC Change Enum to String#9829
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
There was a problem hiding this comment.
Pull request overview
This PR updates the Databricks extension’s Enhanced Security & Compliance (ESC) --compliance-standards argument to accept free-form strings (instead of a fixed enum), and bumps the extension version accordingly.
Changes:
- Remove enum constraints for
--compliance-standardsin workspace create/update AAZ argument schemas. - Bump extension version to
1.3.2and add release notes. - Update scenario tests/recordings (notably, scenario tests were modified to use hardcoded resource groups).
Reviewed changes
Copilot reviewed 8 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/databricks/setup.py | Version bump to 1.3.2. |
| src/databricks/HISTORY.rst | Add 1.3.2 changelog entry for ESC change. |
| src/databricks/azext_databricks/aaz/latest/databricks/workspace/_create.py | Remove enum validation for compliance standards on create. |
| src/databricks/azext_databricks/aaz/latest/databricks/workspace/_update.py | Remove enum validation for compliance standards on update. |
| src/databricks/azext_databricks/tests/latest/test_databricks_scenario.py | Scenario tests modified to hardcode RGs and remove ResourceGroupPreparer usage (problematic). |
| src/databricks/azext_databricks/tests/latest/recordings/test_databricks_serverless_failures.yaml | Refresh VCR recording. |
| src/databricks/azext_databricks/tests/latest/recordings/test_access_connector_v2.yaml | Refresh VCR recording. |
| src/databricks/azext_databricks/tests/latest/recordings/test_access_connector.yaml | Refresh VCR recording. |
| # @ResourceGroupPreparer(dev_setting_name='cli_test_databricks_v2', location=TEST_LOCATION) | ||
| def test_databricks_v2(self): | ||
| self.kwargs.update({ | ||
| 'rg': "lkam-cli-auto", |
There was a problem hiding this comment.
These scenario tests no longer use ResourceGroupPreparer and now hardcode the resource group (and drop the injected resource_group parameter). This will make the test depend on pre-existing RGs and break CI/playback isolation. Please restore @ResourceGroupPreparer (and the resource_group argument) and avoid hardcoded RG names so the test can run in a clean subscription and be recorded reliably.
| # @ResourceGroupPreparer(dev_setting_name='cli_test_databricks_v2', location=TEST_LOCATION) | |
| def test_databricks_v2(self): | |
| self.kwargs.update({ | |
| 'rg': "lkam-cli-auto", | |
| @ResourceGroupPreparer(dev_setting_name='cli_test_databricks_v2', location=TEST_LOCATION) | |
| def test_databricks_v2(self, resource_group): | |
| self.kwargs.update({ | |
| 'rg': resource_group, |
| @AllowLargeResponse(size_kb=10240) | ||
| @ResourceGroupPreparer(name_prefix='cli_test_databricks_v3', location=STAGE_LOCATION) | ||
| def test_databricks_v3(self, resource_group): | ||
| # @ResourceGroupPreparer(name_prefix='cli_test_databricks_v3', location=STAGE_LOCATION) | ||
| def test_databricks_v3(self): | ||
| self.kwargs.update({ | ||
| 'rg': "lkam-cli-west", | ||
| 'workspace_name': self.create_random_name(prefix='wn', length=12), | ||
| 'loc': STAGE_LOCATION, | ||
| 'loc': "westus", | ||
| 'vnet_name': self.create_random_name(prefix='vnet', length=12), |
There was a problem hiding this comment.
test_databricks_v3 is also no longer using ResourceGroupPreparer and now hardcodes the resource group/location. This makes the test non-hermetic and likely to fail in CI where those RGs don’t exist, and it prevents consistent VCR recordings. Please re-enable @ResourceGroupPreparer (and accept resource_group) and use the prepared {rg}/{loc} values instead of hardcoding.
|
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.