[App Service] Fix config params: connection-string, pagination, slot ID, NFS protocol, domain validation#33067
[App Service] Fix config params: connection-string, pagination, slot ID, NFS protocol, domain validation#33067
Conversation
…tring replace, SSL cert list pagination, slot ID parsing Bug fixes: - Azure#30597: az webapp config connection-string set with JSON file now replaces the full set of connection strings instead of only merging. When settings are provided as JSON (e.g. --settings @file.json), existing connection strings not in the JSON are removed. Key=value format retains merge behavior. - Azure#29495: list_ssl_certs now wraps the SDK pager with list() to ensure full pagination, matching the pattern used by other list commands in the module. - Azure#26334: The slot parameter in the webapp argument context now includes id_part="child_name_1", so --ids with a slot resource ID (e.g. .../sites/myApp/slots/staging) correctly populates the slot argument instead of falling back to the production slot. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
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>
|
️✔️AzureCLI-FullTest
|
|
Hi @seligj95, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| functionapp config ssl create | cmd functionapp config ssl create added parameter domain_validation_method |
||
| webapp auth show | cmd webapp auth show update parameter slot: added property id_part=child_name_1 |
||
| webapp auth update | cmd webapp auth update update parameter slot: added property id_part=child_name_1 |
||
| webapp browse | cmd webapp browse update parameter slot: added property id_part=child_name_1 |
||
| webapp config access-restriction add | cmd webapp config access-restriction add update parameter slot: added property id_part=child_name_1 |
||
| webapp config access-restriction remove | cmd webapp config access-restriction remove update parameter slot: added property id_part=child_name_1 |
||
| webapp config access-restriction set | cmd webapp config access-restriction set update parameter slot: added property id_part=child_name_1 |
||
| webapp config access-restriction show | cmd webapp config access-restriction show update parameter slot: added property id_part=child_name_1 |
||
| webapp config appsettings delete | cmd webapp config appsettings delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config appsettings list | cmd webapp config appsettings list update parameter slot: added property id_part=child_name_1 |
||
| webapp config appsettings set | cmd webapp config appsettings set update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup create | cmd webapp config backup create update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup delete | cmd webapp config backup delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup list | cmd webapp config backup list update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup restore | cmd webapp config backup restore update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup show | cmd webapp config backup show update parameter slot: added property id_part=child_name_1 |
||
| webapp config backup update | cmd webapp config backup update update parameter slot: added property id_part=child_name_1 |
||
| webapp config connection-string delete | cmd webapp config connection-string delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config connection-string list | cmd webapp config connection-string list update parameter slot: added property id_part=child_name_1 |
||
| webapp config connection-string set | cmd webapp config connection-string set update parameter slot: added property id_part=child_name_1 |
||
| webapp config container delete | cmd webapp config container delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config container set | cmd webapp config container set update parameter slot: added property id_part=child_name_1 |
||
| webapp config container show | cmd webapp config container show update parameter slot: added property id_part=child_name_1 |
||
| webapp config hostname add | cmd webapp config hostname add update parameter slot: added property id_part=child_name_1 |
||
| webapp config hostname delete | cmd webapp config hostname delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config hostname list | cmd webapp config hostname list update parameter slot: added property id_part=child_name_1 |
||
| webapp config set | cmd webapp config set update parameter slot: added property id_part=child_name_1 |
||
| webapp config show | cmd webapp config show update parameter slot: added property id_part=child_name_1 |
||
| webapp config snapshot list | cmd webapp config snapshot list update parameter slot: added property id_part=child_name_1 |
||
| webapp config snapshot restore | cmd webapp config snapshot restore update parameter slot: added property id_part=child_name_1 |
||
| webapp config ssl bind | cmd webapp config ssl bind update parameter slot: added property id_part=child_name_1 |
||
| webapp config ssl create | cmd webapp config ssl create added parameter domain_validation_method |
||
| webapp config ssl create | cmd webapp config ssl create update parameter slot: added property id_part=child_name_1 |
||
| webapp config ssl unbind | cmd webapp config ssl unbind update parameter slot: added property id_part=child_name_1 |
||
| webapp config ssl upload | cmd webapp config ssl upload update parameter slot: added property id_part=child_name_1 |
||
| webapp config storage-account add | cmd webapp config storage-account add added parameter protocol |
||
| webapp config storage-account add | cmd webapp config storage-account add update parameter slot: added property id_part=child_name_1 |
||
| webapp config storage-account delete | cmd webapp config storage-account delete update parameter slot: added property id_part=child_name_1 |
||
| webapp config storage-account list | cmd webapp config storage-account list update parameter slot: added property id_part=child_name_1 |
||
| webapp config storage-account update | cmd webapp config storage-account update added parameter protocol |
||
| webapp config storage-account update | cmd webapp config storage-account update update parameter slot: added property id_part=child_name_1 |
||
| webapp cors add | cmd webapp cors add update parameter slot: added property id_part=child_name_1 |
||
| webapp cors remove | cmd webapp cors remove update parameter slot: added property id_part=child_name_1 |
||
| webapp cors show | cmd webapp cors show update parameter slot: added property id_part=child_name_1 |
||
| webapp create-remote-connection | cmd webapp create-remote-connection update parameter slot: added property id_part=child_name_1 |
||
| webapp delete | cmd webapp delete update parameter slot: added property id_part=child_name_1 |
||
| webapp deleted list | cmd webapp deleted list update parameter slot: added property id_part=child_name_1 |
||
| webapp deleted restore | cmd webapp deleted restore update parameter slot: added property id_part=child_name_1 |
||
| webapp deploy | cmd webapp deploy update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment container config | cmd webapp deployment container config update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment container show-cd-url | cmd webapp deployment container show-cd-url update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment github-actions add | cmd webapp deployment github-actions add update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment github-actions remove | cmd webapp deployment github-actions remove update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment list-publishing-credentials | cmd webapp deployment list-publishing-credentials update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment list-publishing-profiles | cmd webapp deployment list-publishing-profiles update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment slot auto-swap | cmd webapp deployment slot auto-swap update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment slot create | cmd webapp deployment slot create update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment slot delete | cmd webapp deployment slot delete update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment slot swap | cmd webapp deployment slot swap update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source config | cmd webapp deployment source config update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source config-local-git | cmd webapp deployment source config-local-git update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source config-zip | cmd webapp deployment source config-zip update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source delete | cmd webapp deployment source delete update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source show | cmd webapp deployment source show update parameter slot: added property id_part=child_name_1 |
||
| webapp deployment source sync | cmd webapp deployment source sync update parameter slot: added property id_part=child_name_1 |
||
| webapp hybrid-connection add | cmd webapp hybrid-connection add update parameter slot: added property id_part=child_name_1 |
||
| webapp hybrid-connection list | cmd webapp hybrid-connection list update parameter slot: added property id_part=child_name_1 |
||
| webapp hybrid-connection remove | cmd webapp hybrid-connection remove update parameter slot: added property id_part=child_name_1 |
||
| webapp identity assign | cmd webapp identity assign update parameter slot: added property id_part=child_name_1 |
||
| webapp identity remove | cmd webapp identity remove update parameter slot: added property id_part=child_name_1 |
||
| webapp identity show | cmd webapp identity show update parameter slot: added property id_part=child_name_1 |
||
| webapp list-instances | cmd webapp list-instances update parameter slot: added property id_part=child_name_1 |
||
| webapp log config | cmd webapp log config update parameter slot: added property id_part=child_name_1 |
||
| webapp log deployment list | cmd webapp log deployment list update parameter slot: added property id_part=child_name_1 |
||
| webapp log deployment show | cmd webapp log deployment show update parameter slot: added property id_part=child_name_1 |
||
| webapp log download | cmd webapp log download update parameter slot: added property id_part=child_name_1 |
||
| webapp log show | cmd webapp log show update parameter slot: added property id_part=child_name_1 |
||
| webapp log tail | cmd webapp log tail update parameter slot: added property id_part=child_name_1 |
||
| webapp restart | cmd webapp restart update parameter slot: added property id_part=child_name_1 |
||
| webapp show | cmd webapp show update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers convert | cmd webapp sitecontainers convert update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers create | cmd webapp sitecontainers create update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers delete | cmd webapp sitecontainers delete update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers list | cmd webapp sitecontainers list update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers log | cmd webapp sitecontainers log update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers show | cmd webapp sitecontainers show update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers status | cmd webapp sitecontainers status update parameter slot: added property id_part=child_name_1 |
||
| webapp sitecontainers update | cmd webapp sitecontainers update update parameter slot: added property id_part=child_name_1 |
||
| webapp ssh | cmd webapp ssh update parameter slot: added property id_part=child_name_1 |
||
| webapp start | cmd webapp start update parameter slot: added property id_part=child_name_1 |
||
| webapp stop | cmd webapp stop update parameter slot: added property id_part=child_name_1 |
||
| webapp update | cmd webapp update update parameter slot: added property id_part=child_name_1 |
||
| webapp vnet-integration add | cmd webapp vnet-integration add update parameter slot: added property id_part=child_name_1 |
||
| webapp vnet-integration list | cmd webapp vnet-integration list update parameter slot: added property id_part=child_name_1 |
||
| webapp vnet-integration remove | cmd webapp vnet-integration remove update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob continuous list | cmd webapp webjob continuous list update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob continuous remove | cmd webapp webjob continuous remove update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob continuous start | cmd webapp webjob continuous start update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob continuous stop | cmd webapp webjob continuous stop update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob triggered list | cmd webapp webjob triggered list update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob triggered log | cmd webapp webjob triggered log update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob triggered remove | cmd webapp webjob triggered remove update parameter slot: added property id_part=child_name_1 |
||
| webapp webjob triggered run | cmd webapp webjob triggered run update parameter slot: added property id_part=child_name_1 |
There was a problem hiding this comment.
Pull request overview
Fixes multiple App Service CLI behaviors in azure.cli.command_modules.appservice, primarily around connection-string bulk updates, SSL cert listing pagination, and --ids slot targeting.
Changes:
- Add
_is_json_settings()and use it inupdate_connection_stringsto provide replace-all semantics when--settingsis JSON. - Ensure
list_ssl_certsfully consumes the SDK pager by returning a concretelist. - Configure
webapp --slotto be populated from slot resource IDs by settingid_part='child_name_1', and add tests covering these scenarios.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appservice/custom.py |
Adds JSON detection helper, applies replace-all behavior for JSON connection-string updates, and consumes SSL cert pager. |
src/azure-cli/azure/cli/command_modules/appservice/_params.py |
Enables slot extraction from --ids by mapping slot to child_name_1. |
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py |
Adds unit tests for JSON detection, connection-string replace vs merge, SSL cert list pagination, and slot ID parsing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...zure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py
Outdated
Show resolved
Hide resolved
...zure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py
Outdated
Show resolved
Hide resolved
… and `--domain-validation-method` params Add --protocol (Smb/Nfs) parameter to `az webapp config storage-account add/update` to support NFS protocol for Azure Files storage mounts (fixes Azure#28836). Add --domain-validation-method parameter to `az webapp config ssl create` to support managed certificate creation for child DNS zones (fixes Azure#30100). Both parameters were already supported by the underlying SDK models but were not wired through the CLI commands. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add --validation-method as shorter alias for --domain-validation-method to satisfy option_length_too_long (HIGH severity) linter rule - Add missing_parameter_test_coverage exclusions for new params: domain_validation_method (webapp/functionapp config ssl create) protocol (webapp config storage-account add/update) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ger test assertions - Fix pylint R1735: use dict literal instead of dict() call (line 6009) - In replace_all mode, reconcile slot_cfg_names.connection_string_names to exactly match new slotSetting=true entries, removing stale names - Strengthen test_slot_param_configured_with_id_part to check that the slot argument specifically (not just any argument) has id_part - Fix TestListSslCertsPagination docstring: remove incorrect Issue Azure#29495 reference since that issue is about az webapp list, not SSL cert pagination Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consolidated PR
This PR consolidates fixes from #33063 into a single PR covering all 5 issues.
Issues Fixed
az webapp listdoesn't return the whole list of web apps #29495 — SSL cert list paginationaz webappand unexpected results when defining slot via id instead of param #26334 — Slot ID parsingChanges
--protocolparam for NFS storage mounts--domain-validation-methodparam for custom domain operations--validation-methodalias and linter exclusionsTesting
azdev style appservice— PASSEDazdev linter appservice— Pre-existing batch module error (unrelated)Fixes #30597
Fixes #29495
Fixes #26334
Fixes #28836
Fixes #30100