-
Notifications
You must be signed in to change notification settings - Fork 17
Translate to/from specs v2.4 and v3.1 #6
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
Conversation
|
We should never output an experimental spec. There's no guarantee of compatibility even within an experimental version, and once an experimental spec is stabilized, the It might make sense to bump to 2.4 and 3.1, but we should be careful. If the converter is being used to provision OS versions which might not support those specs, we'll cause provisioning failures. |
|
I agree with the experimental part. Changed this to the stable versions. Right now the most annoying with this library is however that you cannot translate to and back easily as the version expected as input to by Translate() is 2.3 and the version output by Translate3to2() is 2.2 |
bgilbert
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.
This should also add translations for new functionality that's supported in both spec versions.
Projects that use this library shouldn't update it use unless they support those spec versions.
The issue isn't whether the project supports the spec version, but whether all machines provisioned by the project also support that spec version.
|
I've added functionality to translate the new fields in 2.4/3.1. Also added more individual functions for translating from/to specific versions (they might not all be required - what I'd like to use for MCO is capability to translate back and forth between 2.2 and 3.1). |
f0ce2fa to
7fc95d0
Compare
|
@bgilbert this is ready for review :) |
|
The code itself seems fine, however with this PR, we would have:
It feels a bit redundant. Do we need all that compatibility? The FCOS MCO branch today is on 3.0. Are we able to convert between 3.0 to 3.1? If so I think we can drop some of the excessive translations. |
|
yep, the intention is to go straight to spec 3.1 in OCP (I.e. openshift/machine-config-operator#1778, after the dual support PR has landed and propagated through to MCD on RHCOS) I think I liked the idea of adding 3.0 -> 2.3 so we can translate back and forth between them, but it's not really necessary indeed. I'll remove that one. |
|
Right, hopefully after OCP stabilizes and is able to remove spec 2.x entirely, we would no longer need to support translations (unless some other major case shows up). So we won't have to add more backward compatible versions in the future. Does that make sense? |
|
Dropped the 3.0 -> 2.3 conversion func |
95d63b9 to
6fc6d81
Compare
|
@bgilbert I believe I've addressed all comments. PTAL |
e9aeae9 to
4d80642
Compare
Also moves some common functions into the util package.
Also fixes the Ignition configs used for testing to adhere to this rule.
5c08a0b to
8bfca33
Compare
8bfca33 to
e38bc21
Compare
|
@bgilbert I've pushed the next iteration of this :) |
bgilbert
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.
🎉
The Ignition config specs v2.4 and v.3.1 are the currently
stable ones in Ignition 0.x and 2.x respectively.