Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 7 forks source link

Progress on resources deployed is missing #45

Closed slavizh closed 2 years ago

slavizh commented 2 years ago

Describe the bug I am deploying budget for cost management but the progress of the resource deployed is missing. It does not show even Microsoft.Resources/deployments progress.

To Reproduce

PS C:\Users\stas\Downloads\AzDeploymentStacksPrivatePreview_Powershell\AzDeploymentStacksPrivatePreview> New-AzSubscriptionDeploymentStack -Name lz-cost-management -Location 'West Europe' -TemplateFile D:\dev\deployment-stacks\lz-cost-management\main.json -TemplateParameterFile D:\dev\deployment-stacks\lz-cost-management\main.parameters.json -Verbose -Force -UpdateBehavior purgeResources
VERBOSE: Performing the operation "Create" on target "lz-cost-management".
VERBOSE: 9:12:47 - Checking stack deployment status
VERBOSE: 9:12:52 - Checking stack deployment status
VERBOSE: 9:12:57 - Checking stack deployment status
VERBOSE: 9:13:03 - Checking stack deployment status
VERBOSE: 9:13:08 - Checking stack deployment status
VERBOSE: 9:13:13 - Checking stack deployment status
VERBOSE: 9:13:18 - Checking stack deployment status
VERBOSE: 9:13:23 - Checking stack deployment status
VERBOSE: 9:13:29 - Checking stack deployment status
VERBOSE: 9:13:34 - Checking stack deployment status

Id                : /subscriptions/<>/providers/Microsoft.Resources/deploymentStacks/lz-cost-management
Name              : lz-cost-management
ProvisioningState : succeeded
UpdateBehavior    : purgeResources
Location          : westeurope
CreationTime(UTC) : 1.12.2021 г. 9:23:12
ManagedResources  : /subscriptions/<>/providers/Microsoft.Consumption/budgets/PERF-ASSET-CLOUD-Sentia
DeploymentId      : /subscriptions/<>/providers/Microsoft.Resources/deployments/lz-cost-management-2021-12-06-07-12-48-50dc2
SnapshotId        : /subscriptions/<>/providers/Microsoft.Resources/deploymentStacks/lz-cost-management/snapshots/2021-12-06-07-12-48-50dc2

Expected behavior To show like this:

\lz-cost-management\main.json -TemplateParameterFile D:\dev\deployment-stacks\lz-cost-management\main.parameters.json -Verbose
VERBOSE:
VERBOSE: 9:20:56 - Template is valid.
VERBOSE: 9:20:57 - Create template deployment 'lz-cost-management'
VERBOSE: 9:20:57 - Checking deployment status in 5 seconds
VERBOSE: 9:21:03 - Resource Microsoft.Resources/deployments 'lz-policy-management' provisioning status is running
VERBOSE: 9:21:03 - Checking deployment status in 13 seconds
VERBOSE: 9:21:16 - Resource Microsoft.Resources/deployments 'budget-0' provisioning status is running
VERBOSE: 9:21:16 - Resource Microsoft.Consumption/budgets 'PERF-ASSET-CLOUD-Sentia' provisioning status is succeeded
VERBOSE: 9:21:17 - Checking deployment status in 15 seconds
VERBOSE: 9:21:32 - Resource Microsoft.Resources/deployments 'lz-policy-management' provisioning status is succeeded
VERBOSE: 9:21:32 - Resource Microsoft.Resources/deployments 'budget-0' provisioning status is succeeded

Repro Environment Host OS: Windows 11 Powershell Version: PowerShell 7.2

Server Debugging Information Correlation ID: c3935ce9-effe-46d4-a7e4-fb4b1165f527 Tenant ID: Timestamp of issue (please include time zone): - 2021-12-06T07:23:31.2117237Z - UTC Data Center (eg, West Central US, West Europe): West Europe

alex-frankel commented 2 years ago

Is this different than #20?

slavizh commented 2 years ago

@alex-frankel no, but I thought with the last release #20 was addressed but may be I have understood the notes differently.

Xynoclafe commented 2 years ago

@alex-frankel My takeaways from #20 and his have been slightly different. The fix addressed for #20 was for the fact that when stack deployments were running, verbose logs (and even debug logs for that matter) were not being printed at all when -verbose (or -debug) were passed, and with no progress of any kind shown on the shell, it could seem like it was not responding. That shouldn't be the case anymore. This issue I see more as regarding the contents of the logs being printed and to have deployment status in the verbose logs as is the case with deployments cmdlets. I will be working on this. @slavizh please let me know if I have missed anything in my read of this issue.

slavizh commented 2 years ago

@Xynoclafe yes. I have provided more info around the whole deployment stacks cmdlet experience and what should be on par with deployment cmdlets in #46

bmoore-msft commented 2 years ago

going to remove this one as I think we have it covered between #20 and #46