cosalib: add Builds().get_build_image_json(); drop use of flatten_image_yaml()#4067
Merged
dustymabe merged 1 commit intocoreos:mainfrom Apr 6, 2025
Merged
Conversation
…ge_yaml() As part of c61da89 we started to allow templating in the image.yaml file. This means we now need to pass the dict of things to template into flatten-image-yaml and that is now causing us issues if there are things to template but not template dict passed in. One case we were doing this was in our AWS upload where we pick up some values from image.yaml. Except, we shouldn't have been picking them up from image.yaml in the src/config as this stage but rather the image.json that had been baked into the build. Let's switch over cosalib/aws to pick the info up from image.json instead. As part of this add a helper the the cosalib Builds library to make this easier for us in various places to do it. This addition was conveniently stolen from cmd-compress that already had code to do this.
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.
As part of c61da89 we started to allow templating in the image.yaml file. This means we now need to pass the dict of things to template into flatten-image-yaml and that is now causing us issues if there are things to template but not template dict passed in.
One case we were doing this was in our AWS upload where we pick up some values from image.yaml. Except, we shouldn't have been picking them up from image.yaml in the src/config as this stage but rather the image.json that had been baked into the build.
Let's switch over cosalib/aws to pick the info up from image.json instead. As part of this add a helper the the cosalib Builds library to make this easier for us in various places to do it. This addition was conveniently stolen from cmd-compress that already had code to do this.