-
Notifications
You must be signed in to change notification settings - Fork 184
test(robot-server): Test compatibility with databases created in v6.0 #11448
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
Conversation
"mount": "right" | ||
"mount": "left" |
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 looked like a mistake in the fixture. Both pipettes were being loaded on the right mount, which caused simulation and run problems. Elsewhere in this file, within designerApplication
, this pipette is said to be on the left mount, so I changed this to match.
Codecov Report
@@ Coverage Diff @@
## edge #11448 +/- ##
==========================================
- Coverage 74.31% 74.22% -0.09%
==========================================
Files 2072 2083 +11
Lines 57377 57468 +91
Branches 5539 5550 +11
==========================================
+ Hits 42638 42655 +17
- Misses 13482 13555 +73
- Partials 1257 1258 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Deliberately omitting black, because I don't have a clean place to reconfigure it.
robot-server/tests/integration/http_api/persistence/test_compatibility.py
Show resolved
Hide resolved
robot-server/tests/integration/http_api/persistence/test_compatibility.py
Show resolved
Hide resolved
robot-server/tests/integration/http_api/persistence/test_compatibility.py
Outdated
Show resolved
Hide resolved
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 few little thoughts but this seems like a pretty vast improvement in our regression detection abilities for these APIs
robot-server/tests/integration/http_api/persistence/test_compatibility.py
Show resolved
Hide resolved
robot-server/tests/integration/http_api/persistence/test_compatibility.py
Show resolved
Hide resolved
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.
Awesome work Max! Thank you!
Overview
This adds a basic test for persistence backwards compatibility, which includes backwards compatibility in our SQL database. The test makes sure that the current
robot-server
code can read some resources that were created by a v6.0.1robot-server
.Closes RSS-102.
This is a humongous diff—sorry! Most of it is opaque fixture data. The actual code changes are fairly small.
Changelog
Copy a pre-populated persistence directory into the repository, intended to be used as an opaque test fixture. I created it by manually issuing HTTP requests to a v6.0.1 dev server and saving its persistence directory. See the added readme for details.
Add a test that runs a dev server underpinned by that persistence directory, issues a bunch of HTTP
GET
requests to it, and makes sure none of the requests come back with an obvious error.For simplicity, we only check the responses in a very shallow way. Basically, we just check that the HTTP status is successful, and that the response data isn't empty. I believe this is sufficient to catch the bugs that we've been prone to so far.
Review requests
robot-server
,api
, orshared-data
that would break backwards compatibility. For example, try making anOptional
field in a persisted Pydantic model non-Optional
. Then, runmake -C robot-server test
—does it catch the problem?Risk assessment
No risk to production code. Changes are only to tests.