@@ -415,9 +415,11 @@ public void ClearBatchLogState()
415
415
private static string GetCromwellExecutionDirectoryPath ( TesTask task )
416
416
=> GetParentPath ( task . Inputs ? . FirstOrDefault ( IsCromwellCommandScript ) ? . Path . TrimStart ( '/' ) ) ;
417
417
418
- private static string GetStorageUploadPath ( TesTask task , string storageAccountName )
418
+ private string GetStorageUploadPath ( TesTask task )
419
419
{
420
- return $ "{ storageAccountName } /{ TesExecutionsPathPrefix . TrimStart ( '/' ) } /{ task . Id } ";
420
+ return task . Resources ? . ContainsBackendParameterValue ( TesResources . SupportedBackendParameters . internal_path_prefix ) ?? false
421
+ ? $ "{ defaultStorageAccountName } /{ task . Resources . GetBackendParameterValue ( TesResources . SupportedBackendParameters . internal_path_prefix ) . Trim ( '/' ) } "
422
+ : $ "{ defaultStorageAccountName } { TesExecutionsPathPrefix } /{ task . Id } ";
421
423
}
422
424
423
425
/// <summary>
@@ -971,7 +973,7 @@ private async Task<CloudTask> ConvertTesTaskToBatchTaskAsync(string taskId, TesT
971
973
// }
972
974
//}
973
975
974
- var storageUploadPath = GetStorageUploadPath ( task , defaultStorageAccountName ) ;
976
+ var storageUploadPath = GetStorageUploadPath ( task ) ;
975
977
var metricsName = "metrics.txt" ;
976
978
var metricsPath = $ "/{ storageUploadPath } /{ metricsName } ";
977
979
var metricsUrl = new Uri ( await storageAccessProvider . MapLocalPathToSasUrlAsync ( metricsPath , cancellationToken , getContainerSas : true ) ) ;
@@ -1235,7 +1237,7 @@ private async Task<TesInput> GetTesInputFileUrlAsync(TesInput inputFile, TesTask
1235
1237
1236
1238
if ( inputFile . Content is not null || IsCromwellCommandScript ( inputFile ) )
1237
1239
{
1238
- var storageFileName = $ "/{ GetStorageUploadPath ( task , defaultStorageAccountName ) } /{ Guid . NewGuid ( ) } ";
1240
+ var storageFileName = $ "/{ GetStorageUploadPath ( task ) } /{ Guid . NewGuid ( ) } ";
1239
1241
inputFileUrl = await storageAccessProvider . MapLocalPathToSasUrlAsync ( storageFileName , cancellationToken ) ;
1240
1242
1241
1243
var content = inputFile . Content ?? await storageAccessProvider . DownloadBlobAsync ( inputFile . Url , cancellationToken ) ;
@@ -1245,7 +1247,7 @@ private async Task<TesInput> GetTesInputFileUrlAsync(TesInput inputFile, TesTask
1245
1247
}
1246
1248
else if ( TryGetCromwellTmpFilePath ( inputFile . Url , out var localPath ) )
1247
1249
{
1248
- var storageFileName = $ "/{ GetStorageUploadPath ( task , defaultStorageAccountName ) } /{ Guid . NewGuid ( ) } ";
1250
+ var storageFileName = $ "/{ GetStorageUploadPath ( task ) } /{ Guid . NewGuid ( ) } ";
1249
1251
inputFileUrl = await storageAccessProvider . MapLocalPathToSasUrlAsync ( storageFileName , cancellationToken ) ;
1250
1252
await storageAccessProvider . UploadBlobFromFileAsync ( storageFileName , localPath , cancellationToken ) ;
1251
1253
}
@@ -1770,7 +1772,7 @@ static bool TryGetValueAsDouble(Dictionary<string, string> dict, string key, out
1770
1772
cromwellRcCode = temp ;
1771
1773
}
1772
1774
1773
- var metricsContent = await storageAccessProvider . DownloadBlobAsync ( $ "/{ GetStorageUploadPath ( tesTask , defaultStorageAccountName ) } /metrics.txt", cancellationToken ) ;
1775
+ var metricsContent = await storageAccessProvider . DownloadBlobAsync ( $ "/{ GetStorageUploadPath ( tesTask ) } /metrics.txt", cancellationToken ) ;
1774
1776
1775
1777
if ( metricsContent is not null )
1776
1778
{
0 commit comments