-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Azure Databricks API Update #28955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Azure Databricks API Update #28955
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
@2003LK please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this 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 pull request updates the Azure Databricks PowerShell module from API version 2024-05-01 to 2025-10-01-preview, introducing a new ComputeMode parameter that supports Hybrid (default) and Serverless compute modes for workspace creation. The update includes comprehensive documentation changes, test additions, and configuration updates across the module.
Key Changes:
- Added
ComputeModeparameter toNew-AzDatabricksWorkspacecmdlet with default value of 'Hybrid' - Updated all API version references from
Api20240501toApi20251001Previewacross the codebase - Added new test suite for Serverless workspace scenarios
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Databricks/Databricks/ChangeLog.md | Added changelog entry for version 1.11.0 with ComputeMode parameter documentation |
| src/Databricks/Databricks/Az.Databricks.psd1 | Updated module generation date and formatting |
| src/Databricks/Databricks.sln | Updated project GUID references |
| src/Databricks/Databricks.Autorest/custom/New-AzDatabricksWorkspace.ps1 | Implemented ComputeMode parameter with default Hybrid value and conditional ManagedResourceGroup logic |
| src/Databricks/Databricks.Autorest/custom/Update-AzDatabricksWorkspace.ps1 | Updated API version references in output types |
| src/Databricks/Databricks.Autorest/custom/Update-AzDatabricksVNetPeering.ps1 | Updated API version references in output types |
| src/Databricks/Databricks.Autorest/custom/New-AzDatabricksWorkspaceProviderAuthorizationObject.ps1 | Updated API version references |
| src/Databricks/Databricks.Autorest/test/AzDatabricksWorkspace.Tests.ps1 | Added comprehensive Serverless workspace test suite |
| src/Databricks/Databricks.Autorest/test/utils.ps1 | Added second resource group for Serverless testing |
| src/Databricks/Databricks.Autorest/test/localEnv.json | Added local test environment configuration |
| src/Databricks/Databricks.Autorest/README.md | Updated commit hash and API version tag to 2025-10-01-preview |
| src/Databricks/Databricks.Autorest/Properties/AssemblyInfo.cs | Incremented assembly version to 1.10.1 |
| src/Databricks/Databricks.Autorest/UX/*.json | Updated API versions to 2025-10-01-preview |
| src/Databricks/Databricks/help/*.md | Updated all type references and added ComputeMode parameter documentation |
| src/Databricks/Databricks.Autorest/docs/*.md | Updated all type references and added ComputeMode parameter documentation |
| src/Databricks/Databricks.Autorest/generate-info.json | Updated generation ID |
| { | ||
| "accessConnectorName1": "6tflo9", | ||
| "keyVaultName": "azpsn4ehu1", | ||
| "workSpaceName2": "dmla0b", | ||
| "vNetName1": "mpkfqb", | ||
| "workSpaceName3": "ijm59k", | ||
| "networkSecurityRuleName": "oedujn", | ||
| "vNetSubnetName2": "7g5p28", | ||
| "resourceGroup2": "auto-test-databricks2-js", | ||
| "vNetSubnetName1": "2pgb1v", | ||
| "location": "eastus", | ||
| "resourceGroup": "auto-test-databricks-qw", | ||
| "vNetSubnetName3": "pad4bv", | ||
| "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", | ||
| "vNetName": "h0yfbn", | ||
| "workSpaceName1": "dnylig", | ||
| "SubscriptionId": "0140911e-1040-48da-8bc9-b99fb3dd88a6", | ||
| "networkSecurityGroupName": "lz4kh1" | ||
| } |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The localEnv.json file should not be committed to the repository. According to the test infrastructure (loadEnv.ps1 line 16-17), this file is used for live test mode and contains local environment-specific test configuration. It should remain local to each developer's machine.
This file should be added to .gitignore and removed from the repository. The committed env.json file already provides the template for recorded/playback tests.
| { | |
| "accessConnectorName1": "6tflo9", | |
| "keyVaultName": "azpsn4ehu1", | |
| "workSpaceName2": "dmla0b", | |
| "vNetName1": "mpkfqb", | |
| "workSpaceName3": "ijm59k", | |
| "networkSecurityRuleName": "oedujn", | |
| "vNetSubnetName2": "7g5p28", | |
| "resourceGroup2": "auto-test-databricks2-js", | |
| "vNetSubnetName1": "2pgb1v", | |
| "location": "eastus", | |
| "resourceGroup": "auto-test-databricks-qw", | |
| "vNetSubnetName3": "pad4bv", | |
| "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", | |
| "vNetName": "h0yfbn", | |
| "workSpaceName1": "dnylig", | |
| "SubscriptionId": "0140911e-1040-48da-8bc9-b99fb3dd88a6", | |
| "networkSecurityGroupName": "lz4kh1" | |
| } | |
| # (Delete the file entirely; no replacement lines) |
| --> | ||
| ## Upcoming Release | ||
|
|
||
| ## Version 1.11.0 |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog entry should be placed under the "## Upcoming Release" section (line 20), not under "## Version 1.11.0". According to the repository guidelines, changes for the upcoming release must go under the "## Upcoming Release" header. The version number should only be added when the release is actually created.
Move these lines (22-24) to immediately after line 20.
| ## Version 1.11.0 |
| $manageResourceGroupName = $PSBoundParameters["ManagedResourceGroupName"] | ||
| $null = $PSBoundParameters.Remove("ManagedResourceGroupName") | ||
|
|
||
| if (-not $PSBoundParameters.ContainsKey('ComputeMode') -or $PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") { |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a logic error in this condition. On line 465-466, you set ComputeMode to 'Hybrid' if it's not present, which means $PSBoundParameters.ContainsKey('ComputeMode') will ALWAYS be true when this condition on line 469 is evaluated. This makes the first part of the OR condition (-not $PSBoundParameters.ContainsKey('ComputeMode')) always false.
The condition should be:
if ($PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") {This logic ensures that for non-Serverless modes (including the default Hybrid), a ManagedResourceGroup is required, while for Serverless mode, it's not needed.
| if (-not $PSBoundParameters.ContainsKey('ComputeMode') -or $PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") { | |
| if ($PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") { |
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation shows "Default value: None" but the code implementation sets the default to 'Hybrid' (see New-AzDatabricksWorkspace.ps1 lines 465-467). The documentation should reflect the actual default behavior.
Update the default value to:
Default value: HybridAdditionally, consider adding a note in the parameter description explaining that Hybrid is the default mode if not specified.
|
|
||
| Required: False | ||
| Position: Named | ||
| Default value: None |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation shows "Default value: None" but the code implementation sets the default to 'Hybrid' (see New-AzDatabricksWorkspace.ps1 lines 465-467). The documentation should reflect the actual default behavior.
Update the default value to:
Default value: HybridAdditionally, consider adding a note in the parameter description explaining that Hybrid is the default mode if not specified.
| It 'CreateExpanded' { | ||
| { | ||
| $config = New-AzDatabricksWorkspace -Name $env.workSpaceName2 -ResourceGroupName $env.resourceGroup2 -Location $env.location -ComputeMode 'Serverless' -Sku premium | ||
| $config.Name | Should -Be $env.workSpaceName2 | ||
| } | Should -Not -Throw |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test creates a Serverless workspace but doesn't verify that the ComputeMode property is actually set to 'Serverless'. Consider adding an assertion to verify the property:
It 'CreateExpanded' {
{
$config = New-AzDatabricksWorkspace -Name $env.workSpaceName2 -ResourceGroupName $env.resourceGroup2 -Location $env.location -ComputeMode 'Serverless' -Sku premium
$config.Name | Should -Be $env.workSpaceName2
$config.ComputeMode | Should -Be 'Serverless' # Verify mode is set correctly
} | Should -Not -Throw
}This ensures the ComputeMode parameter is working as expected and the property is returned correctly.
Description
Updating the API version from 2024-05-01 to 2025-10-01-preview. Major updates include introducing Compute Mode (default Hybrid, Serverless).
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.