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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api): Pause when
pick_up_tip()
errors in a Python protocol #14753feat(api): Pause when
pick_up_tip()
errors in a Python protocol #14753Changes from 22 commits
42a36ec
33225f7
98446ba
459f14d
b4d4d80
b61913f
9322657
33d33c9
dbb03db
b13db26
838572b
1d5ba4b
6353d7d
1ef9bc9
cb5bca1
51bd1d2
6b79625
0213657
ff22758
8ad0eef
bd14851
a880096
50e1706
97b0ada
cf1e936
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this its own unique exception type and code so that we can programmatically differentiate it from other errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 97b0ada.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I am wondering why we need this in the action? dont we have the failed command stored in PE already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a hack, we probably don't need it. See this comment:
opentrons/api/src/opentrons/protocol_engine/actions/actions.py
Lines 177 to 180 in bd14851
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it kind of feels like we want to gate this on a synchronous call to whether we're now in recovery for the command, but this in general feels a little race condition-y because of the separation between command state and run state. Specifically,
wait_for_command
returns on the asyncio spin after aFailCommandAction
or aSucceedCommandAction
for this command (we can neglect the queued-and-stopping part for now)get_recovery_in_progress_for_command
predicate is based on the queue status being awaiting-recoveryDo we guarantee mechanically that the queue status will be set before the asyncio spin after the command terminal action is dispatched? Are we sure this won't occasionally race and return early?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if I understand your concern correctly:
When
await self.wait_for_command(command_id=queued_command.id)
returns, we are guaranteed that the action that finalized the command has already been fully processed, and thatget_recovery_in_progress_for_command()
will see its results on the state.When we handle an action, we send it to each of the substores in a loop. Only after that's done do we notify subscribers like this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my fault; in #14726, I neglected to account for what this
estop()
method was doing. I'm going to have to fix this in another PR. EXEC-382There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a lot of this
estop()
method is due for a rethink. Like, I don't really get why it needs to be so different fromstop()
, and why it needs to be messing with things likeFailCommandAction
s itself.