Skip to content

logical: use correct parent timeout

Alessandro Zini requested to merge aleeraser/lava:fix-job-timeout into master

cea67eb1 introduces a parent_end_time variable which stores the max_end_time that was initially passed to the run function. The parent_end_time is used later to honor the job timeout, as opposed to the action timeout.

It can happen that parent_end_time, which is set to max_end_time, does not hold the correct job timeout. This may happen since max_end_time is calculated as min(max_job_end_time, max_action_end_time). Therefore, using it to honor the job timeout is incorrect, since it most probably will hold the action timeout instead.

This can lead to weird errors where an action with e.g. 2 minutes timeout and 5 retries will get abruptly terminated after the 2 minutes of the action timeout have expired, even though the whole job timeout may be higher.

Merge request reports