-
Notifications
You must be signed in to change notification settings - Fork 72
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
config: CNF installation (2.1) Transformer for old version of config #2147
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svteb
changed the title
config: Transformer for old version of config
config: CNF installation (2.1) Transformer for old version of config
Sep 16, 2024
20 tasks
martin-mat
requested changes
Sep 17, 2024
src/tasks/utils/cnf_installation/transformer/config_transformer.cr
Outdated
Show resolved
Hide resolved
src/tasks/utils/cnf_installation/transformer/config_transformer.cr
Outdated
Show resolved
Hide resolved
src/tasks/utils/cnf_installation/transformer/config_transformer.cr
Outdated
Show resolved
Hide resolved
src/tasks/utils/cnf_installation/transformer/config_transformer.cr
Outdated
Show resolved
Hide resolved
src/tasks/utils/cnf_installation/transformer/config_transformer.cr
Outdated
Show resolved
Hide resolved
svteb
force-pushed
the
2120-config-transformer
branch
2 times, most recently
from
September 23, 2024 08:07
ec9816a
to
9ecc279
Compare
kosstennbl
approved these changes
Sep 23, 2024
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
svteb
force-pushed
the
2120-config-transformer
branch
from
September 25, 2024 12:12
9ecc279
to
74f8858
Compare
martin-mat
approved these changes
Sep 25, 2024
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
Smitholi67
approved these changes
Sep 25, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IMPORTANT
To speed up the development of the #2120 epic we are currently experimenting with a different approach to pull requests. This pull request has been created anew from a different branch, if you want to check the already existing discussion around it, view the old #2133.
Description
The transformer transforms the old config according to the structure proposed in #2129.
Notes
config_v1.cr
../cnf-testsuite transform_config OLD_FILE_PATH NEW_FILE_PATH
ConfigTransformer
class found inconfig_transformer.cr
automatically detects the version of the old config and transforms it to the latest version (currently only v1 -> v2), but allows for future extendibility.transform
function is called which does the actual transformation in code (through use of Hashes and YAML::Any).transform
function uses the appropriate transformation rules (V1ToV2Transformation class
inv1_to_v2_transformation.cr
file)process_data
has been added (TransformationBase class
intransformation.cr
file), this function converts the underlying hashes and arrays to theYAML::Any
type and removes any nil branches so they don't clutter the final output.serialize_to_string
andserialize_to_file
functions.Issues:
Refs: #2130
How has this been tested:
Types of changes:
Checklist:
Documentation
Code Review
Issue