feat(api): Allow treating errors as false-positives (ignore them and continue with the run) #16556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This does the interesting part of EXEC-676. See there for background.
Changelog
When a command encounters a defined error, it now enacts two state updates:
For example, if a
pickUpTip
fails with atipPhysicallyMissing
error:tipPhysicallyMissing
error.)We unfortunately need to go out of our way to keep the hardware API's state in sync with Protocol Engine's state as we do this.
(All of the above is EXEC-785.)
We can use this to allow continuing from
tipPhysicallyMissing
andtipPhysicallyAttached
errors inpickUpTip
,dropTip
, anddropTipInPlace
commands. (EXEC-778, EXEC-779.)This does not quite expose this through robot-server's HTTP API just yet. That's left to other PRs.
Test plan
resume_from_recovery(reconcile_false_positive=False)
toresume_from_recovery(reconcile_false_positive=True)
. Make sure that a protocol can continue from failedpickUpTip
anddropTip
commands as if they succeeded. For example, try running a protocol with lots ofaspirate
s anddispense
s and interesting path planning, and physically don't place the tip rack, and select Ignore and continue every time an error pops up.Review requests
HardwareStateSynchronizer
. Any thoughts on a better approach?hardware_api.cache_tip(current_protocol_engine_tip)
before every hardware movement call?Risk assessment