Skip to content

cosalib: add Builds().get_build_image_json(); drop use of flatten_image_yaml()#4067

Merged
dustymabe merged 1 commit intocoreos:mainfrom
dustymabe:dusty-drop-flatten-image-yaml-usage
Apr 6, 2025
Merged

cosalib: add Builds().get_build_image_json(); drop use of flatten_image_yaml()#4067
dustymabe merged 1 commit intocoreos:mainfrom
dustymabe:dusty-drop-flatten-image-yaml-usage

Conversation

@dustymabe
Copy link
Copy Markdown
Member

@dustymabe dustymabe commented Apr 5, 2025

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.

…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.
@dustymabe dustymabe changed the title cosalib: add Builds().get_build_image_json(); drop use of flatten_ima… cosalib: add Builds().get_build_image_json(); drop use of flatten_image_yaml() Apr 5, 2025
@dustymabe dustymabe enabled auto-merge (rebase) April 5, 2025 21:05
Copy link
Copy Markdown
Member

@marmijo marmijo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dustymabe dustymabe merged commit 3ff6d17 into coreos:main Apr 6, 2025
5 checks passed
@dustymabe dustymabe deleted the dusty-drop-flatten-image-yaml-usage branch April 6, 2025 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants