dsub icon indicating copy to clipboard operation
dsub copied to clipboard

--timeout no long works with google batch?

Open jqian2015 opened this issue 4 months ago • 3 comments

I am a user in allofus platform. when using dsub with --timeout flag, i found it didn't work. not sure if it is due to the transition to google batch. i tried many times with different dsub codes and here is one simple example,

aou_dsub
--logging "${WORKSPACE_BUCKET}/data/genome/logging"
--command 'sleep 300'
--timeout 1m
--name "timeout-test"

and the job is a success. "timeout-test Job state is set from RUNNING to SUCCEE... 08-22 22:04:32"

jqian2015 avatar Aug 25 '25 19:08 jqian2015

I can confirm this as well. timeout is not working.

rivershah avatar Aug 26 '25 09:08 rivershah

Looks like the timeout flag value needs to be wired through to the TaskSpec as described here:

https://cloud.google.com/batch/docs/set-timeouts#set-task-timeout

build_task_spec is here:

https://github.com/DataBiosphere/dsub/blob/dba9b8635e78036a9c6c1826e4c3ba31a280f1b5/dsub/providers/google_batch_operations.py#L126

and is called from here:

https://github.com/DataBiosphere/dsub/blob/dba9b8635e78036a9c6c1826e4c3ba31a280f1b5/dsub/providers/google_batch.py#L802

mbookman avatar Aug 28 '25 17:08 mbookman

Hi @jqian2015 and @rivershah ,

We just released 0.5.1 which passes out timeout to the Batch API

wnojopra avatar Sep 04 '25 18:09 wnojopra