{AAZ} Remove client-side pattern validation - #34096
Open
Ethan Yang (necusjz) wants to merge 3 commits into
Open
Ethan Yang (necusjz) wants to merge 3 commits into
Ethan Yang (necusjz) wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Pattern compilation still occurs in AAZStrArgFormat.__init__, so invalid regex patterns can still raise re.error and cause client-side failures despite removing the fullmatch check.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR aims to make AAZ argument formatting more resilient to OpenAPI spec quality issues by removing client-side regex pattern validation that can fail when specs contain invalid regular expressions.
Changes:
- Removed
AAZStrArgFormatruntimefullmatchvalidation against a configured regex pattern.
File summaries
| File | Description |
|---|---|
| src/azure-cli-core/azure/cli/core/aaz/_arg_fmt.py | Removes client-side regex match enforcement for string argument formatting. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Qi Pan (Pan-Qi)
previously approved these changes
Sep 18, 2026
Collaborator
|
AAZ |
Qi Pan (Pan-Qi)
approved these changes
Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
Related command
Description
Due to quality issues in the spec, the pattern field frequently contains invalid regular expressions. This causes unnecessary validation failures on the client side.
This PR removes pattern validation from the client side to avoid rejecting specs with invalid regex patterns.
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.