Prep patches for storing image.json in the ostree#2806
Merged
jlebon merged 6 commits intocoreos:mainfrom Apr 13, 2022
Merged
Conversation
Prep for sticking the rendered `image.json` into the ostree commit; we want reproducibility here to avoid spurious rebuilds.
We're centralizing the input to disk image generation as JSON. Also, this way we'll correctly honor the defaults.
The `image-default.yaml` file should act as the canonical reference for possible keys, along with their default values.
Part of canonically processing the merged JSON so we correctly honor defaults.
A few more places were parsing the image YAML, change things so that we generate the canonicalized/flattened JSON in Python code that can be called by the Python helpers that want it, and call that same code as part of the shell script build preparation.
This YAML file should have the list of all values parsed by code.
134e36a to
618a0a4
Compare
Member
Author
|
Pushed the final bits here #2811 But these prep patches are just cleanups and should have a low risk of breaking anything. |
jlebon
approved these changes
Apr 13, 2022
Member
jlebon
left a comment
There was a problem hiding this comment.
Nice, I like the generate_image_json cleanup.
This file contains hidden or 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
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.
build: Ensure JSON is sorted for reproducibility
Prep for sticking the rendered
image.jsoninto the ostree commit;we want reproducibility here to avoid spurious rebuilds.
buildextend-metal: Parse image JSON, not YAML
We're centralizing the input to disk image generation as JSON.
Also, this way we'll correctly honor the defaults.
build: Move
extra-kargsdefault intoimage-default.yamlThe
image-default.yamlfile should act as the canonicalreference for possible keys, along with their default values.
build: Checksum image JSON, not YAML
Part of canonically processing the merged JSON so we correctly
honor defaults.
build: Clean up image JSON generation, use it consistently
A few more places were parsing the image YAML, change things
so that we generate the canonicalized/flattened JSON in Python
code that can be called by the Python helpers that want it, and
call that same code as part of the shell script build preparation.
live: Move
squashfs-compressiondef intoimage-default.yamlThis YAML file should have the list of all values parsed by
code.