Skip to content

[App Service] az webapp up: Deprecate support for the command - #34344

Merged
mansoor sarfraz (msarfraz) merged 5 commits into
Azure:devfrom
Shi1810:user/shikhajha/deprecatewebappup
Nov 6, 2026
Merged

mansoor sarfraz (msarfraz) merged 5 commits into
Azure:devfrom
Shi1810:user/shikhajha/deprecatewebappup

Conversation

@Shi1810

@Shi1810 Shi1810 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes Tests Suppressions
⚠️ None ️✔️ 130/130 ⚠️ 2 added
⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd webapp up cmd webapp up added parameter ids
⚠️ 1004 - CmdPropRemove webapp up cmd webapp up removed property deprecate_info_redirect
⚠️ 1010 - ParaPropUpdate webapp up cmd webapp up update parameter location: updated property type from custom_type to string
⚠️ 1009 - ParaPropRemove webapp up cmd webapp up update parameter name: removed property id_part=name

This PR adds warning or check suppressions. Fix the underlying warning where possible and justify each remaining suppression in a code comment or the PR description.

2 added suppressions
File Line Kind Code
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py 3651 skipped test @unittest.skip("az webapp up is no longer supported; deployment scenarios are retired.")
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_up_commands.py 25 skipped test @unittest.skip("az webapp up is no longer supported; deployment scenarios are retired.")

Related command
az webapp up

Description
Remove support for 'az webapp up' command, it is deprecated and no longer supported for Azure web apps.

Testing Guide
image

History Notes

[App Service] az webapp up: BREAKING CHANGE: Deprecate az webapp up command


This checklist is used to make sure that common guidelines for a pull request are followed.

Shikha Jha and others added 2 commits November 4, 2026 14:05
Block command execution before deployment, preserve the legacy implementation, and keep only global options visible in retirement help. Add regression coverage and retire obsolete deployment scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Nov 4, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

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

@x-engineering-agent
x-engineering-agent Bot requested a review from a team November 4, 2026 09:06
@Shi1810 Shi1810 changed the title User/shikhajha/deprecatewebappup [App Service] az webapp up : Deprecate support for the command Nov 4, 2026
@Shi1810
Shi1810 marked this pull request as ready for review November 4, 2026 09:34
Copilot AI balanced review requested due to automatic review settings November 4, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The location converter still contacts Azure before the retirement validator runs, so unauthenticated or offline users can receive login or network errors instead of the retirement message.

1 open issue
What changed in this PR

Retires az webapp up in the App Service module while keeping the command discoverable and directing users to webapp create and webapp deploy.

Changes:

  • Replaces deployment validation with a retirement error and removes native deprecation warnings.
  • Hides legacy arguments and replaces deployment help with retirement guidance.
  • Skips retired deployment scenarios and adds tests for rejection, help output, and replacement-command visibility.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​tests/​latest/​test_webapp_up_commands.py Skips retired end-to-end deployment scenarios.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​tests/​latest/​test_webapp_commands.py Skips the retired command’s enriched-error scenario.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​tests/​latest/​test_webapp_commands_thru_mock.py Adds retirement behavior and help regression tests.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​commands.py Registers the retirement validator without deprecation metadata.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​_validators.py Adds the retirement error and replacement guidance.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​_params.py Hides legacy arguments while retaining parsing support.
src/​azure-cli/​azure/​cli/​command_modules/​appservice/​_help.py Replaces deployment instructions with retirement guidance.

Review effort: Balanced

@Shi1810 Shi1810 changed the title [App Service] az webapp up : Deprecate support for the command [App Service] az webapp up: Deprecate support for the command Nov 4, 2026
@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

@naga-nandyala Naga Nandyala (naga-nandyala) added the Request X Engineering Agent Ask the agent to triage this issue or review this PR label Nov 5, 2026
@x-engineering-agent

x-engineering-agent Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

X Engineering Agent Pull request review: Comments

Shi1810 CI is green, and independent inspection confirmed no semantic code defect. Regression coverage for the retirement scenario remains unverified in the supplied evidence (needs_review); focused verification and owning-squad review are still required.

Check Status Detail
Upstream CI Passed 52/52 checks completed successfully.
Agent live tests Not run This is a review-only PR.
Regression coverage Unverified For appservice: 3 focused test file(s) changed.
Findings 1 medium findings 1 medium
Risk Risk 58/100 High High; owner review required

To address

Tick each item as you address it.

  • Medium Test semantic-strength reviewer

    Details and fix

    src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py:83: New scenario test has no recording in this PR: test_webapp_up_has_no_warning_metadata, test_webapp_up_does_not_emit_native_deprecation_warning_for_both_os_types, test_webapp_up_rejects_execution_before_clients_or_handler_are_called, test_webapp_up_help_explains_deprecation_and_migration_for_both_os_types, test_webapp_up_argument_hiding_does_not_affect_replacement_commands.

    Remediation: Run the test live and commit its recording, or mark it live only when it cannot be replayed.

    Verify: Confirm the test passes in playback mode from the committed recording.

    TestWebappUpRetirement inherits unittest.TestCase, not a recorded scenario class, and exercises actual CLI parsing/invocation through DummyCli. Lines 163-176 assert rejection before service access, including no handler, client, or location lookup calls. Recording Azure requests or marking these tests live-only would be inappropriate; no recording change is requested. Focused execution of this test class is the relevant verification.

    The Copilot location-converter concern is addressed by src/azure-cli/azure/cli/command_modules/appservice/_params.py:1126 (type=str), with display-name location regression assertions.

Review details

Upstream CI

52/52 checks completed successfully. This is upstream CI evidence, not an Agent live-test result.

Test validation

  • Agent live test: Not run; this is a review-only PR. Check author-provided test evidence and upstream CI separately.
  • Regression coverage: For appservice: 3 focused test file(s) changed. Scenario coverage is unverified; review the issue's required conditions, test setup, and assertions before approval. Changed tests invoke az webapp up, but invocation alone does not verify the required scenario or output. No linked issue was found in the PR timeline; inspect the source issue and its required scenario manually.

Focused validation: verify or rerun TestWebappUpRetirement in src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py. Static inspection found assertions for Windows/Linux, dry-run, conflicting legacy flags, display-name locations, resource-group aliases, multiple IDs, help, and replacement commands. Expected behavior is exit code 1 with the exact retirement error, empty output, and no handler, client, or location lookup calls. These assertions are meaningful, but inspection is not an independently executed test result.

Legacy deployment scenarios are intentionally skipped at src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:3651 and src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_up_commands.py:25. Those skips do not prove retirement behavior. No recording files changed and no uncovered module is reported.

Automated recording concern evaluated

The following deterministic finding was inspected and is not confirmed; its recording remediation is not applicable to this local rejection path.

Risk assessment

58/100 · High

The High rating is driven by security-sensitive behavior, public CLI behavior, failure-handling behavior.

  • Change scope: 7 changed files, 266 changed lines (+194 / -72), including 4 production files.
  • Affected components: appservice
  • Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18); failure-handling behavior (+12)
  • Regression evidence: Changed regression tests are included, reducing risk.
  • Confidence: High because changed-line patches were available for every production file.
  • Required review: Owning-squad review is required for appservice before merge.

Ask the Agent

Tick a box to queue an action. Requires write access to this repository.

  • Re-review this PR — @x-engineering-agent needs write access
  • Run Agent live tests on this PR

X Engineering Agent · Reviewer · React with +1 or -1 to train the agent

@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Agent reviewed this PR label Nov 5, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@msarfraz
mansoor sarfraz (msarfraz) merged commit 61f0df2 into Azure:dev Nov 6, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. Request X Engineering Agent Ask the agent to triage this issue or review this PR X Engineering Agent Reviewed Agent reviewed this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants