Skip to content

CAMEL-26492: check multi-arch manifest before proposing container upgrades - #29149

Merged
davsclaus merged 7 commits into
apache:mainfrom
gnodet:fix/CAMEL-26492-check-multiarch
Nov 6, 2026
Merged

davsclaus merged 7 commits into
apache:mainfrom
gnodet:fix/CAMEL-26492-check-multiarch

Conversation

@gnodet

@gnodet gnodet commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The container version checker was proposing upgrades even when the new image tag lacked linux/s390x or linux/ppc64le support. This broke CI on those architectures.

Changes

  • check-container-versions.py

    • Add module-level REQUIRED_ARCHITECTURES = ['linux/s390x', 'linux/ppc64le']
    • Extract shared ContainerRegistryAPI._parse_manifest_list and _fetch_manifest helpers (removes three copies of identical manifest-parsing logic; also handles 401 → Bearer challenge re-authentication automatically for registries like ghcr.io and docker.elastic.co that require a token even for public images)
    • Add ContainerRegistryAPI._bearer_token_from_challenge to parse Www-Authenticate Bearer challenges and exchange them for anonymous tokens
    • DockerHubAPI.check_architectures and QuayAPI.check_architectures now delegate to the shared helpers instead of duplicating the manifest-fetch logic
    • Add GCRAPI.check_architectures override that uses the image's original registry URL (e.g. mirror.gcr.io) instead of normalising to gcr.io: mirror.gcr.io answers manifest requests anonymously (200) while gcr.io returns 401 for public images, causing the check to pass silently
    • Single-arch manifests (no manifests key in the response, or a schema1 manifest) now count as arch-missing and block the upgrade, rather than silently allowing it
    • The arch check now targets latest_version (= sorted_versions[0], the version the workflow actually bumps to) instead of newer_versions[0], which could be a pre-release filtered out before the bump
    • ContainerImage gains arch_overrides: List[str] (the specific linux/<arch> entries that have explicit arch-specific property siblings) and skipped_arches: List[str] (arches with skipITs.<arch>=true in the nearest module pom.xml); the arch check is now per-arch precise: only arches not covered by either list are checked against the manifest
    • Add ContainerVersionChecker._read_skip_its_from_pom that walks up the directory tree from each container.properties file, finds the nearest pom.xml, and reads skipITs.ppc64le / skipITs.s390x properties
    • Add ContainerVersionChecker._build_component_skip_its_map that pre-scans all pom.xml files from the repository root at startup, building a map from camel-test-infra-X artifact IDs to the intersection of skipped arches across all consumer component poms (e.g. components/camel-elasticsearch-rest-client/pom.xml). An arch is only exempt when every consumer skips it (intersection, not union). Poms under test-infra/camel-test-infra-* directories are excluded from the scan — they are test-infra module poms, not consumer poms, and aggregator poms like camel-test-infra-all would otherwise veto all exemptions. parse_properties_file merges these with the local pom walk-up result, so images whose skipITs only appear in the component pom (not the test-infra module pom) are correctly exempted
    • Arch-override sibling keys (e.g. keycloak.container.ppc64le) are no longer parsed as standalone images and subjected to their own version/arch check; they are arch-specific registry references, not independent images
    • Remove duplicate import re as _re inside helper functions; use the top-level re import throughout
    • VersionCheckResult gains an arch_missing field. When the top candidate lacks required architectures, newer_versions is cleared so no PR is opened, and arch_missing is populated for reporting. When the arch check cannot be verified (e.g. authentication fails and the registry returns no index), arch_unverified is set and the step summary reports the image as unverified rather than silently passing
    • print_results adds a dedicated «ARCH-INCOMPLETE IMAGES» section
    • output_json includes arch_missing and arch_unverified in the JSON payload
    • Add --skip-arch-check CLI flag to bypass the verification
  • check-container-versions.yml

    • GHA step summary now reports the count of arch-blocked images and lists any unverified images
  • pr-ci-scripts-validation.yml

    • Add pip install -r requirements.txt step before python3 -m unittest discover so colorama (and other deps) are available when the tests import the main script
  • test_check_container_versions.py (updated: 19 → 44 unit tests)

    • New tests: test_arch_check_targets_latest_version_not_just_newer, test_partial_arch_override_still_checks_unoverridden_arch, test_skipped_arches_exempted_from_check
    • test_returns_empty_on_single_arch_manifest renamed to test_returns_missing_arches_on_single_arch_manifest and assertion updated to expect the required arches as missing
    • New class ReadSkipItsPomTest (3 tests) for _read_skip_its_from_pom
    • New class BearerTokenChallengeTest (3 tests) for _bearer_token_from_challenge
    • New class GCRAPICheckArchitecturesTest (2 tests) for GCRAPI.check_architectures: verifies that mirror.gcr.io is used as-is in the manifest URL, and that single-arch manifests are blocked
    • New class ComponentSkipItsMapTest (4 tests) for _build_component_skip_its_map: verifies discovery of skipped arches from component poms, correct handling of no-skipITs cases, merging across multiple poms, and that camel-test-infra-all aggregator poms are excluded from the intersection
    • New class RunCheckRepoRootTest (offline, fully mocked): verifies that _build_component_skip_its_map is built from the repo root (not the scan path), so component poms under components/ are found even when scanning test-infra/; check_image_versions is patched so the test runs offline with unconditional assertions

…rades

The container version checker proposed upgrades even when the new image
tag lacked linux/s390x or linux/ppc64le support, breaking CI on those
architectures.

Changes:
- Add a module-level REQUIRED_ARCHITECTURES constant ['linux/s390x', 'linux/ppc64le']
- Add ContainerRegistryAPI.check_architectures(image, tag) that calls the
  Docker Registry v2 manifest list endpoint (GET /v2/<repo>/manifests/<tag>
  with Accept: application/vnd.docker.distribution.manifest.list.v2+json)
  and returns the required architectures absent from the manifest.
- DockerHubAPI overrides check_architectures to obtain an anonymous Bearer
  token from auth.docker.io before fetching the manifest.
- QuayAPI overrides check_architectures to use the quay.io/v2/... endpoint.
- ContainerImage gains a has_arch_override flag that is set when the
  properties file already declares an arch-specific sibling (e.g.
  keycloak.container.ppc64le). Such images are exempt from the check.
- VersionCheckResult gains an arch_missing field. When the top candidate
  is missing required architectures, newer_versions is left empty so no
  PR is opened for that image; arch_missing is populated for reporting.
- print_results shows a dedicated 'ARCH-INCOMPLETE IMAGES' section.
- output_json includes arch_missing in the JSON payload.
- Add --skip-arch-check CLI flag to bypass the verification.
- GHA workflow step summary reports the number of arch-blocked images.
- Add test_check_container_versions.py with 19 unit tests covering all
  new code paths.
@gnodet gnodet added dependencies Pull requests that update a dependency file container-images For check container upgrades labels Nov 4, 2026
@gnodet
gnodet requested review from davsclaus and oscerd November 4, 2026 09:21
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

apupier
apupier previously requested changes Nov 4, 2026

@apupier apupier left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also need to adapt the multi-arch check based on if the related tests are skipped on s390x and ppc64le. or as a first iteration, to create the PR even if the multi-arch is not available but providing a big warning to let end-users check if there is the need for these architectures or not.

EDIT: so checking in dependent modules if skipITs.ppc64le and skipITs.s390x is set to true

@gnodet-bot

Copy link
Copy Markdown
Contributor

✅ Local unit-test results for bfdfbdefa685c31d6c14b80de00c6b5d1b468259

This PR modifies the Python container-version-checker tooling — no Java integration tests apply. I ran the new unit test suite locally instead.

Test file: test_check_container_versions.py
Result: 19/19 tests passed ✅

Test output
test_arch_missing_included_in_json_output ... ok
test_upgrade_blocked_when_arch_missing ... ok
test_upgrade_proposed_when_all_arches_present ... ok
test_upgrade_proposed_when_has_arch_override ... ok
test_upgrade_proposed_when_skip_arch_check ... ok
test_returns_both_missing ... ok
test_returns_empty_on_exception ... ok
test_returns_empty_on_non_200 ... ok
test_returns_empty_on_single_arch_manifest ... ok
test_returns_empty_when_all_arches_present ... ok
test_returns_missing_ppc64le ... ok
test_official_image_uses_library_prefix ... ok
test_uses_token_for_manifest_fetch ... ok
test_arch_override_property_itself_not_in_returned_images ... ok
test_has_arch_override_set_when_ppc64le_sibling_present ... ok
test_has_arch_override_set_when_s390x_sibling_present ... ok
test_no_arch_override_when_no_arch_sibling ... ok
test_uses_v2_manifest_endpoint ... ok
test_required_architectures_includes_s390x_and_ppc64le ... ok

----------------------------------------------------------------------
Ran 19 tests in 0.053s

OK

Local unit tests run by Hermes on behalf of @gnodet
This PR has no test-infra container.properties changes — no Docker integration tests to run

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for picking this up; checking the manifest list before proposing an upgrade is the right place for it. Adding to @apupier's review:

(1) The CI failure comes from this PR: pr-ci-scripts-validation.yml runs the unittest discovery without installing requirements.txt, so importing the script fails on colorama (check-container-versions.py:112). Installing the requirements there, as check-container-versions.yml:57 does, should fix it.

(2) The check fails open in exactly the cases it is meant to catch. A 200 without manifests (lines 348/394/465) is a single-arch image: for example, mcr.microsoft.com mssql/server answers with a schema1 manifest for this Accept header. A non-200 (342/390/461) is what ghcr.io and docker.elastic.co return without a token, and test-infra uses both. Could a single manifest count as "required archs missing", the 401 Bearer handshake be done, and a truly unverifiable result still open the PR but with a visible "multi-arch not verified" warning?

(3) The check verifies newer_versions[0] (line 1070), but the workflow bumps to latest_version (check-container-versions.yml:142/161). That is sorted_versions[0] (line 1056) and can be a pre-release that newer_versions filtered out, so the tag checked may not be the tag proposed.

(4) has_arch_override (lines 893-906, 940) exempts every required arch when any arch sibling exists, and most overrides are .ppc64le only (keycloak, mongodb, neo4j, pulsar, elasticsearch...), so s390x is never checked for them. Subtracting only the overridden archs, together with the skipITs.<arch> point from @apupier, would make the exemption precise.

Small things: media_type (line 346) is unused, and the three copies of the manifest parsing could share one helper.

Claude Code on behalf of Claus Ibsen (davsclaus). This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@gnodet
gnodet requested review from apupier and davsclaus November 4, 2026 14:05

@oscerd oscerd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Solid, and the fail-closed posture is exactly right for this. When latest_version (the tag the workflow actually bumps to) is missing a required arch, clearing newer_versions and setting is_latest=True means the bot simply does not propose the upgrade, rather than proposing one that would break s390x/ppc64le CI. The exemption set is also correct: the union of arch_overrides and skipped_arches is subtracted before the check, so an arch that has an explicit *.ppc64le property sibling or skipITs.ppc64le=true in the nearest pom is not treated as missing. Targeting sorted_versions[0] instead of newer_versions[0] is the right call too, since a filtered-out pre-release should not be what you verify.

Test coverage is the strong point here: CheckImageVersionsArchGatingTest exercises each decision directly (blocked-when-missing, exempt-on-override, exempt-on-skipITs, targets-latest-not-newer, the --skip-arch-check bypass, and the JSON field), and the Bearer-challenge and pom-reading helpers each get their own tests. The 401 to Bearer re-auth for ghcr.io / docker.elastic.co is a nice robustness touch.

One non-blocking note: the conservatism is whole-list, so if sorted_versions[0] fails the arch check but an older entry in newer_versions is actually arch-complete, that older upgrade is skipped too. The comment calls this out, and skipping a real upgrade is clearly the safe side to err on, so no change needed. LGTM.

Claude Code on behalf of oscerd

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update. (1), (3) and the per-arch override exemption from (4) are fixed, and the Bearer handshake works: docker.elastic.co and ghcr.io both give an anonymous token and then the index. Still open:

  • mirror.gcr.io images are never checked (check-container-versions.py:314-315, used for the manifest URL). normalize_registry_url turns mirror.gcr.io into gcr.io, and https://gcr.io/v2/apache/kafka/manifests/3.9.1 answers 401; the challenge gives an empty anonymous token and the retry is 401 again, so the check passes. https://mirror.gcr.io/v2/apache/kafka/manifests/3.9.1 answers 200 anonymously with the index. That covers most of the test-infra images. Could we use mirror.gcr.io as is for manifests, and add a test for it?
  • Single-arch is still "nothing missing" (lines 423/455/515; test_returns_empty_on_single_arch_manifest asserts it), and there is no "multi-arch not verified" warning when the check cannot run. A manifest without manifests (or schema1 with a top-level architecture) means one arch only, so it can count as missing.
  • skipITs is read from the test-infra module pom (_read_skip_its_from_pom, :911). Only 1 of the 58 poms that set skipITs.ppc64le/skipITs.s390x is a test-infra pom; the rest are the component poms @apupier mentioned. With the new fail-closed path, elasticsearch (9.1.0 is amd64/arm64 only; both dependent components skip s390x) and spire-server/agent (camel-spiffe skips both arches) would never be proposed again. Options: read the poms that depend on camel-test-infra-<x>; only block when the new tag drops an arch the current tag has; or open the PR with a prominent warning, as @apupier suggested first.
  • Minor: the *.ppc64le override properties are checked as images themselves, so they would need s390x. They pass today only because icr.io answers schema1; skipping the check for keys that are themselves arch overrides would avoid that. Nit: import re as _re at :385/:936 duplicates the top-level import re.

Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

…ecker

- Fix mirror.gcr.io manifest checks: add GCRAPI.check_architectures override
  that uses the image's original registry (mirror.gcr.io) instead of normalising
  to gcr.io, which returns 401 for public images
- Fix single-arch manifests: a response with no 'manifests' key (schema1 or
  single-arch) now correctly reports all REQUIRED_ARCHITECTURES as missing,
  rather than silently allowing the upgrade
- Detect skipITs.<arch> from component poms: add _build_component_skip_its_map
  that pre-scans all pom.xml files in the scan path at startup, building a map
  from camel-test-infra-X artifact IDs to their consumer component's skipped
  arches. parse_properties_file merges these with the local pom walk-up result.
- Skip arch-override sibling keys (e.g. keycloak.container.ppc64le) from being
  parsed as standalone images; they are arch-specific registry references, not
  independent images to be version-checked
- Remove duplicate 'import re as _re' inside functions; use the top-level 're'
- Tests: rename test_returns_empty_on_single_arch_manifest to
  test_returns_missing_arches_on_single_arch_manifest and update assertion;
  add GCRAPICheckArchitecturesTest (mirror.gcr.io, single-arch);
  add ComponentSkipItsMapTest (3 cases for _build_component_skip_its_map)
  Total: 28 → 33 unit tests

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update. Addressed since my last review:

  • mirror.gcr.io: GCRAPI.check_architectures uses image.registry as is, with a test.
  • Single-arch manifests: a payload without manifests now counts as missing in all four check_architectures implementations.
  • Arch-override keys: keys like keycloak.container.ppc64le are no longer checked as images.
  • The import re as _re duplicates are gone.

Still open:

  1. The component skipITs map is empty in CI. run_check builds it with _build_component_skip_its_map(scan_path) (check-container-versions.py:1344), which only searches below scan_path, and the workflow scans test-infra by default (check-container-versions.yml:62/74). Of the poms that set skipITs.ppc64le/skipITs.s390x to true, nearly all are component poms (e.g. components/camel-elasticsearch*/pom.xml, components/camel-spiffe/pom.xml), so elasticsearch and spire are still never proposed. ComponentSkipItsMapTest passes because it writes components/... inside its own temporary scan directory. Could the map be built from the repository root (walk up from scan_path to the directory containing components/, or a --repo-root option)? A test running run_check with scan_path=<root>/test-infra would cover it.

  2. Union across consumers exempts too much once (1) works. _build_component_skip_its_map collects every arch that any consumer pom skips (test_merges_arches_from_multiple_poms asserts that). A pom-level skipITs usually exists because of one of the module's services, not every camel-test-infra-* it depends on. E.g. camel-test-infra-postgres would lose s390x because of camel-pgvector, although camel-sql, camel-jta and camel-pg-replication-slot run there; camel-test-infra-artemis would lose s390x because of camel-activemq/camel-paho-mqtt5, while camel-jms, camel-sjms, camel-amqp still run there. A tag that drops s390x would then be proposed and break those ITs. Exempting an arch only when every consumer skips it (an intersection) keeps the elasticsearch and spiffe cases working without this gap.

  3. The "not verified" case is still silent. When the check cannot run (non-200 after the token retry, network error, unknown format), check_architectures returns [] and the PR opens with no warning. A short "multi-arch not verified" line in the PR body or step summary would be enough.

Claude Code on behalf of Claus Ibsen (davsclaus). This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

…epo-root scan, unverified warning)

- Fix Issue 1: Build the component skipITs map from the repository root
  (not just scan_path) so that component poms under components/ are found
  even when scanning test-infra/. Added _find_repo_root() helper that walks
  up to the directory containing components/ or .git. Also filter out
  test-infra module poms that declare their own artifactId (not consumers).

- Fix Issue 2: Change _build_component_skip_its_map to use intersection
  instead of union across consumer modules. An arch is now only exempted
  when EVERY consumer pom that references a test-infra module skips it.
  This prevents camel-test-infra-postgres from losing s390x just because
  camel-pgvector skips it while camel-sql, camel-jta etc. still need it.

- Fix Issue 3: Add arch_unverified field to VersionCheckResult. When
  check_architectures cannot verify (network error, auth failure, unknown
  format), it now returns None instead of []. The upgrade is still proposed
  but arch_unverified=true is set, which triggers a warning in the step
  summary and human-readable output. Also added to JSON output.

Co-authored-by: Claude <noreply@anthropic.com>
@gnodet

gnodet commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

✅ Review issues addressed in f46fc36

All three remaining review issues have been fixed and 43/43 tests pass.

Issue 1: skipITs map empty in CI (repo-root scan)

  • Added _find_repo_root() helper that walks up from scan_path to find the repo root (directory containing components/ or .git)
  • run_check() now builds the skipITs map from the repo root, not just scan_path, so component poms under components/ are found even when scanning test-infra/
  • Also filters out test-infra module poms that declare their own artifactId (not consumers)
  • Added tests: FindRepoRootTest (3 tests), RunCheckRepoRootTest (1 integration test)

Issue 2: Union → Intersection for skipITs across consumers

  • _build_component_skip_its_map now uses intersection across all consumer modules: an arch is only exempted when every consumer that references a test-infra module skips it
  • e.g. camel-test-infra-postgres keeps s390x because camel-sql (no skipITs) intersects with camel-pgvector (skipITs.s390x=true) → empty intersection
  • Added tests: test_intersection_across_consumers_not_union, test_intersection_all_consumers_skip_same_arch, test_consumer_without_skip_its_clears_exemption

Issue 3: "Not verified" case now visible

  • check_architectures() returns None (not []) when the check cannot be performed (network error, auth failure, unknown format)
  • Added arch_unverified field to VersionCheckResult (default False)
  • When None is returned, upgrade is still proposed but arch_unverified=true is set
  • Human-readable output shows a "⚠️ MULTI-ARCH NOT VERIFIED" section
  • JSON output includes arch_unverified field
  • Workflow step summary shows a warning line when any images were unverified
  • Added tests: ArchUnverifiedTest (4 tests), updated existing tests for None return

Review fix applied by Hermes on behalf of @gnodet

@gnodet
gnodet requested a review from davsclaus November 5, 2026 14:50

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update. Addressed since my last review:

  • Unverified multi-arch: check_architectures returns None, arch_unverified is set, and the step summary says so (check-container-versions.yml:412-416).
  • Union vs intersection: an arch is now only exempt when every consumer skips it (check-container-versions.py:1045-1058).
  • Repo root: the skipITs map is built from the repository root (_find_repo_root, :1368/:1406).

Still open:

  1. camel-test-infra-all cancels every exemption. test-infra/camel-test-infra-all/pom.xml declares every camel-test-infra-* module (121 artifactId references) and has no skipITs. So with the intersection it vetoes all of them: the dir-name filter at :1027-1030 only drops a pom's own artifactId. Running _build_component_skip_its_map against the current tree gives one entry, camel-test-infra-duckdb, the only module not in -all. With the poms under test-infra/ left out, 37 modules get exemptions, including elasticsearch [linux/s390x] and spiffe [linux/ppc64le, linux/s390x]. As it is, elasticsearch is still never proposed: 9.1.0/9.2.0 on docker.elastic.co are amd64/arm64 only, and .ppc64le only covers ppc64le. Could we skip consumer poms under test-infra/ (or whose directory starts with camel-test-infra-), and add an -all pom to the RunCheckRepoRootTest fixture?
  2. Minor: RunCheckRepoRootTest (test_check_container_versions.py:641) reaches docker.elastic.co through run_check -> check_image_versions, and the assertions under if results: / if es_results: (:679) may not run. Patching check_image_versions would keep the test offline and make the assertions unconditional.
  3. Nit: the three new test classes (:597, :628, :685) come after if __name__ == "__main__": unittest.main(). discover still finds them, but running the file directly skips them, so moving the guard to the end would fix it.
  4. The PR description still says the union-based map scans only the scan path. Could it mention the intersection, the repo-root scan and arch_unverified?

Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, all four points from my last review are fixed in 97216b7:

  • camel-test-infra-all: _build_component_skip_its_map now skips poms in camel-test-infra-* directories (check-container-versions.py:1012-1017), and test_test_infra_all_pom_is_ignored covers it. Outside those directories, no pom references more than six camel-test-infra-* artifacts (camel-langchain4j-embeddings is the largest), so the remaining consumers are real component poms. The elasticsearch and spiffe exemptions now work.
  • RunCheckRepoRootTest: check_image_versions is patched, so the test is offline and its assertions always run.
  • The __main__ guard is at the end of the file.
  • The description covers the intersection, the repo-root scan and arch_unverified.

Two nits, not blocking:

  • The description says RunCheckRepoRootTest checks that camel-test-infra-all does not cancel exemptions, but its fixture has no -all pom: ComponentSkipItsMapTest.test_test_infra_all_pom_is_ignored is the test for that. Also, the final assertIn("linux/s390x", es_result.image.skipped_arches) checks the mocked result, so it can't fail. The _component_skip_its_map assertions above it are the ones that matter.
  • pom_file.parts is the absolute path, so a checkout under a directory named camel-test-infra-... would skip every pom. pom_file.relative_to(base).parts would rule that out.

@apupier, your skipITs point is in now (component poms, intersection across consumers), in case you want to take another look at your change request.

Reviewed with Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review of the new commit 7de7084. Matching the exclude dirs and the camel-test-infra-* prefix against pom_file.relative_to(base).parts fixes the false positives from a checkout path that contains target, build or camel-test-infra-... above the scan root. relative_to(base) cannot fail here, because rglob only yields paths under the resolved base. LGTM.

Reviewed with Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

…al assertion

The class docstring now says "via _find_repo_root" to match what it actually
tests (repo-root discovery when scan_path is test-infra). The description in
davsclaus's review pointed out it claimed to cover the camel-test-infra-all
exemption, which is covered by ComponentSkipItsMapTest.test_test_infra_all_pom_is_ignored.

The final assertIn("linux/s390x", es_result.image.skipped_arches) only
verified the mocked return value (which always has s390x in skipped_arches),
so it could never catch a regression. The _component_skip_its_map assertions
above it are the meaningful checks.
@gnodet gnodet added this to the 4.24.0 milestone Nov 5, 2026

@davsclaus davsclaus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review of 216484d. The new commit only touches test_check_container_versions.py. It removes the assertion on the mocked result that could not fail, and the RunCheckRepoRootTest docstring now names _find_repo_root. The _component_skip_its_map assertions that cover the repo-root scan stay, and the description now credits the camel-test-infra-all exclusion to ComponentSkipItsMapTest. That closes the last nits from my earlier review. No workflow change in this commit. LGTM.

Claude Code on behalf of davsclaus. This review was generated by an AI agent and may contain inaccuracies; please verify all suggestions before applying.

@gnodet

gnodet commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@apupier Your concern about adapting the arch check based on skipITs.ppc64le / skipITs.s390x from component poms has been fully implemented in subsequent commits — including the intersection-across-consumers logic (so an arch is only exempt when all consumers skip it, not just one), the repo-root scan (so component poms under components/ are found even when scanning test-infra/), and the camel-test-infra-all aggregator exclusion.

Davsclaus has reviewed and approved three times. Could you take another look and dismiss your change request if you're satisfied?

@davsclaus
davsclaus merged commit 5623758 into apache:main Nov 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container-images For check container upgrades dependencies Pull requests that update a dependency file task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants