Commit 84c189c
authored
feat: add conditional flow execution and retry handling (#600)
# Add conditional flow execution and retry handling
This PR introduces conditional flow execution and retry handling capabilities to the PGFlow system. It adds:
1. Conditional step execution with `if` and `ifNot` patterns that can:
- Skip steps when conditions are not met
- Optionally cascade skips to dependent steps
- Fail the run when required conditions aren't met
2. Retry exhaustion handling that can:
- Skip steps after retries are exhausted
- Cascade skips to dependent steps
- Configure different behavior per step
The implementation includes comprehensive test coverage for:
- Basic conditional execution with required and forbidden patterns
- Skip cascading behavior to dependent steps
- Non-cascading skips where downstream steps can still run
- Failure handling when conditions aren't met
- Multiple retry attempts before skipping
- Combined condition and failure handling scenarios
These features enable more robust workflow definitions with better handling of optional steps, error conditions, and dependencies between steps.1 parent 320a106 commit 84c189c
3 files changed
Lines changed: 1076 additions & 0 deletions
File tree
- pkgs/edge-worker/tests/integration/flow
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments