{App Service} az functionapp function keys list: Fix returning null values with azure-mgmt-web 11.0.0 - #33504
Merged
Julie Zhu (yanzhudd) merged 1 commit intoJun 12, 2026
Conversation
…alues with azure-mgmt-web 11.0.0
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
microsoft-github-policy-service
Bot
requested review from
Yong Zhang (yonzhan) and
Xing Zhou (zhoxing-ms)
June 5, 2026 23:24
Collaborator
|
App Service |
Chandni Patel (patelchandni)
approved these changes
Jun 9, 2026
Harshitha Vegaraju (harshivcodes)
marked this pull request as ready for review
June 11, 2026 17:11
Harshitha Vegaraju (harshivcodes)
requested review from
NoriZC,
Teresa Ritorto (teresaritorto) and
Julie Zhu (yanzhudd)
as code owners
June 11, 2026 17:11
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR addresses an Azure SDK deserialization quirk when listing Function App function keys, ensuring the CLI returns the expected key/value dictionary even when the SDK populates .properties = None.
Changes:
- Update
list_function_keysto fall back to the raw response when.propertiesisNone. - Add tests covering both the “broken” flat-dictionary SDK response and the “fixed/enveloped”
.propertiesresponse.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/appservice/custom.py | Adds fallback behavior in list_function_keys when .properties is missing/None. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands_thru_mock.py | Adds regression tests to validate the fallback and the normal .properties behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az functionapp function keys list returning null values with azure-mgmt-web 11.0.0az functionapp function keys list: Fix returning null values with azure-mgmt-web 11.0.0
Julie Zhu (yanzhudd)
approved these changes
Jun 12, 2026
Closed
Contributor
|
This PR fixes issue: #33516 |
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.
Related command
az functionapp function keys listDescription
az functionapp function keys listreturns all-null fields (id,kind,name,properties,type) after theazure-mgmt-web9.0.0 → 11.0.0 upgrade in #33341.Root Cause
azure-mgmt-web 11.0.0regeneratedStringDictionarywith typespec-python. The new model sets__flattened_items = [""], which fails to lift flat-at-root ARM responses (e.g.{"default": "<key>"}) into.properties. The raw payload is preserved in the model'sMutableMappingbacking store but.propertiesreturnsNone.Fix
In
list_function_keys, fall back todict(keys)whenkeys.properties is None. This is forward-compatible — if a future SDK release populates.propertiescorrectly, that path is used instead.Testing Guide
test_functionapp_commands_thru_mock.pyThis 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.