Commit aaf7f9a
authored
fix(workflows): preserve completed node state across DAG multi-resume cycles (#1530)
* fix(workflows): preserve completed node state across DAG multi-resume cycles (#1520)
Bug: getCompletedDagNodeOutputs only queried 'node_completed' events, but
resumed runs emit 'node_skipped_prior_success' for already-completed nodes.
On a second resume, previously completed nodes were re-executed because
their skip events were invisible to the query.
Fix:
- Query both 'node_completed' and 'node_skipped_prior_success' event types
in getCompletedDagNodeOutputs so multi-resume correctly identifies all
previously completed nodes
- Store original node_output in node_skipped_prior_success event data so
the output is available for $nodeId.output substitution on next resume
- Improve error messaging when all nodes fail: name the specific failed
nodes and count skipped downstream nodes instead of the generic
'no successful nodes' message
Closes #1520
* test: address review feedback — assert node_output, test failure message format
- Assert node_output field in node_skipped_prior_success event test
- Add test for empty-string fallback when node ID has undefined output
- Add dedicated test verifying failure message names failing nodes
- Update stale comment from 'no successful nodes' to new behavior
- Add edge-case test for only node_skipped_prior_success rows (no node_completed)1 parent 7bdf931 commit aaf7f9a
4 files changed
Lines changed: 145 additions & 9 deletions
File tree
- packages
- core/src/db
- workflows/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
211 | 251 | | |
212 | 252 | | |
213 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | | - | |
| 1295 | + | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | | - | |
| 1298 | + | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
| |||
3239 | 3239 | | |
3240 | 3240 | | |
3241 | 3241 | | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
| 3260 | + | |
| 3261 | + | |
| 3262 | + | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
3242 | 3290 | | |
3243 | 3291 | | |
3244 | 3292 | | |
| |||
4988 | 5036 | | |
4989 | 5037 | | |
4990 | 5038 | | |
4991 | | - | |
| 5039 | + | |
4992 | 5040 | | |
4993 | 5041 | | |
4994 | 5042 | | |
| |||
5001 | 5049 | | |
5002 | 5050 | | |
5003 | 5051 | | |
| 5052 | + | |
| 5053 | + | |
| 5054 | + | |
| 5055 | + | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
| 5063 | + | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
| 5084 | + | |
| 5085 | + | |
| 5086 | + | |
| 5087 | + | |
| 5088 | + | |
| 5089 | + | |
5004 | 5090 | | |
5005 | 5091 | | |
5006 | 5092 | | |
| |||
6545 | 6631 | | |
6546 | 6632 | | |
6547 | 6633 | | |
6548 | | - | |
| 6634 | + | |
6549 | 6635 | | |
6550 | 6636 | | |
6551 | 6637 | | |
| |||
6640 | 6726 | | |
6641 | 6727 | | |
6642 | 6728 | | |
6643 | | - | |
| 6729 | + | |
6644 | 6730 | | |
6645 | 6731 | | |
6646 | 6732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
2650 | | - | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
2651 | 2654 | | |
2652 | 2655 | | |
2653 | 2656 | | |
| |||
3146 | 3149 | | |
3147 | 3150 | | |
3148 | 3151 | | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + | |
| 3155 | + | |
3149 | 3156 | | |
3150 | | - | |
3151 | | - | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
3152 | 3162 | | |
3153 | 3163 | | |
3154 | 3164 | | |
| |||
0 commit comments