Skip to content

{AFD} Fix Issue 31584: make location parameter as unrequired.#31588

Merged
necusjz merged 8 commits into
Azure:devfrom
Ptnan7:issue-31584
Jun 4, 2025
Merged

{AFD} Fix Issue 31584: make location parameter as unrequired.#31588
necusjz merged 8 commits into
Azure:devfrom
Ptnan7:issue-31584

Conversation

@Ptnan7
Copy link
Copy Markdown
Member

@Ptnan7 Ptnan7 commented Jun 2, 2025

Copilot AI review requested due to automatic review settings June 2, 2025 03:25
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Jun 2, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 2, 2025

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

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Jun 2, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️cdn
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd afd profile identity sub group afd profile identity added
⚠️ 1008 - ParaPropAdd cdn endpoint update cmd cdn endpoint update update parameter query_string_caching_behavior: added property aaz_default=None

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2025

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>

Copy link
Copy Markdown
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 fixes Issue 31584 by making the location parameter optional for AFD commands and updates the API version strings from "2024-09-01" to "2025-04-15" across multiple commands. Additionally, it refactors some internal conditional logic and renames inner classes within the listing operations.

Reviewed Changes

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

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/cdn/custom/custom_afdx.py Sets location parameter as unrequired.
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/log_scrubbing/_show.py Updates API version in command info and query parameters.
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/_wait.py Introduces new Wait command for profile identity.
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/_show.py Updates API version and adds subresource selector logic.
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/init.py
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/identity/__cmd_group.py
Adds/imports module definitions.
src/azure-cli/azure/cli/command_modules/cdn/aaz/latest/afd/profile/_wait.py,
_update.py,
_show.py,
_list.py,
_delete.py,
_create.py
Updates API versions and adjusts the command execution/argument logic.

Comment on lines +55 to +58
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
if condition_0:
self.ProfilesList(ctx=self.ctx)()
if condition_1:
self.ProfilesListByResourceGroup(ctx=self.ctx)()
if condition_1:
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

The updated conditional logic in the ProfilesList operation appears to be inverted; please verify that the conditions correctly differentiate between listing by subscription and by resource group.

Copilot uses AI. Check for mistakes.
return result, next_link

class ProfilesList(AAZHttpOperation):
class ProfilesListByResourceGroup(AAZHttpOperation):
Copy link

Copilot AI Jun 2, 2025

Choose a reason for hiding this comment

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

The renaming of the inner classes (ProfilesList and ProfilesListByResourceGroup) appears to be swapped; please ensure that the class names correctly represent their intended functionality.

Suggested change
class ProfilesListByResourceGroup(AAZHttpOperation):
class ProfilesList(AAZHttpOperation):

Copilot uses AI. Check for mistakes.
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Jun 2, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Jun 4, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@necusjz necusjz merged commit d3c6234 into Azure:dev Jun 4, 2025
49 checks passed
@Ptnan7 Ptnan7 deleted the issue-31584 branch June 6, 2025 00:22
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