File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,16 @@ steps:
28
28
# Calculate the expiration of the SAS token and convert to UTC
29
29
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
30
30
31
- $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
31
+ # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
32
+ # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484
33
+ $sas = ""
34
+ do {
35
+ $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
36
+ if ($LASTEXITCODE -ne 0) {
37
+ Write-Error "Failed to generate SAS token."
38
+ exit 1
39
+ }
40
+ } while($sas.IndexOf('/') -ne -1)
32
41
33
42
if ($LASTEXITCODE -ne 0) {
34
43
Write-Error "Failed to generate SAS token."
Original file line number Diff line number Diff line change @@ -28,7 +28,16 @@ steps:
28
28
# Calculate the expiration of the SAS token and convert to UTC
29
29
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
30
30
31
- $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
31
+ # Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
32
+ # of correlation payloads. https://github.com/dotnet/dnceng/issues/3484
33
+ $sas = ""
34
+ do {
35
+ $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
36
+ if ($LASTEXITCODE -ne 0) {
37
+ Write-Error "Failed to generate SAS token."
38
+ exit 1
39
+ }
40
+ } while($sas.IndexOf('/') -ne -1)
32
41
33
42
if ($LASTEXITCODE -ne 0) {
34
43
Write-Error "Failed to generate SAS token."
You can’t perform that action at this time.
0 commit comments