-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(robot-server): get versions from VERSION.json (#12361)
In d7a9200 we switched to generating the version of the opentrons package from git, including feeding its __version__ by using importlib metadata instead of ingesting package.json. The problem is that __version__ now has a python-style semver string (e.g. 0.1.0a0) instead of a rest-of-the-world semver string (e.g. 0.1.0-alpha.0), which node semver doesn't like, which means that the app was rejecting the version the robot server reported in /health and falling back to the update server. This means things continued to work perfectly fine on OT-2, but on the flex a separate issue meant the update server wasn't reporting a version for the opentrons package, so versions broke. This change uses the VERSION.json file to get the "real" semver string for the opentrons package instead of the importlib metadata one. It also uses that file to load the system version rather than a config flag. There are fallbacks to the original versions of this implementation for both, which will be used in dev servers where VERSION.json is not present. Closes RQA-577 Co-authored-by: Max Marrone <[email protected]>
- Loading branch information
1 parent
9ed4666
commit 5dcc0fb
Showing
3 changed files
with
202 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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