Skip to content

fix: add missing build stages and fix ordering in EE template#586

Merged
NilashishC merged 1 commit intomainfrom
fix_AAP-73027
Apr 28, 2026
Merged

fix: add missing build stages and fix ordering in EE template#586
NilashishC merged 1 commit intomainfrom
fix_AAP-73027

Conversation

@NilashishC
Copy link
Copy Markdown
Collaborator

@NilashishC NilashishC commented Apr 28, 2026

  • Add the missing append_galaxy, prepend_builder, and append_builder stages to the execution-environment.yml.j2 template.
  • Reorder all additional_build_steps blocks to follow the correct ansible-builder v3 build stage sequence: base → galaxy → builder → final.

Closes https://redhat.atlassian.net/browse/AAP-73027

Add the missing `append_galaxy`, `prepend_builder`, and `append_builder`
stages to the execution-environment.yml.j2 template. Reorder all
`additional_build_steps` blocks to follow the correct ansible-builder v3
build stage sequence: base → galaxy → builder → final.
Copy link
Copy Markdown

@rockygeekz rockygeekz left a comment

Choose a reason for hiding this comment

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

Review Summary

The fix correctly addresses the bug reported in AAP-73027, where 3 of 8 additional_build_steps stages were missing from the Jinja2 template.

What changed

  1. Added 3 missing stages: append_galaxy, prepend_builder, and append_builder — all three stages that were silently dropped during EE builds.
  2. Fixed stage ordering: Moved append_base to its correct position (after prepend_base, before prepend_galaxy). Previously it was rendered after prepend_galaxy, which violated the ansible-builder v3 build stage sequence.

Verification

The resulting stage order in the template is now:

prepend_base → append_base → prepend_galaxy → append_galaxy → prepend_builder → append_builder → prepend_final → append_final

This matches the ansible-builder v3 specification which defines the build stage sequence as: base → galaxy → builder → final.

Notes

  • The new stage blocks follow the same conditional pattern (is defined guard + for loop) as existing stages — consistent and correct.
  • The append_base block correctly preserves its special-case logic for non-official EEs (RUN $PYCMD -m pip install -U pip).
  • Existing test fixtures (tests/fixtures/common/execution-environment/execution-environment.yml and tests/fixtures/project/ee_project/execution-environment.yml) don't exercise the new stages, but since those fixtures test the default non-official EE path (which only generates append_base), they remain valid. Adding a fixture that exercises all 8 stages would be a nice follow-up but isn't blocking.

LGTM — clean, minimal fix that addresses the root cause.

@rockygeekz
Copy link
Copy Markdown

pre-commit.ci run

1 similar comment
@rockygeekz
Copy link
Copy Markdown

pre-commit.ci run

@NilashishC NilashishC merged commit e9b6a5d into main Apr 28, 2026
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants