Skip to content

Conversation

@2003LK
Copy link

@2003LK 2003LK commented Dec 4, 2025

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

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings December 4, 2025 22:30
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@microsoft-github-policy-service
Copy link
Contributor

@2003LK please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement

Contribution License Agreement

This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

  1. Definitions.
    “Code” means the computer software code, whether in human-readable or machine-executable form,
    that is delivered by You to Microsoft under this Agreement.
    “Project” means any of the projects owned or managed by Microsoft and offered under a license
    approved by the Open Source Initiative (www.opensource.org).
    “Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
    Project, including but not limited to communication on electronic mailing lists, source code control
    systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
    discussing and improving that Project, but excluding communication that is conspicuously marked or
    otherwise designated in writing by You as “Not a Submission.”
    “Submission” means the Code and any other copyrightable material Submitted by You, including any
    associated comments and documentation.
  2. Your Submission. You must agree to the terms of this Agreement before making a Submission to any
    Project. This Agreement covers any and all Submissions that You, now or in the future (except as
    described in Section 4 below), Submit to any Project.
  3. Originality of Work. You represent that each of Your Submissions is entirely Your original work.
    Should You wish to Submit materials that are not Your original work, You may Submit them separately
    to the Project if You (a) retain all copyright and license information that was in the materials as You
    received them, (b) in the description accompanying Your Submission, include the phrase “Submission
    containing materials of a third party:” followed by the names of the third party and any licenses or other
    restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
    guidelines concerning Submissions.
  4. Your Employer. References to “employer” in this Agreement include Your employer or anyone else
    for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
    Submission is made in the course of Your work for an employer or Your employer has intellectual
    property rights in Your Submission by contract or applicable law, You must secure permission from Your
    employer to make the Submission before signing this Agreement. In that case, the term “You” in this
    Agreement will refer to You and the employer collectively. If You change employers in the future and
    desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
    and secure permission from the new employer before Submitting those Submissions.
  5. Licenses.
  • Copyright License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
    Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
    the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
    parties.
  • Patent License. You grant Microsoft, and those who receive the Submission directly or
    indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
    Your patent claims that are necessarily infringed by the Submission or the combination of the
    Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
    import or otherwise dispose of the Submission alone or with the Project.
  • Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
    No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
    granted by implication, exhaustion, estoppel or otherwise.
  1. Representations and Warranties. You represent that You are legally entitled to grant the above
    licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
    have disclosed under Section 3). You represent that You have secured permission from Your employer to
    make the Submission in cases where Your Submission is made in the course of Your work for Your
    employer or Your employer has intellectual property rights in Your Submission by contract or applicable
    law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
    have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
    You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
    REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
    EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
    PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
    NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
  2. Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
    You later become aware that would make Your representations in this Agreement inaccurate in any
    respect.
  3. Information about Submissions. You agree that contributions to Projects and information about
    contributions may be maintained indefinitely and disclosed publicly, including Your name and other
    information that You submit with Your Submission.
  4. Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
    the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
    Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
    exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
    defenses of lack of personal jurisdiction and forum non-conveniens.
  5. Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
    supersedes any and all prior agreements, understandings or communications, written or oral, between
    the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

Copilot finished reviewing on behalf of 2003LK December 4, 2025 22:38
@isra-fel
Copy link
Member

isra-fel commented Dec 4, 2025

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
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 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 ComputeMode parameter to New-AzDatabricksWorkspace cmdlet with default value of 'Hybrid'
  • Updated all API version references from Api20240501 to Api20251001Preview across 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

Comment on lines +1 to +19
{
"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"
}
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
{
"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)

Copilot uses AI. Check for mistakes.
-->
## Upcoming Release

## Version 1.11.0
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
## Version 1.11.0

Copilot uses AI. Check for mistakes.
$manageResourceGroupName = $PSBoundParameters["ManagedResourceGroupName"]
$null = $PSBoundParameters.Remove("ManagedResourceGroupName")

if (-not $PSBoundParameters.ContainsKey('ComputeMode') -or $PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") {
Copy link

Copilot AI Dec 4, 2025

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.

Suggested change
if (-not $PSBoundParameters.ContainsKey('ComputeMode') -or $PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") {
if ($PSBoundParameters["ComputeMode"].ToString() -ne "Serverless") {

Copilot uses AI. Check for mistakes.

Required: False
Position: Named
Default value: None
Copy link

Copilot AI Dec 4, 2025

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: Hybrid

Additionally, consider adding a note in the parameter description explaining that Hybrid is the default mode if not specified.

Copilot uses AI. Check for mistakes.

Required: False
Position: Named
Default value: None
Copy link

Copilot AI Dec 4, 2025

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: Hybrid

Additionally, consider adding a note in the parameter description explaining that Hybrid is the default mode if not specified.

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +93
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
Copy link

Copilot AI Dec 4, 2025

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.

Copilot uses AI. Check for mistakes.
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.

2 participants