Skip to content

{AAZ} Remove client-side pattern validation - #34096

Open
Ethan Yang (necusjz) wants to merge 3 commits into
Azure:devfrom
necusjz:remove-pattern-check
Open

Ethan Yang (necusjz) wants to merge 3 commits into
Azure:devfrom
necusjz:remove-pattern-check

Conversation

@necusjz

@necusjz Ethan Yang (necusjz) commented Sep 18, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

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 feature


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

@necusjz Ethan Yang (necusjz) self-assigned this Sep 18, 2026
@necusjz
Ethan Yang (necusjz) requested a review from a team as a code owner September 18, 2026 02:38
Copilot AI lite review requested due to automatic review settings September 18, 2026 02:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 AAZStrArgFormat runtime fullmatch validation 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.

Comment thread src/azure-cli-core/azure/cli/core/aaz/_arg_fmt.py
@yonzhan

Copy link
Copy Markdown
Collaborator

AAZ

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.

4 participants