Skip to content

ESC Change Enum to String#9829

Open
2003LK wants to merge 3 commits intoAzure:mainfrom
2003LK:enum-to-string
Open

ESC Change Enum to String#9829
2003LK wants to merge 3 commits intoAzure:mainfrom
2003LK:enum-to-string

Conversation

@2003LK
Copy link
Copy Markdown
Contributor

@2003LK 2003LK commented Apr 28, 2026


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

Copilot AI review requested due to automatic review settings April 28, 2026 23:29
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 28, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 28, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown
Contributor

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank 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

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-standards in workspace create/update AA​​Z argument schemas.
  • Bump extension version to 1.3.2 and 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.

Comment on lines +254 to +257
# @ResourceGroupPreparer(dev_setting_name='cli_test_databricks_v2', location=TEST_LOCATION)
def test_databricks_v2(self):
self.kwargs.update({
'rg': "lkam-cli-auto",
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# @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,

Copilot uses AI. Check for mistakes.
Comment on lines 361 to 368
@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),
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

@yonzhan yonzhan requested a review from necusjz April 28, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants