Skip to content

Commit ad8b3ad

Browse files
authored
Merge pull request #8466 from dotnet/merge/release/9.0.2xx-to-main
[automated] Merge branch 'release/9.0.2xx' => 'main'
2 parents 54b4548 + cf61b12 commit ad8b3ad

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

eng/common/core-templates/steps/get-delegation-sas.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,16 @@ steps:
3131
# Calculate the expiration of the SAS token and convert to UTC
3232
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
3333
34-
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
34+
# Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
35+
# of correlation payloads. https://github.com/dotnet/dnceng/issues/3484
36+
$sas = ""
37+
do {
38+
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
39+
if ($LASTEXITCODE -ne 0) {
40+
Write-Error "Failed to generate SAS token."
41+
exit 1
42+
}
43+
} while($sas.IndexOf('/') -ne -1)
3544
3645
if ($LASTEXITCODE -ne 0) {
3746
Write-Error "Failed to generate SAS token."

0 commit comments

Comments
 (0)