Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @Ptnan7, |
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds the generated AAZ (Azure Auto-Generated) command surface and supporting plumbing for the CDN/AFD extension, enabling management operations to move from the Azure CLI core module into this extension.
Changes:
- Introduces AAZ-generated command groups and commands for
az afd(profile/endpoint/origin/origin-group/route/custom-domain/log-analytic/rule). - Adds extension-side client factories, validators, and argparse actions previously handled in core.
- Adds extension documentation and initial changelog entries.
Reviewed changes
Copilot reviewed 88 out of 253 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cdn/azext_cdn/aaz/init.py | Adds package marker for AAZ command package. |
| src/cdn/azext_cdn/aaz/latest/init.py | Adds package marker for latest AAZ commands. |
| src/cdn/azext_cdn/aaz/latest/afd/init.py | Exposes AFD AAZ command group package. |
| src/cdn/azext_cdn/aaz/latest/afd/__cmd_group.py | Registers root az afd command group. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/init.py | Exposes az afd custom-domain command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/__cmd_group.py | Registers az afd custom-domain command group. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/_delete.py | Adds AAZ implementation for az afd custom-domain delete. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/_list.py | Adds AAZ implementation for az afd custom-domain list (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/_regenerate_validation_token.py | Adds AAZ implementation for az afd custom-domain regenerate-validation-token. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/_show.py | Adds AAZ implementation for az afd custom-domain show. |
| src/cdn/azext_cdn/aaz/latest/afd/custom_domain/_wait.py | Adds AAZ implementation for az afd custom-domain wait. |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/init.py | Exposes az afd endpoint command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/__cmd_group.py | Registers az afd endpoint command group. |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/_delete.py | Adds AAZ implementation for az afd endpoint delete. |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/_list.py | Adds AAZ implementation for az afd endpoint list (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/_purge.py | Adds AAZ implementation for az afd endpoint purge (LRO). |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/_show.py | Adds AAZ implementation for az afd endpoint show. |
| src/cdn/azext_cdn/aaz/latest/afd/endpoint/_wait.py | Adds AAZ implementation for az afd endpoint wait. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/init.py | Exposes az afd log-analytic command group. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/__cmd_group.py | Registers az afd log-analytic command group. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/location/init.py | Exposes az afd log-analytic location subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/location/__cmd_group.py | Registers az afd log-analytic location subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/location/_list.py | Adds az afd log-analytic location list. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/metric/init.py | Exposes az afd log-analytic metric subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/metric/__cmd_group.py | Registers az afd log-analytic metric subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/metric/_list.py | Adds az afd log-analytic metric list. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/ranking/init.py | Exposes az afd log-analytic ranking subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/ranking/__cmd_group.py | Registers az afd log-analytic ranking subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/ranking/_list.py | Adds az afd log-analytic ranking list. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/resource/init.py | Exposes az afd log-analytic resource subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/resource/__cmd_group.py | Registers az afd log-analytic resource subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/log_analytic/resource/_list.py | Adds az afd log-analytic resource list. |
| src/cdn/azext_cdn/aaz/latest/afd/origin/init.py | Exposes az afd origin command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/origin/__cmd_group.py | Registers az afd origin command group. |
| src/cdn/azext_cdn/aaz/latest/afd/origin/_delete.py | Adds AAZ implementation for az afd origin delete. |
| src/cdn/azext_cdn/aaz/latest/afd/origin/_list.py | Adds AAZ implementation for az afd origin list (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/origin/_show.py | Adds AAZ implementation for az afd origin show. |
| src/cdn/azext_cdn/aaz/latest/afd/origin/_wait.py | Adds AAZ implementation for az afd origin wait. |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/init.py | Exposes az afd origin-group command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/__cmd_group.py | Registers az afd origin-group command group. |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/_delete.py | Adds AAZ implementation for az afd origin-group delete. |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/_list.py | Adds AAZ implementation for az afd origin-group list (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/_show.py | Adds AAZ implementation for az afd origin-group show. |
| src/cdn/azext_cdn/aaz/latest/afd/origin_group/_wait.py | Adds AAZ implementation for az afd origin-group wait. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/init.py | Exposes az afd profile command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/__cmd_group.py | Registers az afd profile command group. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/_delete.py | Adds AAZ implementation for az afd profile delete. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/_show.py | Adds AAZ implementation for az afd profile show. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/_usage.py | Adds AAZ implementation for az afd profile usage (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/profile/_wait.py | Adds AAZ implementation for az afd profile wait. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/identity/init.py | Exposes az afd profile identity subgroup and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/identity/__cmd_group.py | Registers az afd profile identity subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/identity/_wait.py | Adds AAZ implementation for az afd profile identity wait. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/log_scrubbing/init.py | Exposes az afd profile log-scrubbing subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/profile/log_scrubbing/__cmd_group.py | Registers az afd profile log-scrubbing subgroup. |
| src/cdn/azext_cdn/aaz/latest/afd/route/init.py | Exposes az afd route command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/route/__cmd_group.py | Registers az afd route command group. |
| src/cdn/azext_cdn/aaz/latest/afd/route/_delete.py | Adds AAZ implementation for az afd route delete. |
| src/cdn/azext_cdn/aaz/latest/afd/route/_list.py | Adds AAZ implementation for az afd route list (+ paging). |
| src/cdn/azext_cdn/aaz/latest/afd/route/_show.py | Adds AAZ implementation for az afd route show. |
| src/cdn/azext_cdn/aaz/latest/afd/route/_wait.py | Adds AAZ implementation for az afd route wait. |
| src/cdn/azext_cdn/aaz/latest/afd/rule/init.py | Exposes az afd rule command group and commands. |
| src/cdn/azext_cdn/aaz/latest/afd/rule/__cmd_group.py | Registers az afd rule command group. |
| src/cdn/azext_cdn/_actions.py | Adds custom argparse action for origin parsing. |
| src/cdn/azext_cdn/_client_factory.py | Adds mgmt client factory functions for extension commands. |
| src/cdn/azext_cdn/_validators.py | Adds origin validation helper for CLI args. |
| src/cdn/azext_cdn/init.py | Wires extension command loader + AAZ command table loading. |
| src/cdn/README.md | Adds extension-level README describing command groups. |
| src/cdn/HISTORY.rst | Adds initial release history entry for the extension. |
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
|
|
||
| def cf_cdn(cli_ctx, *kwargs): # pylint: disable=unused-argument |
There was a problem hiding this comment.
The cf_cdn factory is using *kwargs instead of **kwargs. This breaks the conventional client-factory signature (callers passing keyword arguments will raise a TypeError). Change the parameter to **kwargs (or **_ if intentionally unused).
| def cf_cdn(cli_ctx, *kwargs): # pylint: disable=unused-argument | |
| def cf_cdn(cli_ctx, **kwargs): # pylint: disable=unused-argument |
| msg = "{0} port for origin named {1} is outside of range (1 - 65535)." | ||
| for idx, origin in enumerate(namespace.origins): | ||
| origin.name = "{}-{}".format(origin.name, idx) | ||
| check_port_range(origin.http_port, msg.format('HTTP', origin.name)) | ||
| check_port_range(origin.https_port, msg.format('HTTPS', origin.name)) |
There was a problem hiding this comment.
The error message formatting currently drops the actual invalid port value: msg is fully formatted before being passed into check_port_range, so msg.format(port) has no placeholder left to fill. Consider either (a) passing an unformatted template into check_port_range and formatting it once with port included, or (b) removing .format(port) and incorporating the port into the message before calling check_port_range.
| msg = "{0} port for origin named {1} is outside of range (1 - 65535)." | |
| for idx, origin in enumerate(namespace.origins): | |
| origin.name = "{}-{}".format(origin.name, idx) | |
| check_port_range(origin.http_port, msg.format('HTTP', origin.name)) | |
| check_port_range(origin.https_port, msg.format('HTTPS', origin.name)) | |
| msg = "{0} port for origin named {1} with value {2} is outside of range (1 - 65535)." | |
| for idx, origin in enumerate(namespace.origins): | |
| origin.name = "{}-{}".format(origin.name, idx) | |
| check_port_range(origin.http_port, msg.format('HTTP', origin.name, '{0}')) | |
| check_port_range(origin.https_port, msg.format('HTTPS', origin.name, '{0}')) |
| """Delete an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. | ||
|
|
||
| :example: Delete an AFD profile. | ||
| az profile delete -g group --profile-name profile |
There was a problem hiding this comment.
The example command appears to be incorrect for this command group: az profile delete should be az afd profile delete (and the docstring has a double space in 'existing Azure'). Updating the example avoids misleading users and aligns with the registered command name.
| """Delete an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. | |
| :example: Delete an AFD profile. | |
| az profile delete -g group --profile-name profile | |
| """Delete an existing Azure Front Door Standard or Azure Front Door Premium or CDN profile with the specified parameters. Deleting a profile will result in the deletion of all of the sub-resources including endpoints, origins and custom domains. | |
| :example: Delete an AFD profile. | |
| az afd profile delete -g group --profile-name profile |
| "afd route list", | ||
| ) | ||
| class List(AAZCommand): | ||
| """List all of the existing origins within a profile. |
There was a problem hiding this comment.
This is the implementation for az afd route list, but the docstring says it lists 'origins'. This should describe listing routes under an AFD endpoint to avoid confusing users reading az afd route list -h.
| """List all of the existing origins within a profile. | |
| """List all of the existing routes under an AFD endpoint. |
|
|
||
| @property | ||
| def method(self): | ||
| return "POST" |
There was a problem hiding this comment.
The usages endpoint for ARM resource usage is a read operation; this command is modeled as POST. If the service endpoint is /usages, it should be GET to match ARM semantics and avoid 405/operation failures.
| return "POST" | |
| return "GET" |
| _args_schema = cls._args_schema | ||
| _args_schema.profile_name = AAZStrArg( | ||
| options=["--profile-name"], | ||
| help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", |
There was a problem hiding this comment.
The help text contains a duplicated fragment ('which is unique within the resource group. which is unique within the resource group.'). Remove the repetition to improve CLI help readability.
| help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. which is unique within the resource group.", | |
| help="Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group.", |
| """Updates the domain validation token. | ||
|
|
||
| :example: Regenerate the domain validation token. | ||
| az afd custom-domain regenerate-validation-token -g MyResourceGroup --profile-name MyProfle --custom-domain-name MyCustomDomain |
There was a problem hiding this comment.
Typo in the example: 'MyProfle' should be 'MyProfile' to avoid copy/paste errors.
| az afd custom-domain regenerate-validation-token -g MyResourceGroup --profile-name MyProfle --custom-domain-name MyCustomDomain | |
| az afd custom-domain regenerate-validation-token -g MyResourceGroup --profile-name MyProfile --custom-domain-name MyCustomDomain |
|
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>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: 2 pipeline(s) require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.