tink: GlobalTimeout appears unused
Right now, the global timeout is not actually used except at display-time in the portal project:
[grahamc@Petunia:~/projects/github.com/tinkerbell]$ rg GlobalTimeout
tink/executor/types.go
7: GlobalTimeout int `yaml:"global_timeout"`
tink/db/workflow.go
29: GlobalTimeout int `yaml:"global_timeout"`
portal/src/client/workflow.go
123: wf.Timeout = strconv.Itoa(details.GlobalTimeout)
portal/src/pkg/types/workflow.go
26: GlobalTimeout int `yaml:"global_timeout"`
I propose the following semantics. Given a workflow:
global_timeout: 30
tasks:
- name: "example"
worker: "{{.device_1}}"
actions:
- name: "phase-1"
image: hello-world
timeout: 20
command: sleep 20
- name: "phase-2"
image: hello-world
timeout: 20
command: sleep 20
- phase-1 would execute to completion, take 20 seconds, and the entire workflow would have 10 seconds to complete the rest of the phases.
- phase-2 would begin, run for 10 seconds, be killed, and the workflow is canceled.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
@tstromberg I don’t think if this was addressed and I believe it should be. So, we should not close this issue.
As discussed, There is no use of
global_timeoutas we haveaction level timeoutso this needs to be removed from the template and code itself.