[Appservice] fix: az webapp config set --generic-configurations silently ignores camelCase properties like webJobsEnabled - #33826
[Appservice] fix: az webapp config set --generic-configurations silently ignores camelCase properties like webJobsEnabled#33826Aditya Pujara (a0x1ab) with Copilot wants to merge 5 commits into
az webapp config set --generic-configurations silently ignores camelCase properties like webJobsEnabled#33826Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
webapp |
…amelCase properties like webJobsEnabled
az webapp config set --generic-configurations silently ignores camelCase properties like webJobsEnabled
Live test results —
|
|
Copilot the automated CI and live-test review on this PR found failures. Please look into the requested changes here: #33826 (review) and push a fix. Posted by agent-assist (autonomous bug-fix pipeline). |
There was a problem hiding this comment.
Automated CI Review — Changes Requested
Live-test result: success (azdev --live passed for the changed test files).
However, CI has a failing check that must be fixed:
- Check CLI Style — failed (
Azure.azure-cli (Check CLI Style)), 1 error reported.
See the Azure DevOps build log: https://dev.azure.com/azclitools/5147fa83-336e-44ef-bbe0-c86b8ae86cbb/_build/results?buildId=334415
The style checker's underlying process exited with a non-zero code (Bash exit code 4),
indicating a code-style violation (e.g. pylint/flake8/black style issue) introduced by
this PR's changes. Please run the CLI style checks locally (e.g.azdev style/
python scripts/ci/test_source.pyper repo tooling) and fix any reported issues, then
push a new commit.
Remaining checks (8) were still pending/in-progress at review time and will be
re-evaluated automatically once you push a fix.
Posted by agent-assist (autonomous bug-fix pipeline).
Fixed in commit Root cause: When I replaced Fix: Removed |
Live test results —
|
There was a problem hiding this comment.
Automated Review Summary — PASS ✅
- CI checks: 18/18 passed, 0 failed, 0 pending.
- Live test (Tester): completed successfully (
azdev testrun against the changed test files for this PR).
No outstanding issues detected. Marking this PR as ready for human review.
Posted by agent-assist (autonomous bug-fix pipeline).
|
Copilot please review and implement all unaddressed human feedback through Jordan Selig (@seligj95)'s latest comment at #33826 (comment), then push the fix to this PR. Human review feedback to implement: I ran the PR source against a Linux App Service in Demo Three Subscription. Starting with ''' text The PR's debug PATCH explains why. It sends the new value at the resource root while the existing value remains under ''' json Azure ignores the root-level field and returns Please ensure both Posted by agent-assist (autonomous bug-fix pipeline). |
There was a problem hiding this comment.
Copilot finished without pushing a fix after 3 automated attempts for the feedback at #33826 (comment). Leaving this PR for manual follow-up.
Posted by agent-assist (autonomous bug-fix pipeline).
|
Copilot Retested this PR again in Demo Three Subscription, but the branch head is still unchanged at Current-head live results: Both commands still exit 0 while ARM remains The existing tests still only verify
|
|
Started a Copilot task using Posted by agent-assist (autonomous bug-fix pipeline). |
…nfig, coerce bool strings Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Fixed in commit Root cause: Changes:
|
Live test results —
|
Live test results —
|
|
Approved from my side. I retested head |
There was a problem hiding this comment.
Automated Review Summary
Live test: ✅ Passed (azdev test run via live-test.yml)
CI checks: ✅ All 20 checks passed (0 failed, 0 pending)
This PR fixes #33823: az webapp config set --generic-configurations silently ignoring camelCase properties like webJobsEnabled. Both the automated live test and the full CI check suite completed successfully with no failures. No further action needed from the automated pipeline at this time — ready for human maintainer review/merge.
Posted by agent-assist (autonomous bug-fix pipeline).
|
Started a Copilot task using Posted by agent-assist (autonomous bug-fix pipeline). |
|
Started a Copilot task using Posted by agent-assist (autonomous bug-fix pipeline). |
|
Started a Copilot task using Posted by agent-assist (autonomous bug-fix pipeline). |
There was a problem hiding this comment.
Copilot finished without pushing a fix after 3 automated attempts for the feedback at #33826 (comment). Leaving this PR for manual follow-up.
Posted by agent-assist (autonomous bug-fix pipeline).
|
🔔 Routing this PR to @Azure/act-identity-squad. |
|
🔔 Routing this PR to @Azure/act-observability-squad. |
az webapp config set --generic-configurations 'webJobsEnabled=false'exits 0 but never persists the value. Same silent failure occurs with JSON file input. The property is valid in the ARM API but was dropped before reaching the wire.Root causes (two interacting bugs in
update_site_configs)get_json_object()converts all camelCase JSON keys to snake_case.{"webJobsEnabled": false}→{'web_jobs_enabled': False}. Sinceweb_jobs_enabledis not a named property in the azure-mgmt-web 11.0.0 SDK model, the subsequentsetattris silently ignored.setattr(configs, 'webJobsEnabled', value)creates a Python instance attribute, not an entry in the underlyingMutableMappingdict. In azure-mgmt-web 11.0.0+,SiteConfigis aMutableMapping— the SDK serializes dict keys to the API body, not arbitrary Python attributes.Fix
get_json_object(s)withshell_safe_json_parse(s)to preserve camelCase keys from JSON input.configs[config_name] = valueinstead ofsetattr. Snake_case names continue usingsetattrso the SDK's property aliases correctly translate them (e.g.request_tracing_enabled→requestTracingEnabled).ipSecurityRestrictionsdetection to recognize the camelCase form in addition toip_security_restrictions.Testing Guide
Unit tests added in
test_webapp_commands_thru_mock.pycovering bothkey=valueand JSON input forms.History Notes
[Appservice]
az webapp config set: Fix--generic-configurationssilently dropping camelCase site config properties (e.g.webJobsEnabled)This 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.