Repository navigation
Commit 5a1a4f3
authored
fix(tables): settle a resume whose pause cannot be saved as failed, and never fail a completed run (#8417)
* fix(tables): settle a resume whose pause cannot be saved as failed, and never fail a completed run
A resumed run that paused but whose pause state could not be persisted failed
its log yet returned a paused result, so the cell showed paused and the resume
entry was marked completed. It now throws after failing the log, so the attempt
settles as failed and reports execution_failed.
markResumeFailed also rewrote a completed log as failed when a step after a
completed run threw. A completed run's outcome now stands, and an already
failed log keeps its original end time.
* fix(tables): settle the cell as completed when a completed resume's later step throws
Leaving a completed log alone reported no outcome, so the cell stayed on its
last running state. markResumeFailed now reports what the attempt left the
execution as, and a run that completed before a later step threw settles the
cell as completed. The pause point is still marked failed as before.
* fix(tables): continue the cascade after a completed resume whose later step threw
A completed run's cell is completed, so its downstream workflow groups still
start; the failure is still rethrown. A pause that cannot be saved now throws a
stable message with the underlying error on cause, so API callers never see
internal persistence details.
* fix(tables): keep server-side logging for a resumed pause that cannot be saved
* fix(tables): continue the cascade only once the completed cell is saved
* test(tables): assert which downstream groups a resume's cascade started1 parent ed8b482 commit 5a1a4f3
4 files changed
Lines changed: 229 additions & 68 deletions
File tree
- apps/sim
- background
- lib/workflows/executor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
188 | 211 | | |
189 | 212 | | |
190 | 213 | | |
| |||
364 | 387 | | |
365 | 388 | | |
366 | 389 | | |
367 | | - | |
368 | | - | |
369 | | - | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
370 | 394 | | |
371 | 395 | | |
372 | 396 | | |
373 | 397 | | |
374 | 398 | | |
375 | 399 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
380 | 410 | | |
381 | 411 | | |
382 | 412 | | |
| |||
385 | 415 | | |
386 | 416 | | |
387 | 417 | | |
388 | | - | |
| 418 | + | |
| 419 | + | |
389 | 420 | | |
390 | 421 | | |
391 | 422 | | |
| |||
396 | 427 | | |
397 | 428 | | |
398 | 429 | | |
399 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
400 | 435 | | |
401 | 436 | | |
402 | 437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
223 | 233 | | |
224 | 234 | | |
225 | 235 | | |
226 | 236 | | |
227 | 237 | | |
228 | 238 | | |
229 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
230 | 243 | | |
231 | 244 | | |
232 | 245 | | |
233 | 246 | | |
234 | 247 | | |
235 | 248 | | |
236 | 249 | | |
237 | | - | |
| 250 | + | |
238 | 251 | | |
239 | 252 | | |
240 | 253 | | |
| |||
253 | 266 | | |
254 | 267 | | |
255 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
256 | 302 | | |
257 | 303 | | |
258 | 304 | | |
| |||
Lines changed: 94 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
268 | 271 | | |
269 | | - | |
270 | | - | |
| 272 | + | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
275 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
276 | 296 | | |
277 | 297 | | |
278 | 298 | | |
| |||
313 | 333 | | |
314 | 334 | | |
315 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
316 | 390 | | |
317 | 391 | | |
318 | 392 | | |
319 | 393 | | |
320 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
321 | 398 | | |
322 | 399 | | |
323 | 400 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 401 | + | |
327 | 402 | | |
328 | 403 | | |
329 | 404 | | |
| |||
337 | 412 | | |
338 | 413 | | |
339 | 414 | | |
340 | | - | |
341 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
342 | 418 | | |
343 | | - | |
344 | | - | |
345 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
346 | 422 | | |
347 | 423 | | |
348 | 424 | | |
| |||
351 | 427 | | |
352 | 428 | | |
353 | 429 | | |
354 | | - | |
| 430 | + | |
355 | 431 | | |
356 | 432 | | |
357 | 433 | | |
| |||
361 | 437 | | |
362 | 438 | | |
363 | 439 | | |
364 | | - | |
| 440 | + | |
365 | 441 | | |
366 | 442 | | |
367 | 443 | | |
| |||
0 commit comments