-
Notifications
You must be signed in to change notification settings - Fork 49
addTask sets default expiry time in SAS token too short for long running jobs #363
Description
When adding a task, the creation of the upload token for the standard job files like the file 1.txt containing the log of task 1 ignores if the user maybe has set a longer expiry time for their output files.
In my case I have long running tasks and changed the following line from the documentation example
| writeToken <- storageClient$generateSasToken("w", "c", outputFolder) |
to
# make token expire 20 days after creation
writeToken <- storageClient$generateSasToken("w", "c", outputFolder, end = Sys.time() + 60 * 60 * 24 * 20) So the SAS token for my output files now has the se parameter in the URI like this:
[...]&se=2019-08-18T11%3A11%3A48Z&[...]
while in the URI for 1.txt it looks like this:
[...]&se=2019-07-31T11%3A11%3A59Z&[...]
so my own upload gets ignored because the task crashes with a FileUploadAccessDenied Error for the 1.txt before my upload is run.
I am not sure if this is definied here
Line 79 in 96bfc22
| sasToken = storageClient$generateSasToken("w", "c", jobId), |
or here
doAzureParallel/R/doAzureParallel.R
Lines 560 to 566 in 96bfc22
| outputContainerUrl <- | |
| rAzureBatch::createBlobUrl( | |
| storageAccount = storageClient$authentication$name, | |
| containerName = id, | |
| sasToken = storageClient$generateSasToken("w", "c", id), | |
| storageEndpointSuffix = config$endpointSuffix | |
| ) |
If you could point me in the right direction I could try a fix.