Commit d83c4e6
fix(api): restore empty error blocks on cancelled runs (#15215)
I think this would be a subtle side effect of a previous pr trying to
improve PE end behavior.
The reason this fix is required is that when a client cancels a protocol
by stopping the engine, the `StopAction` sets the run result (good) and
doesn't set a run error (good, correct, there wasn't one, this is a
cancel). In 7.2, with the behavior this PR now restores, a
`FinishAction` that might contain an error wouldn't set that error in
the run if it already had a _result_, whether or not it had an _error_.
In 7.3, it would set the error if the engine had no error, which it
wouldn't, because there is no error when you stop.
## Testing
- [x] With this PR, cancelling a run on a real robot causes the ODD to
show an inactive error details button
- [x] With this PR, stopping a run by hitting an estop still causes the
ODD and desktop to display that an estop error cancelled the run
Closes RQA-2737
---------
Co-authored-by: Max Marrone <max@opentrons.com>1 parent bb1f1ce commit d83c4e6
File tree
2 files changed
+45
-6
lines changed- api
- src/opentrons/protocol_engine/state
- tests/opentrons/protocol_engine/state
2 files changed
+45
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
393 | 402 | | |
394 | 403 | | |
395 | 404 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
0 commit comments