-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add type conversions for EarlyNetworkConfig upgrade #4285
Conversation
This commit adds deserialization and conversion support for v0 and v1 of EarlyNetworkConfig types. Future commits will add support for writing the v1 version back to the bootstore ledger if necessary. Unit tests for conversion also coming soon.
After discussion with @jgallagher, it seems unnecessary and potentially dangerous to write the updated schema back to the ledger since we can deterministically convert from |
This reverts commit 252e2a1.
/// Convert from `RackNetworkConfigV0` to `RackNetworkConfigV1` | ||
/// | ||
/// We cannot use `From<RackNetworkConfigV0> for `RackNetworkConfigV1` | ||
/// because the `rack_network` field does not exist in `RackNetworkConfigV0` |
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.
/// because the `rack_network` field does not exist in `RackNetworkConfigV0` | |
/// because the `rack_subnet` field does not exist in `RackNetworkConfigV0` |
This commit adds deserialization and conversion support for v0 and v1 of EarlyNetworkConfig types. Future commits will add support for writing the v1 version back to the bootstore ledger if necessary. Unit tests for conversion also coming soon.