Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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>
|
There was a problem hiding this comment.
Pull request overview
This PR removes the config-based feature flag gating for the “Global Policy” arguments, making the global policy argument registration always active in azure-cli-core.
Changes:
- Removed the
core.enable_policy_tokenconfig check. - Always registers the
EVENT_INVOKER_POST_CMD_TBL_CREATEhook to add--change-referenceand--acquire-policy-tokento eligible commands.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| from knack import events | ||
| cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument) |
There was a problem hiding this comment.
PR description is currently the template and doesn’t document the impact of making --change-reference/--acquire-policy-token always available (potential CLI surface-area/breaking-change implications) or how it was tested. Please fill in the related command(s), rationale, and a concrete testing guide so reviewers can validate the behavior change.
| from knack import events | ||
| cli_ctx.register_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, add_global_policy_argument) |
There was a problem hiding this comment.
Removing the feature-flag means these global arguments are now registered for every command table load. There are no unit tests covering that the new global options are present where expected (and skipped for list/show). Consider adding a core test (e.g., in azure/cli/core/tests/test_parser.py or test_help.py) that builds a parser for a representative command and asserts the presence/absence of --change-reference and --acquire-policy-token.
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 featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.