Repository navigation
OT2: a run left unfinished on the robot - #1588
Merged
Merged
Conversation
A run another client or an earlier session leaves unfinished (a script stopped half way, a protocol loaded or paused in the Opentrons App) keeps the robot from creating another. RunInfo carries what the run listing says about it: whether it is the current run, when it was created, and whether its status is finished. OT2.get_unfinished_run finds it, and OT2.stop_run stops a run by id and waits until the robot reports it finished, leaving a finished one as it is. setup refuses an unfinished current run, naming it, before creating its own. OT2.home needs a connection rather than a run: homing is a robot endpoint, and after stop_run it brings the robot back to a known position before setup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OT2: a run left unfinished on the robot
Member
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
A run left unfinished (a script stopped half way, a protocol loaded or paused in the Opentrons
App) keeps the robot from creating another;
setup()failed with the server's bare 409.Evidence
setup()beside an unfinished run:HTTPError 409. Stopping it meantot2._api.stop_runand pollingot2._api.get_run.After:
setup()raisesRuntimeError: The OT-2 holds an unfinished run <id> (idle, created ...), before creating anything;stop_runstops it and waits;home()after it works withouta run. 9 new tests; 525 passed.
setup()refused beside it, namingit;
stop_runstopped it and a new run was set up. And a script stopped half way, its runstopped, the robot homed, a new run set up.
Merge Danger
Door: two-way
Blast Radius: small
setup()sends one more request (GET /runs) and refuses earlier, with a clearer message, whereit already failed.
home()now works on a connection alone, where it raised before.🤖 Generated with Claude Code