Commit d6d48ae
committed
Add support for intra-step pause
If asked to pause, a step can return ErrPaused with a piece of state
that will be passed to a new instance when the job is resumed.
The state is opaque but at a minimum should contain targets that were in
flight at the time, they will not be reinjected and runner will expect
results for them when the job is resumed.
Handling pause is not a requirement, a step can completely ignore
the pause signal and pausing will still work between steps.1 parent 11ef575 commit d6d48ae
25 files changed
Lines changed: 394 additions & 149 deletions
File tree
- cmds/plugins
- pkg
- pluginregistry
- runner
- test
- plugins/teststeps
- cmd
- echo
- example
- randecho
- sleep
- sshcmd
- terminalexpect
- tests
- e2e
- plugins/teststeps
- badtargets
- channels
- crash
- fail
- hanging
- noop
- noreturn
- panicstep
- slowecho
- teststep
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | | - | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments