Skip to content

Fix DryRun not loading deployment state from storage for hash comparison#476

Open
pardhasaradhireddy wants to merge 1 commit intoAzure-Player:masterfrom
cloud-cascade:fix/dryrun-ignore-hash-file
Open

Fix DryRun not loading deployment state from storage for hash comparison#476
pardhasaradhireddy wants to merge 1 commit intoAzure-Player:masterfrom
cloud-cascade:fix/dryrun-ignore-hash-file

Conversation

@pardhasaradhireddy
Copy link

When running Publish-AdfV2FromJson with -DryRun flag, the deployment state was not being loaded from Azure Storage, causing the hash comparison to run against an empty state. This resulted in all objects being marked as changed instead of only showing actual changes.

The Get-StateFromStorage call was inside the (!$DryRun.IsPresent) block, which skipped loading the state during dry runs. Moved the state loading outside this block so it executes for both DryRun and normal deployments.

This is a read-only operation and safe for DryRun mode. The Set-StateToStorage (write operation) still only executes after actual deployment, not during DryRun.

Fixes: DryRun showing all objects as changed when incremental deployment is enabled

When running Publish-AdfV2FromJson with -DryRun flag, the deployment state
was not being loaded from Azure Storage, causing the hash comparison to run
against an empty state. This resulted in all objects being marked as changed
instead of only showing actual changes.

The Get-StateFromStorage call was inside the (!$DryRun.IsPresent) block,
which skipped loading the state during dry runs. Moved the state loading
outside this block so it executes for both DryRun and normal deployments.

This is a read-only operation and safe for DryRun mode. The Set-StateToStorage
(write operation) still only executes after actual deployment, not during DryRun.

Fixes: DryRun showing all objects as changed when incremental deployment is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant