Skip to content

Commit 03bcea1

Browse files
committed
Add UpdateError::RollbackProtection
TODO: update hubtools dependency when hubtools epoch branch is merged.
1 parent 8b80941 commit 03bcea1

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ resolver = "2"
1515

1616
[workspace.dependencies]
1717
tlvc = { git = "https://github.com/oxidecomputer/tlvc.git", branch = "main" }
18-
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "main"}
18+
# TODO: Change to main branch before merge
19+
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "epoch"}
1920
slog-error-chain = { git = "https://github.com/oxidecomputer/slog-error-chain.git", branch = "main", features = ["derive"] }
2021

2122
anyhow = "1.0"

gateway-messages/src/sp_to_mgs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ pub enum UpdateError {
11701170
ImageMismatch,
11711171
SignatureNotValidated,
11721172
VersionNotSupported,
1173+
RollbackProtection,
11731174
}
11741175

11751176
impl fmt::Display for UpdateError {
@@ -1229,6 +1230,9 @@ impl fmt::Display for UpdateError {
12291230
Self::InvalidComponent => {
12301231
write!(f, "invalid component for operation")
12311232
}
1233+
Self::RollbackProtection => {
1234+
write!(f, "invalid epoch compared to active image")
1235+
}
12321236
}
12331237
}
12341238
}

0 commit comments

Comments
 (0)