Skip to content

fix(ci): Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation to check for manifest list platforms - #3880

Merged
rm3l merged 9 commits into
mainfrom
revert-3840-renovate/main-all-minor
Oct 17, 2026
Merged

rm3l merged 9 commits into
mainfrom
revert-3840-renovate/main-all-minor

Conversation

@rm3l

@rm3l rm3l commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Reverts #3840

Looks like hermetic images are failing to build in CI: https://github.com/redhat-developer/rhdh-operator/actions/runs/38980295472/job/117389863743

Fetching dependencies with hermeto
    + podman run --rm -v /home/runner/work/rhdh-operator/rhdh-operator:/source:z -v /tmp/hermeto-cache/operator:/cachi2:z -w /source quay.io/konflux-ci/hermeto:0.63.0 --log-level DEBUG fetch-deps --source . --output /cachi2/output '[{"type": "rpm", "path": "."}, {"type": "gomod", "path": "."}]'
    Trying to pull quay.io/konflux-ci/hermeto:0.63.0...
    Error: choosing an image from manifest list docker://quay.io/konflux-ci/hermeto:0.63.0: no image found in manifest list for architecture arm64, variant "v8", OS linux
    Error: Process completed with exit code 125.

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-46c984a quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-46c984a quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-46c984a quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

rm3l added 3 commits October 17, 2026 14:24
Extend validate-image-digests.sh to also check images referenced in
the Makefile (annotated with "# renovate: datasource=docker"), such as
Hermeto. This catches automated dependency bumps that switch to a
single-arch image before they break cross-platform builds.

Assisted-by: Claude
A manifest list can technically contain only a single platform (e.g.,
hermeto:0.63.0 is amd64-only despite being a manifest list). Check
that both amd64 and arm64 are present rather than just verifying the
manifest type.

Assisted-by: Claude
Replace path-based trigger filtering with tj-actions/changed-files so
the workflow always runs and reports a status on every PR, enabling it
to be configured as a required check. The actual validation step is
skipped when no relevant files changed.

Assisted-by: Claude
Comment thread hack/validate-image-digests.sh Fixed
Use read -ra instead of unquoted array expansion to split
REQUIRED_ARCHES without triggering word splitting warnings.

Assisted-by: Claude
@rm3l rm3l changed the title Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation script to check for manifest list platforms Oct 17, 2026
@rm3l

rm3l commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

/agentic_review

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1)



View low (1)
🟡 **Low**
1. Duplicate image argument hides its Dockerfile source 🐞 Bug ⭐ New
Description
When an image passed as a script argument (now HERMETO_IMAGE via the Makefile) matches a digest
reference already collected from a Dockerfile, the argument-processing loop unconditionally
overwrites digests_files_map[$image_ref] with the literal string "(argument)" instead of appending
to the existing provenance list like the Dockerfile-parsing loop does. This causes the validation
report (success or failure) to lose track of which Dockerfile(s) actually reference the image,
making it harder to locate and fix an architecture or digest problem when it is reported.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new loop that registers image references passed as script arguments (e.g. `HERMETO_IMAGE`) unconditionally overwrites `digests_files_map[$image_ref]` with the literal string `(argument)`, discarding any existing Dockerfile provenance recorded for the same image reference by the earlier Dockerfile-parsing loop.

## Fix Focus Areas
- hack/validate-image-digests.sh[111-116]

## Recommended Fix
Mirror the append logic used for Dockerfile-sourced duplicates (hack/validate-image-digests.sh[94-100]): before assigning, check if `digests_files_map[$image_ref]` is already set and, if so, append `|(argument)` to the existing value instead of replacing it, so the final report still lists the originating Dockerfile(s) alongside the argument source.

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

Dismiss ↗ | View ↗



Resolved findings
1. Build overrides validate a stale image ✓ Resolved
Description
The script extracts HERMETO_IMAGE from the literal ?= assignment instead of reading the
effective Make variable. When a caller supplies make HERMETO_IMAGE=... validate-image-digests, the
validator still inspects the default image, so it can both miss an invalid override and report
failures for an image that will not be used.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The validator parses the default `HERMETO_IMAGE ?=` assignment from `Makefile`, ignoring command-line and environment overrides that Make applies when running the validation target.

## Fix Focus Areas
- hack/validate-image-digests.sh[116-125]
- Makefile[225-229]

## Recommended Fix
Pass the effective `HERMETO_IMAGE` value from the Make target to the validation script, or otherwise evaluate the Make variable through GNU Make rather than parsing the source assignment. Ensure `make HERMETO_IMAGE=<override> validate-image-digests` validates the overridden image.

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


2. Unsupported Linux images pass validation ✓ Resolved
Description
When jq is unavailable, the fallback in main treats any occurrence of an architecture string in
the raw manifest as proof that the required Linux platform exists. An index containing
windows/amd64 and linux/arm64, but no linux/amd64, therefore passes the default architecture
check.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Without `jq`, the architecture check searches the entire manifest text and can accept an architecture that exists only for a non-Linux platform.

## Fix Focus Areas
- hack/validate-image-digests.sh[167-180]

## Recommended Fix
Make `jq` required and fail validation when it is unavailable, or replace the fallback with a parser that verifies `platform.os` and `platform.architecture` together for each manifest entry.

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


3. Architecture errors can be displayed unreliably ✓ Resolved
Description
The validation script expands ${REQUIRED_ARCHES[*]} unquoted when printing the required
architectures. If the environment-provided architecture names contain whitespace or glob characters,
word splitting or pathname expansion changes the displayed value and can mislead operators
diagnosing a failed validation.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The validation script prints `${REQUIRED_ARCHES[*]}` without quotes, allowing word splitting and pathname expansion to alter diagnostic output.

## Fix Focus Areas
- hack/validate-image-digests.sh[192-195]

## Recommended Fix
Quote the array expansion when displaying the required architectures, using `"${REQUIRED_ARCHES[*]}"` or an equivalent deliberate join that preserves the intended diagnostic text.

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



rm3l added 2 commits October 17, 2026 14:51
Replace single-bracket conditionals with double-bracket to satisfy
SonarCloud warnings.

Assisted-by: Claude
Make jq a required dependency instead of falling back to grep, which
could incorrectly match architectures from non-Linux platforms.
Also quote ${REQUIRED_ARCHES[*]} in diagnostic output.

Assisted-by: Claude
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-022b223 quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-022b223 quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-022b223 quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

@rm3l

rm3l commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

/agentic_review

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.43%. Comparing base (7afe3c1) to head (56e8a54).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3880   +/-   ##
=======================================
  Coverage   60.43%   60.43%           
=======================================
  Files          52       52           
  Lines        3672     3672           
=======================================
  Hits         2219     2219           
  Misses       1257     1257           
  Partials      196      196           
Flag Coverage Δ
nightly ?
unittests 60.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-5256dc5 quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-5256dc5 quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-5256dc5 quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

Pass HERMETO_IMAGE from the Make target so the script validates the
effective value after command-line and environment overrides, instead
of always parsing the default assignment from the Makefile source.

Assisted-by: Claude
@rm3l

rm3l commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

/agentic_review

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-a8a7bb2 quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-a8a7bb2 quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-a8a7bb2 quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

Replace MAKEFILE_IMAGE_VARS indirection with plain script arguments.
The Makefile target passes the resolved image value directly, making
the script simpler and agnostic of Makefile variable names.

Assisted-by: Claude
@sonarqubecloud

Copy link
Copy Markdown

@rm3l

rm3l commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

/agentic_review

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

@rm3l rm3l changed the title Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation script to check for manifest list platforms fix(ci): Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation script to check for manifest list platforms Oct 17, 2026
@rm3l
rm3l marked this pull request as ready for review October 17, 2026 13:23
@rm3l
rm3l requested a review from a team as a code owner October 17, 2026 13:23
@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Restore multi-arch Hermeto and validate image platforms in CI

🐞 Bug fix ✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes


AI Description

• Revert the Hermeto upgrade that broke arm64 hermetic builds.
• Validate that Dockerfile images and the configured Hermeto image support both linux/amd64 and
 linux/arm64.
• Report the CI check on every targeted PR, running validation only when relevant files change.
Diagram

graph TD
  PR["Targeted PR"] --> Filter{"Relevant files?"} -->|yes| Make["Make target"] --> Validate["Image validation"] --> Skopeo["Registry inspection"] --> Check["CI check"]
  Filter -->|no| Check
  Hermeto["Hermeto image"] --> Make
  Dockerfiles["Dockerfile images"] --> Validate
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Test pulls on both architectures
  • ➕ Verifies that each platform image can actually be pulled.
  • ➖ Requires architecture-specific runners or emulation and makes the check slower.

Recommendation: Keep manifest inspection as the fast PR gate: checking the listed platforms catches the amd64-only Hermeto regression that a manifest-type check missed. Cross-architecture pull tests would provide stronger assurance but are disproportionate for this check.

Files changed (3) +81 / -37

Bug fix (2) +62 / -30
MakefileRevert Hermeto and include it in image validation +2/-2

Revert Hermeto and include it in image validation

• Restores the Hermeto image from 0.63.0 to 0.62.0 after the newer tag failed on arm64. Passes the configured Hermeto image to the validation script alongside its existing Dockerfile checks.

Makefile

validate-image-digests.shRequire both target architectures in image manifest lists +60/-28

Require both target architectures in image manifest lists

• Accepts additional image references as arguments and requires jq for manifest parsing. Checks that each manifest list contains Linux amd64 and arm64 entries, rejecting lists that omit either architecture.

hack/validate-image-digests.sh

Other (1) +19 / -7
validate-image-digests.yamlAlways report the image-validation check on targeted PRs +19/-7

Always report the image-validation check on targeted PRs

• Replaces workflow-level path filtering with a changed-files step, so the job reports a status for PRs targeting main or matching release branches. Validation runs only when the workflow, Makefile, script, or specified Dockerfiles change.

.github/workflows/validate-image-digests.yaml

@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator:2.2.0-pr-3880
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator-bundle:2.2.0-pr-3880
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880-56e8a54 quay.io/rhdh-community/operator-catalog:2.2.0-pr-3880

@rm3l rm3l changed the title fix(ci): Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation script to check for manifest list platforms fix(ci): Revert "chore(deps): update quay.io/konflux-ci/hermeto docker tag to v0.63.0 (main)" and harden image validation to check for manifest list platforms Oct 17, 2026
@rm3l
rm3l merged commit 2790117 into main Oct 17, 2026
16 of 17 checks passed
@rm3l
rm3l deleted the revert-3840-renovate/main-all-minor branch October 17, 2026 13:34
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