-
Notifications
You must be signed in to change notification settings - Fork 178
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
fix(app): make cal commands chain instead of race #6561
Conversation
In order to avoid various race conditions created by sequential commands being requested of the robot during/before/after calibration sessions, create mechanism to ensure that they are dispatched sequentially. Also ensure that wizard only closes on successful deletion, to avoid orphaned session. Closes #6535
Codecov Report
@@ Coverage Diff @@
## edge #6561 +/- ##
=======================================
Coverage ? 80.23%
=======================================
Files ? 236
Lines ? 20492
Branches ? 0
=======================================
Hits ? 16442
Misses ? 4050
Partials ? 0
Continue to review full report at Codecov.
|
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.
Looks like some typos in the example for the new selector
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.
A quick test on my robot does indicate that these requests are chaining!
Co-authored-by: Seth Foster <[email protected]>
Co-authored-by: Seth Foster <[email protected]>
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.
lgtm, also cool
Overview
In order to avoid various race conditions created by sequential commands being requested of the
robot during/before/after calibration sessions, create mechanism to ensure that they are dispatched
sequentially. Also ensure that wizard only closes on successful deletion, to avoid orphaned session.
Closes #6535
NOTE: these changes have been made within the generic
CalibrationPanels
component directory, which is only being used in the pipette offset calibration flow. The deck calibration and tip length calibration flows will be refactored to use the panels from this shared directory in a following PR.TODO:
unit tests for new, ensure unit tests foruseDispatchApiRequests
hookPipetteOffsetCalibrationControl
cover new additionsChangelog
useDispatchApiRequests
that is very similar to the existinguseDispatchApiRequest
, but accepts any number of api request actions and will only dispatch each sequential action once the request from the previous action has resolved (status !== PENDING
).PipetteOffsetCalibrationControl
component, let it manage closing the wizard so as to avoid orphaned (undeleted) sessions on the robot that can't be viewed or "redeleted" on the app.Review requests
Risk assessment
low, this change is contained within the unreleased pipette offset calibration flow, though this functionality will be added to the other cal overhaul front-ends immediately following this PR merging.