Skip to content

fix(black-box): prefer runner Docker over installing Podman on GHA - #33

Merged
gciavarrini merged 1 commit into
dcm-project:mainfrom
gciavarrini:fix/blackbox-docker-compose-gha
Aug 14, 2026
Merged

fix(black-box): prefer runner Docker over installing Podman on GHA#33
gciavarrini merged 1 commit into
dcm-project:mainfrom
gciavarrini:fix/blackbox-docker-compose-gha

Conversation

@gciavarrini

@gciavarrini gciavarrini commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Black-box jobs were hanging on compose up with depends_on: service_healthy.
Containers stayed starting with Log: null until the 25m timeout.

Podman runs healthchecks via systemd user timers. On GitHub Actions those often never fire, even after PR #32.
Docker's daemon runs healthchecks itself.

This PR stops installing Podman in the workflow and uses the runner engine (prefer Docker).
Pull and diagnostics follow CONTAINER_ENGINE.

Podman Upstream related issues

Fixes

dcm-project/control-plane#37

Stop installing Podman so service_healthy can rely on dockerd
healthchecks. Podman user timers often never fire on GHA.

Assisted-By: Claude (Anthropic)
Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
@gciavarrini
gciavarrini requested a review from a team as a code owner August 14, 2026 13:50
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Fix black-box GHA hangs by preferring runner Docker engine over Podman

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Stop installing Podman in black-box GitHub Actions jobs to avoid healthcheck hangs.
• Detect and use the runner’s container engine (prefer Docker; fallback to Podman).
• Make image pulls and failure diagnostics follow CONTAINER_ENGINE.
Diagram

graph TD
  A["GHA black-box job"] --> B["Detect container engine"] --> C{"Docker present?"}
  C -->|"yes"| D["Set CONTAINER_ENGINE=docker"] --> H["Pull images & compose up"] --> J["Diagnostics (ps/health/logs)"]
  C -->|"no"| E{"Podman present?"}
  E -->|"yes"| F["Set CONTAINER_ENGINE=podman"] --> H
  E -->|"no"| G["Fail: no engine"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Force Docker-only on GHA
  • ➕ Eliminates fallback behavior and reduces variability across runs
  • ➕ Aligns with the root cause (Podman healthchecks via systemd timers on GHA)
  • ➖ Less portable if some runners/environments intentionally rely on Podman
  • ➖ Harder to reuse the workflow outside GitHub-hosted runners
2. Keep Podman but add systemd timer/workaround
  • ➕ Maintains Podman-based parity with local dev environments
  • ➕ Avoids relying on Docker availability
  • ➖ Upstream-dependent and brittle; the underlying GHA timer behavior can still fail
  • ➖ More complexity (lingering/systemd user services) for CI-only benefit

Recommendation: Proceed with the current approach: prefer the runner’s Docker engine and gate all pulls/diagnostics through CONTAINER_ENGINE. It directly addresses the observed hang by relying on dockerd-managed healthchecks, while still preserving a Podman fallback when Docker isn’t present.

Files changed (1) +28 / -16

Bug fix (1) +28 / -16
black-box.yamlUse runner container engine (prefer Docker) for black-box workflow steps +28/-16

Use runner container engine (prefer Docker) for black-box workflow steps

• Removes Podman installation/setup and adds a detection step that exports CONTAINER_ENGINE (docker preferred, podman fallback). Updates image pre-pull and diagnostic commands (ps/inspect/logs) to run via the selected engine, improving reliability of compose healthcheck gating on GitHub Actions.

.github/workflows/black-box.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Podman fallback unprepared 🐞 Bug ☼ Reliability
Description
The workflow can fall back to Podman when Docker is missing, but it no longer sets up a
Podman-capable runtime environment before later steps use $CONTAINER_ENGINE, so Podman-only runners
can fail when pulling images or collecting diagnostics. Additionally, the diagnostics step defaults
to docker when CONTAINER_ENGINE is unset, which can yield misleading or empty output in
non-Docker environments.
Code

.github/workflows/black-box.yaml[R44-47]

+          if command -v docker >/dev/null 2>&1; then
+            engine=docker
+          elif command -v podman >/dev/null 2>&1; then
+            engine=podman
Evidence
The engine-detection logic can choose engine=podman when Docker is absent, and later workflow
steps rely on CONTAINER_ENGINE to perform container operations, but there is no Podman-specific
preparation performed elsewhere to ensure that choice is actually usable. In the diagnostics section
specifically, the script sets engine="${CONTAINER_ENGINE:-docker}", meaning it will silently
select Docker if CONTAINER_ENGINE was never populated, and then runs ${engine} ps/inspect/logs,
which explains why diagnostics can be wrong or empty on runners where Docker isn’t present or
intended.

.github/workflows/black-box.yaml[42-66]
.github/workflows/black-box.yaml[56-66]
.github/workflows/black-box.yaml[74-83]

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 workflow contains a Podman fallback path, but it no longer performs the necessary Podman preparation/validation before subsequent steps invoke the selected container engine (e.g., pulls and diagnostics). Separately, the diagnostics step silently defaults to `docker` when `CONTAINER_ENGINE` is unset, which can produce misleading/empty diagnostics on non-Docker runners.

## Issue Context
This reusable workflow runs on `ubuntu-latest` and includes engine-detection logic that can select Podman when Docker is missing. If the Podman branch is kept, the workflow should either ensure Podman works equivalently to the Docker path (including any required setup/validation) or fail fast with a clear error; diagnostics should not independently default to Docker when the engine is unknown, and should instead reuse detection or require a previously-determined engine.

## Fix Focus Areas
- .github/workflows/black-box.yaml[42-66]
- .github/workflows/black-box.yaml[74-99]

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


Grey Divider

Tip of the day
💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +44 to +47
if command -v docker >/dev/null 2>&1; then
engine=docker
elif command -v podman >/dev/null 2>&1; then
engine=podman

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Podman fallback unprepared 🐞 Bug ☼ Reliability

The workflow can fall back to Podman when Docker is missing, but it no longer sets up a
Podman-capable runtime environment before later steps use $CONTAINER_ENGINE, so Podman-only runners
can fail when pulling images or collecting diagnostics. Additionally, the diagnostics step defaults
to docker when CONTAINER_ENGINE is unset, which can yield misleading or empty output in
non-Docker environments.
Agent Prompt
## Issue description
The workflow contains a Podman fallback path, but it no longer performs the necessary Podman preparation/validation before subsequent steps invoke the selected container engine (e.g., pulls and diagnostics). Separately, the diagnostics step silently defaults to `docker` when `CONTAINER_ENGINE` is unset, which can produce misleading/empty diagnostics on non-Docker runners.

## Issue Context
This reusable workflow runs on `ubuntu-latest` and includes engine-detection logic that can select Podman when Docker is missing. If the Podman branch is kept, the workflow should either ensure Podman works equivalently to the Docker path (including any required setup/validation) or fail fast with a clear error; diagnostics should not independently default to Docker when the engine is unknown, and should instead reuse detection or require a previously-determined engine.

## Fix Focus Areas
- .github/workflows/black-box.yaml[42-66]
- .github/workflows/black-box.yaml[74-99]

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

@jordigilh jordigilh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

@chadcrum chadcrum 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.

Good temp workaround, thanks!

@gciavarrini
gciavarrini merged commit c7713b4 into dcm-project:main Aug 14, 2026
2 checks passed
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.

3 participants