From 1206f2f32d23fe7cb600a8abe7a683d29617cec3 Mon Sep 17 00:00:00 2001 From: Torrey Trahanovsky <94412364+torreymicrosoft@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:16:34 -0700 Subject: [PATCH] [Resource] Amend what-if noise notice to point to Deployment Stacks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../azure/cli/command_modules/resource/_formatters.py | 5 ++--- .../resource/tests/latest/test_resource_formatters.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/resource/_formatters.py b/src/azure-cli/azure/cli/command_modules/resource/_formatters.py index ec431e9c2c4..f13538a4c3c 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/_formatters.py +++ b/src/azure-cli/azure/cli/command_modules/resource/_formatters.py @@ -109,9 +109,8 @@ def format_what_if_operation_result( def _format_noise_notice(builder): builder.append_line( - """Note: The result may contain false positive predictions (noise). -You can help us improve the accuracy of the result by opening an issue here: https://aka.ms/WhatIfIssues -NOTICE! - Want to get What-if without noise? Move to Deployment Stacks What-If https://aka.ms/stackswhatifGA""" + "Note: The result may contain false positive predictions (noise). " + "For what-if with noise reduction, consider Deployment Stacks (https://aka.ms/stackswhatifGA)" ) builder.append_line() diff --git a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_formatters.py b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_formatters.py index 01b280001ce..497c92b3834 100644 --- a/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_formatters.py +++ b/src/azure-cli/azure/cli/command_modules/resource/tests/latest/test_resource_formatters.py @@ -112,6 +112,16 @@ def test_complex_value(self): class TestFormatWhatIfOperationResult(unittest.TestCase): + def test_noise_notice(self): + expected = ( + "Note: The result may contain false positive predictions (noise). " + "For what-if with noise reduction, consider Deployment Stacks (https://aka.ms/stackswhatifGA)" + ) + + result = format_what_if_operation_result(WhatIfOperationResult(changes=[]), False) + + self.assertTrue(result.startswith(expected)) + def test_change_type_legend(self): changes = [ WhatIfChange(