wicket: add rack-update status command#10230
Conversation
| Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, | ||
| )] | ||
| #[serde(rename_all = "snake_case")] | ||
| pub enum UpdateState { |
There was a problem hiding this comment.
I was going to suggest calling this ComponentUpdateState to avoid confusion with the existing UpdateState, but that doesn't quite work here because we also use the same enum to represent the overall update state. I'm not quite sure what to call this.
| TerminalKind::Failed => UpdateState::Failed, | ||
| TerminalKind::Aborted => { | ||
| UpdateState::Aborted | ||
| } |
There was a problem hiding this comment.
Should we report the failure/abort message in these two cases?
There was a problem hiding this comment.
Done as 6826510 (am happy to change / rename)
| // If *all* components are not started, the update is not started. | ||
| UpdateState::NotStarted | ||
| } else { | ||
| } else |
sunshowers
left a comment
There was a problem hiding this comment.
Thanks, this seems mostly good to go. Just have a comment about adding an integration test if possible.
| /// The status of a rack update. | ||
| #[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)] | ||
| pub struct RackUpdateStatus { |
There was a problem hiding this comment.
Wondering if you can extend one of the tests in https://github.com/oxidecomputer/omicron/blob/main/wicketd/tests/integration_tests/updates.rs to get a basic smoke test of the rack update status going.
sunshowers
left a comment
There was a problem hiding this comment.
This is awesome, thanks! Presumably you've tested this end-to-end and know that the information here is sufficient for automated MUPdate.
Resolves #10146
Add command
rack-update statusto thewicketCLI, which reports the current update status of the rack. Supports human-readable output (default) or JSON (--json). Reads from thewicketdAPI by default, or from a file/stdin via--file, which enables usage with the output ofrack-update debug-dump.