fix(black-box): capture diagnostics on cancel, pin podman-compose - #32
Conversation
PR Summary by QodoCapture black-box diagnostics on timeout/cancel and pin podman-compose
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
The blackbox job's log-collection step only ran on failure(), so a timeout/cancellation (as seen in dcm-project/control-plane#37) left no diagnostic output about which service hung. Switch it to always() so it runs (with GitHub's ~5min cancellation grace period) even when the job is cancelled, and have it dump container status, health check history, and compose logs. Also pin podman-compose to 1.6.0 instead of installing unpinned, to remove version drift as a variable. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: gabriel-farache <gfarache@redhat.com>
Run only on failure/cancel, never fail the job, and use podman logs per container instead of podman-compose logs. Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
50cf31c to
f2dc056
Compare
|
@qodo review |
The PR looks good from the current review state; there are no active findings.
Both previously reported findings are marked implemented. |
Rootless healthchecks need a user systemd session; without it compose service_healthy can hang until the job times out. Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
|
@qodo review |
Reviewed the workflow changes. No remaining blocking issues found.
The previously reported concerns are addressed in the current diff; this looks good to merge. |
| # the user manager is often absent, so health stays "starting" and | ||
| # compose depends_on: service_healthy hangs until job timeout. | ||
| sudo loginctl enable-linger "$(id -un)" | ||
| sleep 1 |
There was a problem hiding this comment.
sleep 1 after enable-linger is racy — user@<uid>.service starting (which is what actually creates /run/user/<uid>) isn't guaranteed to finish in 1s under GHA load. dcm-project/quadlet-deploy's resolve_rootless_vars.yml hit this same problem and settled on polling instead of sleeping:
- name: Start user systemd instance
ansible.builtin.systemd_service:
name: "user@{{ uid }}.service"
state: started
- name: Wait for XDG_RUNTIME_DIR to exist
ansible.builtin.wait_for:
path: "/run/user/{{ uid }}"
timeout: 30Worth the shell equivalent here (e.g. timeout 30 bash -c 'until [ -d /run/user/$(id -u) ]; do sleep 0.5; done') instead of a flat sleep 1, so this doesn't reintroduce the hang intermittently instead of reliably.
chadcrum
left a comment
There was a problem hiding this comment.
LGMT once @jordigilh 's timing comment is handled
Replace the fixed sleep with a short poll Assisted-By: Claude (Anthropic) Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
jordigilh
left a comment
There was a problem hiding this comment.
Verified — sleep 1 replaced with a proper wait_for-equivalent poll (timeout 30 + until [ -d /run/user/$(id -u) ]), matching the suggested pattern exactly. No further concerns.
## 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 - podman-container-tools/podman#19326 - podman-container-tools/podman#27033 - podman-container-tools/podman#28192 ## Fixes dcm-project/control-plane#37 Signed-off-by: Gloria Ciavarrini <gciavarrini@redhat.com>
Summary
Black-box jobs (e.g. control-plane subsystem) were hitting the 25m timeout during "Start services" with little useful output — see dcm-project/control-plane#37 run.
Two related problems:
starting(Log: null) anddepends_on: service_healthynever completes.if: failure(). A job timeout is a cancellation, so that step was skipped.This PR:
XDG_RUNTIME_DIRso Podman healthchecks can run on GHAfailure() || cancelled()(not on success), withcontinue-on-error/set +eso the step cannot flip a green jobpodman ps -a, per-container health JSON, andpodman logs --tail 200(notpodman-compose logs, which needs a compose file path this workflow does not have)podman-compose==1.6.0to avoid version drift