Skip to content

[chore] Only override RHDH and catalog images in nightly checks - #210

Merged
rm3l merged 5 commits into
redhat-developer:mainfrom
rm3l:fix/pr-checks-no-image-override
May 18, 2026
Merged

[chore] Only override RHDH and catalog images in nightly checks#210
rm3l merged 5 commits into
redhat-developer:mainfrom
rm3l:fix/pr-checks-no-image-override

Conversation

@rm3l

@rm3l rm3l commented May 18, 2026

Copy link
Copy Markdown
Member

Description

PR checks currently override RHDH_IMAGE and CATALOG_INDEX_IMAGE in .env, but they should use the defaults from compose.yaml/default.env. Only nightly checks need to override these images with branch-derived next/next-* tags.

This adds an override_images input to the composite action (defaults to "false"), and only the nightly workflow passes override_images: "true".

Which issue(s) does this PR fix or relate to

N/A

PR acceptance criteria

  • Tests updated and passing
  • Documentation updated
  • Built-in TechDocs updated if needed. Note that TechDocs changes may need to be reviewed by a Product Manager and/or Architect to ensure content accuracy, clarity, and alignment with user needs.

How to test changes / Special notes to the reviewer

  • Verify PR CI checks pass using default images from compose.yaml
  • Trigger a nightly workflow run and verify it still overrides images with next/next-* tags

PR checks should use the default images from compose.yaml/default.env.
Only nightly checks need to override RHDH_IMAGE and CATALOG_INDEX_IMAGE
with the branch-derived next/next-* tags.

Assisted-by: Claude
@rhdh-qodo-merge

rhdh-qodo-merge Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. override_images ignored by compose ✓ Resolved 🐞 Bug ≡ Correctness
Description
override_images only controls whether values are appended to .env, but RHDH_IMAGE is still
exported to GITHUB_ENV unconditionally, so docker/podman compose continues to substitute
${RHDH_IMAGE} and override the default image in non-nightly runs. This defeats the PR’s stated
goal that PR checks use the defaults from compose.yaml/default.env.
Code

.github/actions/rhdh-local-compose-test/action.yaml[R159-166]

+      env:
+        OVERRIDE_IMAGES: ${{ inputs.override_images }}
      run: |
-        echo "CATALOG_INDEX_IMAGE=${{ env.CATALOG_INDEX_IMAGE }}" > .env
-        echo "RHDH_IMAGE=${{ env.RHDH_IMAGE }}" >> .env
+        touch .env
+        if [ "$OVERRIDE_IMAGES" = "true" ]; then
+          echo "CATALOG_INDEX_IMAGE=${{ env.CATALOG_INDEX_IMAGE }}" >> .env
+          echo "RHDH_IMAGE=${{ env.RHDH_IMAGE }}" >> .env
+        fi
Relevance

⭐⭐⭐ High

