-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFD 348](https://rfd.shared.oxide.computer/rfd/0348) is still in progress, but I find it helpful to do this in parallel. --- This is a big PR, but fortunately it is very straightforward: endpoints plus the service functions, models, and tables you'd expect to see backing those endpoints. It's a good time to add "updateable" to your computer's dictionary. ### Included here - [x] Endpoints - [x] System version + status (updating or not + reason) - [x] Get tree of updateable components (each w/ version + status) - [x] List system updates - [x] Get system update - [x] Get tree of component updates for top-level system update - [x] Start update (noop, returns placeholder `SystemUpdateDeployment`) - [x] Stop update (noop) - [x] Change existing refresh endpoint to match new `/v1/system/update/...` convention - [x] Nexus functions for all that except start and stop - [x] Basic tests that create the thing and then retrieve it - [x] Tables - [x] System updates - [x] Component updates - [x] Join table between system updates and component updates - [x] Updateable components - [x] Update deployments - Weird stuff - [x] `version_sort` column on `system_update` and `component_update` that lets us hack in sorting by version - [x] Enforce maximum major/minor/patch version number because `version_sort` relies on zero-padding - [x] Make system update semver version the PK for the system updates table and fetch by version in endpoints - Ideally we'd be able to fetch by ID also, but there would been a lot of boilerplate to make it work like `NameOrId` without comparable value due to the latter's reuse in many places. Version is unique and immutable, so this should be good enough to start. ### Conspicuously missing, to be done in followups - `nexus` functions for updating updateable component rows (possibly also system updates and component updates — not sure if they're supposed to be modified) - Actually do an update Do a find for `TODO:` for an embarrassing number of additional bullets. ### Open questions - What is a good length limit for version strings in the DB? There's no official limit, but the docs suggest a number less than or equal to 255: https://semver.org/#does-semver-have-a-size-limit-on-the-version-string - Where/how do we enforce the length limit besides the DB? - How to represent system status, especially steady reason
- Loading branch information
1 parent
b58e613
commit 35cf540
Showing
32 changed files
with
3,079 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.