-
Notifications
You must be signed in to change notification settings - Fork 179
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(robot-server): Fix 500 error trying to start tip length calibration sessions #13607
Conversation
ae3276a
to
79cc769
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.0.0 #13607 +/- ##
====================================================
Coverage 71.33% 71.33%
====================================================
Files 2423 2423
Lines 68162 68162
Branches 7937 7937
====================================================
Hits 48620 48620
Misses 17687 17687
Partials 1855 1855
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 great! I like the integration test idea too
@@ -1,3 +1,9 @@ | |||
"""Helper functions for use inside Tavern tests. | |||
|
|||
https://tavern.readthedocs.io/en/latest/basics.html#calling-external-functions |
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 pretty cool!
Overview
Closes RSS-349.
Test Plan
Fix details
According to our labware definition JSON schema, these are the valid shapes of
gripperOffsets
:Totally omitted:
Containing just
default
:Containing
default
and slot-specific offsets:The problem was that this line in our Pydantic model did not match that.
opentrons/shared-data/python/opentrons_shared_data/labware/labware_definition.py
Line 317 in 76a6e54
It would cause the server and local analysis engine to return labware definitions where
gripperOffsets
was normalized to{}
. This was invalid according to our JSON schema, which requiredgripperOffsets
to either contain at least a"default"
key, or be totally omitted.Those incorrect
{}
s are all over the database by now, so we unfortunately can't correct the Pydantic model to match the JSON schema. Instead, we need to loosen the JSON schema to accept what the Pydantic model has been emitting.So, we're loosening the JSON schema to now accept these additional shapes:
Containing nothing:
Containing just slot-specific offsets (this is an accidental byproduct of this implementation, but we believe it to be harmless)
Review requests
Is this the best way to fix this?
Does it look like our Pydantic model now conforms to our JSON schema?
Risk assessment
Low I guess? I tried not to touch any of the logic for deciding gripper offsets.