ci(#5733): pin podman to 4.x to avoid crun incompatibility - #5738
Conversation
PR Summary by QodoPin Podman to 4.x in CI to avoid crun incompatibility on GitHub runners
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
|
🤖 Finished Review · ✅ Success · Started 6:43 PM UTC · Completed 6:56 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Code Review by Qodo
1.
|
ReviewFindingsMedium
Low
Previous runReviewFindingsMedium
Low
Labels: PR modifies CI workflow files (.github/) and podman sandbox infrastructure |
|
🤖 Review · |
f44dcd0 to
c5156f6
Compare
|
🤖 Finished Review · ❌ Failure · Started 7:09 PM UTC · Completed 7:10 PM UTC |
c5156f6 to
39bd970
Compare
|
🤖 Review · |
GitHub Actions runner images have begun pre-installing podman 5.8.4,
which requires crun >= 1.15. The runner's system crun stays at 1.14.1,
so sandbox creation fails deterministically with:
crun: unknown version specified: OCI runtime error
All 3 retry attempts fail, killing agent runs at the sandbox-creation
step before the agent starts.
`apt-get install -y podman` alone does not downgrade an
already-installed newer version, so pin podman to the 4.x series via
an apt preferences file (Pin-Priority 1001 authorizes the downgrade)
and pass --allow-downgrades on install.
The pin/install/verify logic lives in a shared
.github/scripts/install-podman.sh (matching the existing
install-openshell.sh convention) invoked from both action.yml and
functional-tests.yml, with a fail-fast assertion that the installed
version is actually 4.x — a silently-ineffective pin should surface
immediately here rather than resurface later as a confusing crun
error.
Also register the new script in vendoredDefaultsInfraPaths so
--vendor installs of action.yml keep shipping it.
Assisted-by: Claude (fix), Grok (review)
Signed-off-by: Wayne Sun <gsun@redhat.com>
39bd970 to
1ebacee
Compare
|
🤖 Finished Review · ✅ Success · Started 7:22 PM UTC · Completed 7:34 PM UTC |
| *"version 4."*) ;; | ||
| *) | ||
| echo "::error::Failed to pin podman to the 4.x series (see #5733); got: ${installed_version}" | ||
| exit 1 |
There was a problem hiding this comment.
[low] injection
The ::error:: workflow command and the final echo (line 35) interpolate ${installed_version} (from podman --version) without sanitizing for GHA workflow command sequences. The value originates from a system-installed binary and is not directly attacker-controlled, making this a defense-in-depth observation rather than a practical vulnerability.
|
🤖 Finished Retro · ✅ Success · Started 7:46 PM UTC · Completed 7:58 PM UTC |
Retro: PR #5738 — pin podman to 4.x to avoid crun incompatibilityOutcome: Human-authored PR merged in ~1 hour. Code agent failed; triage and review agents worked. No novel proposals — all improvement opportunities are tracked by existing open issues. Timeline
What went well
Evidence for existing issues
|
The apt preferences pin from fullsend-ai#5738 installs podman 4.9.3 to /usr/bin/podman, but GitHub-hosted Ubuntu 24.04 runner images ship a static podman 5.8.4 bundle under /usr/local/ that wins on PATH. The version assertion then fails before sandbox creation begins. Replace the apt-based approach with a pinned podman 4.x static bundle from mgoltzsche/podman-static (v4.9.5). The tarball extracts directly into /usr/local/, overlaying the runner image's 5.x binary. This mirrors how runner-images itself installs podman and avoids apt downgrade semantics. The bundle is self-contained (podman + crun + conmon + netavark), so the system crun version no longer matters. Closes fullsend-ai#5742
Summary
GitHub Actions runner images have begun pre-installing podman 5.8.4, which requires crun >= 1.15. The runner's system crun stays at 1.14.1, so sandbox creation fails deterministically with
crun: unknown version specified: OCI runtime error, killing agent runs before the agent starts.Related Issue
Closes #5733
Changes
.github/scripts/install-podman.sh(matching the existinginstall-openshell.shconvention): writes an apt preferences file pinningpodmanto the4.*series withPin-Priority: 1001(authorizes downgrading an already-installed newer version), runsapt-get install -y --allow-downgrades podman, then asserts the installed version is actually 4.x — fails loudly with a clear error if the pin didn't take, instead of silently leaving 5.x in place and resurfacing later as a confusing crun error.action.ymland.github/workflows/functional-tests.yml: replace the duplicated inline "Install Podman" step with a call to the shared script.apt-get install -y podmanalone does not downgrade an already-installed newer version, which is why the plain install left podman 5.8.4 in place — this is why both the pin'sPin-Priorityand--allow-downgradesare needed together.Testing
make lintpasses (staged changes, including shellcheck on the new script, the GitHub Actions workflow linter, and pinact)workflow_dispatchon this branch (gh workflow run functional-tests.yml --ref fix-5733-pin-podman-version): confirmed the new script executes (this PR'spull_request_target-triggered check does not exercise branch changes, since GitHub resolves that trigger's workflow YAML frommain) and that podman resolves to4.9.3+ds1-1ubuntu0.2and passes the version assertion. Did not hit a runner with podman 5.x pre-installed during validation (that variant is still a partial rollout per Pin podman version in action.yml to prevent runner image upgrade breakage #5733), so the downgrade path itself is not yet empirically exercised — the version assertion is the safety net for that case.make e2e-test/ full dogfood install ofaction.ymlagainst a test org not run (requires live pool orgs + mint OIDC perdocs/guides/dev/testing-workflows.md); reviewed as low-risk sinceaction.yml's step is now the identical shared script already validated aboveChecklist
ci(#5733), notfix(ci)— CI-only fix isci, per the forbidden type/scope table in COMMITS.md; issue number used as scope per convention)