Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions tooling/templatize/pkg/pipeline/arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"errors"
"fmt"
"hash/crc32"
"maps"
"math/rand"
"net/http"
Expand Down Expand Up @@ -311,6 +310,7 @@ func doWaitForDeployment(ctx context.Context, bicepClient *bicep.LSPClient, clie
Properties: deploymentProperties,
ResourceGroup: rgName,
DeploymentLevel: step.DeploymentLevel,
RetryAttempt: retryAttempt,
}

digest, skip, commit, err := checkCachedOutput[ArmOutput](logger, inputs, stepCacheDir)
Expand All @@ -326,16 +326,6 @@ func doWaitForDeployment(ctx context.Context, bicepClient *bicep.LSPClient, clie
if digest != "" {
deploymentName = digest
}
// for retries, append retry attempt to deployment name so we can keep the previous failed deployment around for debugging purposes
if retryAttempt > 0 {
checksum := fmt.Sprintf("%08x", crc32.ChecksumIEEE([]byte(deploymentName)))
suffix := fmt.Sprintf("-r%d-%s", retryAttempt, checksum)
maxBaseLen := 64 - len(suffix)
if len(deploymentName) > maxBaseLen {
deploymentName = deploymentName[:maxBaseLen]
}
deploymentName += suffix
}

var output ArmOutput
var details DetailsProducer
Expand Down Expand Up @@ -443,6 +433,7 @@ type deploymentInputs struct {
Properties *armresources.DeploymentProperties
ResourceGroup string
DeploymentLevel string
RetryAttempt int
}

// computeResourceGroupTags determines the final tags for a resource group based on existing tags and persist settings.
Expand Down
Loading