File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
eng/common/core-templates/steps Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,16 @@ steps:
31
31
# Calculate the expiration of the SAS token and convert to UTC
32
32
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
33
33
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)
35
44
36
45
if ($LASTEXITCODE -ne 0) {
37
46
Write-Error "Failed to generate SAS token."
You can’t perform that action at this time.
0 commit comments