Skip to content

Conversation

@evelyn-ys
Copy link
Member

Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

Copilot AI review requested due to automatic review settings November 13, 2025 03:50
@azure-client-tools-bot-prd
Copy link

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@evelyn-ys evelyn-ys marked this pull request as draft November 13, 2025 03:50
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@github-actions
Copy link

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>

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 13, 2025

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

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 PR migrates the azure-mgmt-keyvault SDK from version 12.1.0 to 13.0.0, which is a TypeSpec-generated SDK version. The migration includes API compatibility changes and adds output transformers to maintain backward compatibility with CLI users.

Key Changes

  • Updated azure-mgmt-keyvault dependency to version 13.0.0 across all platform requirements
  • Changed Permissions parameter from keys to keys_property throughout the codebase to match the new SDK API
  • Added output transformers to convert keysProperty back to keys in CLI output for backward compatibility

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/azure-cli/setup.py Updated azure-mgmt-keyvault version constraint to 13.0.0
src/azure-cli/requirements.py3.windows.txt Updated azure-mgmt-keyvault version to 13.0.0 for Windows
src/azure-cli/requirements.py3.Linux.txt Updated azure-mgmt-keyvault version to 13.0.0 for Linux
src/azure-cli/requirements.py3.Darwin.txt Updated azure-mgmt-keyvault version to 13.0.0 for macOS
src/azure-cli/azure/cli/command_modules/keyvault/custom.py Updated API calls to use keys_property parameter and changed get_sdk to get_models; added .result() calls to vault operations (has critical bugs)
src/azure-cli/azure/cli/command_modules/keyvault/commands.py Added transformer functions to vault commands to maintain output backward compatibility
src/azure-cli/azure/cli/command_modules/keyvault/_transformers.py Added new transformer functions to convert keysProperty to keys in output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

resource_group_name=resource_group_name,
vault_name=vault_name,
parameters=parameters)
parameters=parameters).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Copilot uses AI. Check for mistakes.
location=parameters.location,
tags=parameters.tags,
properties=parameters.properties))
properties=parameters.properties)).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
properties=parameters.properties)).result()
properties=parameters.properties)
)

Copilot uses AI. Check for mistakes.
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties)).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
properties=vault.properties)).result()
properties=vault.properties))

Copilot uses AI. Check for mistakes.
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties)).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
properties=vault.properties)).result()
properties=vault.properties))

Copilot uses AI. Check for mistakes.
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties)).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
properties=vault.properties)).result()
properties=vault.properties))

Copilot uses AI. Check for mistakes.
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties)).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
properties=vault.properties)).result()
properties=vault.properties))

Copilot uses AI. Check for mistakes.
resource_group_name=resource_group_name,
vault_name=vault_name,
parameters=params)
parameters=params).result()
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Calling .result() after sdk_no_wait() breaks the no-wait functionality. When no_wait=True, sdk_no_wait returns a poller without waiting, but immediately calling .result() forces the operation to wait anyway, defeating the purpose of the no_wait parameter.

The .result() call should be removed here. The sdk_no_wait function already handles the no_wait parameter correctly by returning either the result (when no_wait=False) or the poller (when no_wait=True).

Suggested change
parameters=params).result()
parameters=params)

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

Auto-Assign Auto assign by bot KeyVault az keyvault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants