-
Notifications
You must be signed in to change notification settings - Fork 217
Allow reading persistent component slot via mgs #2332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
jgallagher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (other than needing to point Cargo.toml back to main once the MGS PR is merged)
| Ok(HfPersistentData { dev_select }) => { | ||
| Ok(Self::dev_to_slot(dev_select)) | ||
| } | ||
| Err(HfError::NoPersistentData) => Ok(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a comment explaining why it's okay to fall back to slot 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment but maybe it's worth just passing through the error so we don't mask failures to set a persistent slot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returning the error would be my preference, I had assumed this was needed for some automatic testing or edge case where 0 made sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, updated!
9af440e to
0ce0264
Compare
labbott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for doing this work
Along with oxidecomputer/management-gateway-service#476 fixes #2331.