Skip to content

feat(driver): guard BuildKit strategy against Podman runtime#270

Merged
skevetter merged 1 commit into
mainfrom
2a7d-buildkit-guard
May 13, 2026
Merged

feat(driver): guard BuildKit strategy against Podman runtime#270
skevetter merged 1 commit into
mainfrom
2a7d-buildkit-guard

Conversation

@skevetter

@skevetter skevetter commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Detect Podman at build strategy selection in selectStrategy() and force CLI build strategy (docker buildx) instead of BuildKit session API
  • Prevents BuildKit session failures when running under Podman, which uses Buildah for builds
  • Adds 4 unit tests covering Docker→BuildKit, Podman→CLI forced, Podman ignores builder configs, and Docker with real buildx

Summary by CodeRabbit

Bug Fixes

  • Fixed build strategy selection to properly detect Podman environments and automatically switch to the CLI-based Docker buildx approach for improved compatibility.

Review Change Stack

Podman doesn't support the Docker BuildKit session API. Detect Podman
via DockerHelper.IsPodman() at strategy selection time and force the
CLI build (docker buildx) strategy, preventing BuildKit session failures
when running under Podman.
@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit ad195ec
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a04b64110c45400081a5d95

@coderabbitai

coderabbitai Bot commented May 13, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e2cee93-c755-46f6-8fde-2db1d77a6315

📥 Commits

Reviewing files that changed from the base of the PR and between 9bc10cc and ad195ec.

📒 Files selected for processing (2)
  • pkg/driver/docker/build.go
  • pkg/driver/docker/build_test.go

📝 Walkthrough

Walkthrough

This PR adds Podman detection to the build strategy selection logic, forcing the external CLI docker buildx strategy when running under Podman. A comprehensive test suite validates the strategy selection across Docker, Podman, and forced-internal-buildkit configurations.

Changes

Podman detection in build strategy selection

Layer / File(s) Summary
Podman detection in strategy selection
pkg/driver/docker/build.go
buildOrchestrator.selectStrategy detects Podman via IsPodman(), logs the detection, and returns dockerBuildxStrategy immediately to bypass internal BuildKit session API logic.
Build strategy selection tests
pkg/driver/docker/build_test.go
Test suite with helper writeHelperScript validates strategy selection across four scenarios: Docker allowing BuildKit, Podman forcing CLI build with ForceInternalBuildKit, Podman ignoring builder config, and conditional checks for real Docker availability.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Podman runtime detection to guard against using BuildKit strategy, which is the core modification in build.go and the primary reason for the test additions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@skevetter
skevetter marked this pull request as ready for review May 13, 2026 17:40
@skevetter
skevetter enabled auto-merge (squash) May 13, 2026 17:40
@skevetter
skevetter merged commit 01ef390 into main May 13, 2026
52 of 56 checks passed
@skevetter
skevetter deleted the 2a7d-buildkit-guard branch May 13, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant