TRT-2865: Add nested-podman integration test image for CI - #3866
Conversation
Add Dockerfile.integration and entrypoint script so ci-operator can run integration tests with testcontainers-go via nested podman. The Dockerfile layers podman on top of the build root, and the entrypoint configures rootless podman and starts the API socket service that testcontainers-go needs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@mstaeble: This pull request references TRT-2865 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the spike to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Skipping CI for Draft Pull Request. |
WalkthroughAdds an integration-test image with nested rootless Podman. The entrypoint configures user mappings, storage, registries, and the Podman API socket, then runs integration tests through Docker-compatible testcontainers settings. ChangesNested Podman integration tests
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant IntegrationTests
participant nestedPodmanEntrypoint
participant PodmanAPI
IntegrationTests->>nestedPodmanEntrypoint: supply integration test command
nestedPodmanEntrypoint->>PodmanAPI: start rootless API service
PodmanAPI-->>nestedPodmanEntrypoint: create Unix socket
nestedPodmanEntrypoint->>IntegrationTests: export DOCKER_HOST and disable Ryuk
IntegrationTests->>PodmanAPI: issue container requests
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (20 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mstaeble The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Dockerfile.integration`:
- Around line 4-8: Refactor Dockerfile.integration into separate builder and
runtime stages: keep source, build tools, and `make integration` execution in
the builder stage, then copy only the resulting test artifact and required
Podman runtime dependencies into the final stage. Ensure the final image is
runtime-only and does not inherit the build root contents or tools.
- Around line 1-3: The nested-Podman test interface is missing documentation for
local image builds, privileged runtime requirements, DOCKER_HOST, and
TESTCONTAINERS_RYUK_DISABLED. Update Dockerfile.integration lines 1-3 with local
build and run instructions, and update scripts/nested-podman-entrypoint.sh lines
82-83 to document the exported testcontainers settings and required CI
capabilities.
- Around line 21-22: Add a Dockerfile HEALTHCHECK after the Podman
ENTRYPOINT/CMD that probes the Podman socket or API using the available
container tooling, and configure it to run after the nested Podman entrypoint
has started the service so CI reports service failures directly.
- Around line 21-22: Update Dockerfile.integrations’ runtime configuration to
declare a non-root USER after all required file permissions are set, so the
existing ENTRYPOINT and CMD run as that user by default. Use the appropriate
non-root user already created or configured in the image, without relying on
OpenShift overrides.
In `@scripts/nested-podman-entrypoint.sh`:
- Around line 10-18: Update the registries.conf heredoc in the entrypoint to
prevent ambiguous short image names: replace permissive short-name handling with
enforcing mode and define explicit aliases for any required unqualified images,
or remove the multi-registry search configuration by converting image references
to fully qualified names.
- Around line 51-60: Update the SUBID_START_DEFAULT/SUBID_COUNT_DEFAULT
validation in the nested Podman entrypoint to reject unsupported mappings
instead of falling back to 100000:65536 when id -u leaves no valid range; exit
with a clear error before writing /etc/subuid and /etc/subgid, or otherwise
ensure CI selects a UID that provides a valid 0-65535 subordinate-ID range.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: bcebf892-5931-45f7-a578-3b97db424b86
📒 Files selected for processing (2)
Dockerfile.integrationscripts/nested-podman-entrypoint.sh
|
@coderabbitai resolve |
✅ Action performedComments resolved and changes approved. |
|
Scheduling required tests: |
|
@mstaeble: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
Summary
Dockerfile.integrationthat layers podman, fuse-overlayfs, and shadow-utils on top of the build root for running integration tests in CI with nested podmanscripts/nested-podman-entrypoint.shthat configures rootless podman (storage, registries, subuid/subgid, OpenShift random UID handling) and starts the podman API socket service so testcontainers-go can connectDOCKER_HOSTpoints at the podman socketThe corresponding ci-operator config change (in openshift/release) will reference this Dockerfile with
from: srcand add an integration test job withcapabilities: [nested-podman]andnested_podman: true.Test plan
podman build -f Dockerfile.buildroot)podman build --from sippy-buildroot -f Dockerfile.integration)make integrationstarts successfully inside the container with--privileged🤖 Generated with Claude Code
Summary by CodeRabbit