Compose defaults/optional .env precedence is a repo goal (PR #35); CI action correctness tweaks
commonly accepted (PR #180).

PR-#35
PR-#180

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Even when .env is empty, compose.yaml will use the exported RHDH_IMAGE environment variable
for image: substitution, so non-nightly workflows still override the image tag despite
override_images defaulting to false.

.github/actions/rhdh-local-compose-test/action.yaml[51-65]
compose.yaml[24-31]
.github/workflows/test.yml[61-70]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`override_images` currently only gates `.env` writes, but the action still sets `RHDH_IMAGE` in `$GITHUB_ENV` for every run. Since `compose.yaml` uses `image: ${RHDH_IMAGE:-...}`, that environment variable will override the default image even when `override_images` is `false`.

### Issue Context
- `test.yml` (PR checks) does **not** pass `override_images`, so it uses the default (`"false"`).
- The action always exports `RHDH_IMAGE` based on `git_ref`.
- `compose.yaml` uses `${RHDH_IMAGE:-quay.io/rhdh-community/rhdh:1.9}` for the service image, so any exported `RHDH_IMAGE` overrides the intended default.

### Fix Focus Areas
- .github/actions/rhdh-local-compose-test/action.yaml[51-78]
- .github/actions/rhdh-local-compose-test/action.yaml[157-168]

### Implementation guidance
- Add `OVERRIDE_IMAGES: ${{ inputs.override_images }}` to the **"Set RHDH tag, image and catalog index"** step and only `echo "RHDH_IMAGE=..." >> $GITHUB_ENV` (and `RHDH_TAG` if needed) when `OVERRIDE_IMAGES == "true"`.
- Alternatively, if you still need `RHDH_TAG` for logging, avoid exporting `RHDH_IMAGE` unless `override_images` is true.
- Ensure nightly keeps passing `override_images: "true"` so behavior remains unchanged there.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Make image overrides conditional in composite action

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add override_images input to composite action for conditional image overrides
• PR checks now use default images from compose.yaml/default.env
• Only nightly workflow overrides RHDH and catalog images with branch-derived tags
• Prevents unnecessary image overrides in standard CI checks
Diagram
flowchart LR
  A["PR Checks"] -- "uses defaults" --> B["compose.yaml/default.env"]
  C["Nightly Workflow"] -- "override_images: true" --> D["Composite Action"]
  D -- "conditional override" --> E["RHDH_IMAGE & CATALOG_INDEX_IMAGE"]
Loading

Grey Divider

File Changes

1. .github/actions/rhdh-local-compose-test/action.yaml ✨ Enhancement +11/-2

Add conditional image override input to action

• Added new override_images input parameter (defaults to "false")
• Modified .env file creation to conditionally write image overrides
• Only writes CATALOG_INDEX_IMAGE and RHDH_IMAGE when override_images is "true"
• Preserves existing rhdh_tag_override input functionality

.github/actions/rhdh-local-compose-test/action.yaml


2. .github/workflows/nightly.yaml ⚙️ Configuration changes +1/-0

Enable image overrides in nightly workflow

• Added override_images: "true" parameter to composite action invocation
• Enables image overrides only for nightly workflow runs
• Maintains default behavior for other workflow triggers

.github/workflows/nightly.yaml


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added enhancement New feature or request Tests labels May 18, 2026
rm3l added 4 commits May 18, 2026 11:23
…ride_images is false

The previous commit only guarded the .env file, but the env vars
exported via GITHUB_ENV were still picked up by docker compose.

Assisted-by: Claude
@sonarqubecloud

Copy link
Copy Markdown

@OpinionatedHeron OpinionatedHeron mentioned this pull request May 18, 2026
3 tasks
@rm3l
rm3l requested a review from OpinionatedHeron May 18, 2026 14:30

@OpinionatedHeron OpinionatedHeron left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@rm3l

rm3l commented May 18, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-1.10
/cherry-pick release-1.9
/cherry-pick release-1.8

To backport also, but ideally after #180 has been correctly backported into the respective branches.

@openshift-ci openshift-ci Bot added the lgtm label May 18, 2026
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: once the present PR merges, I will cherry-pick it on top of release-1.10, release-1.8, release-1.9 in new PRs and assign them to you.

Details

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9
/cherry-pick release-1.8

To backport, but ideally after #180 has been correctly backported into the respective branches.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rm3l

rm3l commented May 18, 2026

Copy link
Copy Markdown
Member Author

Merging. Tests will be fixed by #212

@rm3l
rm3l merged commit d02bb28 into redhat-developer:main May 18, 2026
13 of 23 checks passed
@rm3l
rm3l deleted the fix/pr-checks-no-image-override branch May 18, 2026 14:34
@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: #210 failed to apply on top of branch "release-1.9":

Applying: Only override RHDH and catalog images in nightly checks
Using index info to reconstruct a base tree...
A	.github/actions/rhdh-local-compose-test/action.yaml
A	.github/workflows/nightly.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/nightly.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/workflows/nightly.yaml left in tree.
CONFLICT (modify/delete): .github/actions/rhdh-local-compose-test/action.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/actions/rhdh-local-compose-test/action.yaml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Only override RHDH and catalog images in nightly checks

Details

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9
/cherry-pick release-1.8

To backport also, but ideally after #180 has been correctly backported into the respective branches.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: #210 failed to apply on top of branch "release-1.8":

Applying: Only override RHDH and catalog images in nightly checks
Using index info to reconstruct a base tree...
A	.github/actions/rhdh-local-compose-test/action.yaml
A	.github/workflows/nightly.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/nightly.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/workflows/nightly.yaml left in tree.
CONFLICT (modify/delete): .github/actions/rhdh-local-compose-test/action.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/actions/rhdh-local-compose-test/action.yaml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Only override RHDH and catalog images in nightly checks

Details

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9
/cherry-pick release-1.8

To backport also, but ideally after #180 has been correctly backported into the respective branches.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: #210 failed to apply on top of branch "release-1.10":

Applying: Only override RHDH and catalog images in nightly checks
Using index info to reconstruct a base tree...
A	.github/actions/rhdh-local-compose-test/action.yaml
A	.github/workflows/nightly.yaml
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): .github/workflows/nightly.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/workflows/nightly.yaml left in tree.
CONFLICT (modify/delete): .github/actions/rhdh-local-compose-test/action.yaml deleted in HEAD and modified in Only override RHDH and catalog images in nightly checks. Version Only override RHDH and catalog images in nightly checks of .github/actions/rhdh-local-compose-test/action.yaml left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Only override RHDH and catalog images in nightly checks

Details

In response to this:

/cherry-pick release-1.10
/cherry-pick release-1.9
/cherry-pick release-1.8

To backport also, but ideally after #180 has been correctly backported into the respective branches.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rm3l

rm3l commented May 18, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-1.10

@openshift-cherrypick-robot

Copy link
Copy Markdown
Contributor

@rm3l: new pull request created: #213

Details

In response to this:

/cherry-pick release-1.10

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

OpinionatedHeron added a commit that referenced this pull request May 26, 2026
* [chore] Adding nightly tests against next RHDH tag (#180)

Signed-off-by: Leanne Ahern <lahern@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com?

* [chore] Only override RHDH and catalog images in nightly checks (#210)

---------

Signed-off-by: Leanne Ahern <lahern@redhat.com>
Co-authored-by: Armel Soro <asoro@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants