Skip to content

fix: detect podman-docker in CONTAINER_ENGINE resolution#3620

Open
cardil wants to merge 1 commit intoknative:mainfrom
cardil:fix/podman-docker-detection
Open

fix: detect podman-docker in CONTAINER_ENGINE resolution#3620
cardil wants to merge 1 commit intoknative:mainfrom
cardil:fix/podman-docker-detection

Conversation

@cardil
Copy link
Copy Markdown
Contributor

@cardil cardil commented Apr 18, 2026

Summary

When CONTAINER_ENGINE is unset, hack/common.sh previously defaulted to
docker unconditionally. On systems with the podman-docker package installed,
/usr/bin/docker is a shell wrapper that exec's podman. This caused downstream
scripts to never fire their podman-specific workarounds, even when podman was
the actual runtime.

Changes

  • hack/common.sh: Replaces the single-line export CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker} with a detection block that:
    1. Honours an explicit CONTAINER_ENGINE if already set.
    2. Defaults to docker if docker is found in PATH.
    3. Detects podman-docker: if docker --version output contains "podman", switches to podman.
    4. Falls back to podman if docker is absent but podman is present.

Testing

This is a shell-only change in hack/common.sh. Verified manually on a system
with podman-docker installed — CONTAINER_ENGINE is now correctly resolved to
podman.

Assisted-by: 🤖 Claude Opus/Sonnet 4.6

On systems with podman-docker installed, /usr/bin/docker is a shell
wrapper that exec's podman. The previous default (CONTAINER_ENGINE=docker)
caused the PID limit fix in cluster.sh to never fire, leading to PID
exhaustion and containerd crashes under WASM workloads.

Now common.sh detects the actual runtime via 'docker --version' output
and falls back to podman when docker is absent.

Assisted-by: 🤖 Claude Opus/Sonnet 4.6
@knative-prow knative-prow bot requested review from dsimansk and jrangelramos April 18, 2026 09:58
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Apr 18, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cardil
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the size/S 🤖 PR changes 10-29 lines, ignoring generated files. label Apr 18, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.28%. Comparing base (02faab0) to head (8173484).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3620      +/-   ##
==========================================
- Coverage   56.30%   56.28%   -0.02%     
==========================================
  Files         180      180              
  Lines       20549    20549              
==========================================
- Hits        11570    11566       -4     
- Misses       7778     7780       +2     
- Partials     1201     1203       +2     
Flag Coverage Δ
e2e 36.21% <ø> (-0.01%) ⬇️
e2e go 32.86% <ø> (ø)
e2e node 28.62% <ø> (ø)
e2e python 33.23% <ø> (ø)
e2e quarkus 28.76% <ø> (ø)
e2e rust 28.18% <ø> (+0.06%) ⬆️
e2e springboot 26.65% <ø> (ø)
e2e typescript 28.73% <ø> (ø)
e2e-config-ci 18.08% <ø> (ø)
integration 17.46% <ø> (-0.03%) ⬇️
unit macos-14 43.35% <ø> (+<0.01%) ⬆️
unit macos-latest 43.35% <ø> (ø)
unit ubuntu-24.04-arm 43.55% <ø> (ø)
unit ubuntu-latest 44.23% <ø> (ø)
unit windows-latest 43.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S 🤖 PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant