[Resource] Amend what-if noise notice to point to Deployment Stacks - #34002
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Alex Frankel (@alex-frankel) — this replaces the earlier PR you reviewed. Your feedback is implemented verbatim:
The standalone |
There was a problem hiding this comment.
Pull request overview
Updates the template-deployment what-if “noise” notice to use the agreed single-sentence wording that points users to Deployment Stacks for noise reduction, and adds regression coverage to lock the rendered notice text.
Changes:
- Replace the multi-line what-if noise notice with a single-sentence notice referencing Deployment Stacks.
- Add a unit test asserting the what-if formatted output starts with the exact notice string.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/resource/_formatters.py | Replaces the existing multi-line what-if noise notice with the new single-line wording. |
| src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_formatters.py | Adds a regression test that asserts the formatted output begins with the updated notice text. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
🤖 PR Validation — ️✔️ All clear
Related command
az deployment group what-if,az deployment sub what-if,az deployment mg what-if,az deployment tenant what-if(and the what-if preview shown by--confirm-with-what-if/-conaz deployment ... create).Description
Replaces #33952, which is now closed. This PR is branched from current
devand implements Alex Frankel (@alex-frankel)'s review feedback.Review feedback being addressed
Alex Frankel (@alex-frankel), on Azure/azure-powershell#30048 (
Resources.resx):That feedback was left on the Azure PowerShell PR, but it applies equally here — the two must stay in sync — so it is implemented identically in both.
What changed as a result:
NOTICE! - Want to get What-if without noise? Move to ...line, which was the part that read like an ad.Note:sentence in place instead of appending a new line, exactly as requested.https://aka.ms/WhatIfIssuesissue-filing line, so the notice is a single sentence with one next step.what-if.Before (current
dev)After
Test coverage
The CI agent on #33952 flagged the absence of regression coverage as the one actionable item before merge. This PR adds
TestFormatWhatIfOperationResult.test_noise_noticeintests/latest/test_resource_formatters.py, asserting the rendered what-if output begins with the exact notice string.Verified locally that the assertion holds and that the pre-existing
test_resource_changes_statsendswith(...)assertion is unaffected, since the notice is emitted at the top of the output.Scope / risk
_format_noise_noticeinsrc/azure-cli/azure/cli/command_modules/resource/_formatters.py, reached solely throughformat_what_if_operation_resultfor template deployment what-if.DeploymentStacksWhatIfResultFormatterin_stacks_formatters.pyand is not touched, so customers already on stacks are not told to move to stacks.https://aka.ms/WhatIfIssuesnow has no remaining references undersrc/.pylintrc/.flake8; the rendered output is a single line.