Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

addTask sets default expiry time in SAS token too short for long running jobs #363

Open
zerweck opened this issue Aug 1, 2019 · 0 comments

Comments

@zerweck
Copy link

zerweck commented Aug 1, 2019

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

sasToken = storageClient$generateSasToken("w", "c", jobId),

or here
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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant