gnodet opened a new pull request, #29149:
URL: https://github.com/apache/camel/pull/29149
## 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']`
- 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 (Docker Hub
requires authentication even for public image manifests)
- `QuayAPI` overrides `check_architectures` to use the `quay.io/v2/...`
distribution endpoint
- `ContainerImage` gains a `has_arch_override` flag set when the
properties file already declares an arch-specific sibling property (e.g.
`keycloak.container.ppc64le`). Such images use a separate registry for the
minority arch and are exempt from the manifest check
- `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
- `print_results` adds 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
- **`check-container-versions.yml`**
- GHA step summary now reports the count of arch-blocked images
- **`test_check_container_versions.py`** (new)
- 19 unit tests covering all new code paths: manifest parsing, arch
detection, DockerHub token flow, Quay endpoint, `has_arch_override` detection,
version-gating logic, JSON output
## Behaviour
| Scenario | Before | After |
|---|---|---|
| Newer tag available, all arches present | ✅ PR created | ✅ PR created |
| Newer tag available, ppc64le/s390x missing | ✅ PR created (broken CI) | 🚫
Upgrade skipped, arch reported |
| Image has explicit arch override (e.g. `keycloak.container.ppc64le`) | n/a
| ✅ PR created (exempt from check) |
| Registry unreachable during arch check | n/a | ✅ PR created (fail-open) |
> _Hermes / Forgebot on behalf of @gnodet_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]