test(robot-server): Test compatibility with databases created in v6.0#11448
Merged
Conversation
SyntaxColoring
commented
Sep 8, 2022
| "params": { | ||
| "pipetteId": "50d23e00-0042-11ec-8258-f7ffdf5ad45a", | ||
| "mount": "right" | ||
| "mount": "left" |
Contributor
Author
There was a problem hiding this comment.
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.
SyntaxColoring
commented
Sep 9, 2022
SyntaxColoring
commented
Sep 9, 2022
mcous
approved these changes
Sep 13, 2022
mcous
left a comment
Contributor
There was a problem hiding this comment.
A few little thoughts but this seems like a pretty vast improvement in our regression detection abilities for these APIs
TamarZanzouri
approved these changes
Sep 14, 2022
TamarZanzouri
left a comment
Contributor
There was a problem hiding this comment.
Awesome work Max! Thank you!
5 tasks
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.
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-servercode 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
GETrequests 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-datathat would break backwards compatibility. For example, try making anOptionalfield 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.