Skip to content

refactor(ci): move podman MSI install into devsy-ci-podman install - #1578

Merged
skevetter merged 4 commits into
mainfrom
refactor/ci-podman-msi-install-go
Oct 19, 2026
Merged

skevetter merged 4 commits into
mainfrom
refactor/ci-podman-msi-install-go

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the inline PowerShell Podman MSI install in pr-ci.yml with one call: devsy-ci-podman install.
  • New install subcommand in hack/podman_ci/install.go. Windows implementation in install_windows.go; non-Windows stub in install_unsupported.go returns an error.
  • Reuses a cached MSI at --msi-path (still SHA256-verified), otherwise downloads from --url. Verifies SHA256 before msiexec. Runs msiexec with a verbose log at --log-path.
  • If podman.exe is missing under the install dir, logs the last 50 log lines and lists matching files. Search depth matches the old Get-ChildItem -Depth 4.
  • Appends the install dir to GITHUB_PATH.
  • msiexec gets its command line verbatim on Windows (SysProcAttr.CmdLine). Go's Args quoting turned INSTALLDIR="C:\Program Files\RedHat\Podman" into one token, so msiexec hung until the 4-minute timeout (run 39215960490). Unit test pins the exact line.
  • Failed or truncated downloads remove the partial MSI, so the next run re-downloads instead of failing checksum forever.
  • Shared plumbing: classifySetupError renamed to classifyOperationalError (now used by install too); Dependencies gains a Download field; install registered on the root command.

Validation

  • go test ./hack/podman_ci/... passes, including new tests for install success, checksum mismatch, missing-podman log tail and depth search, cached MSI reuse, and download truncation cleanup.
  • go vet clean for windows, linux, darwin.
  • golangci-lint on host: 0 issues. Windows-target lint reports 2 findings in setup_windows_test.go, which this PR does not touch.
  • Smoke: built binary; install --help lists flags; non-Windows run exits 1 with the unsupported-platform message.
  • actionlint reports unexpected key background at pr-ci.yml:957. Same on main; outside this change.

CodeRabbit

  • One minor finding (partial MSI left on failed download). Fixed in ddef2fb with a regression test.

Not verified

  • msiexec and the Podman install on a real Windows runner. Needs a CI run.

Summary by CodeRabbit

  • Chores
    • Updated Windows CI to install Podman through a dedicated setup step, verifying the installer’s checksum and reusing a cached download when available.
    • Improved installation failure diagnostics, including installer log details and searches for the expected executable.
    • Added support for handling Windows-specific command lines during CI setup.
  • Tests
    • Added coverage for installation, checksum validation, cached downloads, and failure diagnostics.

Replace the inline PowerShell Podman install in pr-ci.yml with a Go
install subcommand that verifies the MSI SHA256, runs msiexec, tails the
install log and searches for podman.exe on failure, and appends the
install dir to GITHUB_PATH.
io.Copy or Close failures left a truncated MSI at MSIPath, which the
cached-MSI path would then checksum-verify and fail on forever. Remove
the destination on write or close errors and cover it with a test.
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

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

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c5942ca2-df61-49fc-9660-69763080f6a9
📥 Commits

Reviewing files that changed from the base of the PR and between 2b30bfa and f553fd8.

📒 Files selected for processing: 11
  • .github/workflows/pr-ci.yml
  • hack/podman_ci/errors.go
  • hack/podman_ci/errors_test.go
  • hack/podman_ci/install.go
  • hack/podman_ci/install_test.go
  • hack/podman_ci/install_unsupported.go
  • hack/podman_ci/install_windows.go
  • hack/podman_ci/runner.go
  • hack/podman_ci/setup.go
  • hack/podman_ci/setup_linux.go
  • hack/podman_ci/setup_linux_test.go
📝 Walkthrough

The Podman CI helper adds a command to install the Windows MSI. It downloads and verifies the MSI, runs the installer, checks for podman.exe, and updates the GitHub path. The Windows PR workflow now calls this command.

Changes: Podman MSI installation

Layer / File(s) Summary
Command and platform wiring
hack/podman_ci/setup.go, hack/podman_ci/runner.go, hack/podman_ci/install_windows.go, hack/podman_ci/install_unsupported.go, hack/podman_ci/errors.go, hack/podman_ci/errors_test.go, hack/podman_ci/setup_linux.go, hack/podman_ci/setup_linux_test.go
The root command registers the installer and supplies a download dependency. The command runner accepts a Windows verbatim command line, with platform-specific implementations. Setup error classification and Linux install command references are also updated.
MSI installation and validation
hack/podman_ci/install.go, hack/podman_ci/install_test.go
The install command downloads the MSI when needed, verifies its SHA-256, runs msiexec.exe, checks for podman.exe, reports diagnostics, and appends the install directory to the configured GitHub path file. Tests cover installation, checksum validation, diagnostics, cached MSI reuse, and download errors.
Windows workflow integration
.github/workflows/pr-ci.yml
The Windows workflow calls the helper with the pinned MSI URL and SHA-256, plus the MSI, install, and log paths.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as Windows PR workflow
  participant Helper as devsy-ci-podman
  participant Server as MSI download server
  participant Installer as msiexec.exe
  participant PathFile as GITHUB_PATH
  Workflow->>Helper: install with MSI URL, SHA-256, and paths
  Helper->>Server: download MSI when the configured file is absent
  Server-->>Helper: MSI response
  Helper->>Helper: verify MSI SHA-256
  Helper->>Installer: install MSI with configured command line
  Installer-->>Helper: installation result
  Helper->>Helper: check for podman.exe
  Helper->>PathFile: append install directory after successful check
Loading
Merge Risk: ⚪ Minimal · up to f553f

No actionable installation issue remains established; the change is mergeable after normal checks.

Security architecture risk: 🔵 Low · up to f553f

The pinned installer identity and checksum-before-execution control are preserved. The main concern is failure containment: the helper can continue after an installer timeout when podman.exe exists, allowing subsequent steps to use an installation whose completion was not established. Exposure is bounded to the affected Windows CI jobs.

Retained concerns

  • Low · reliability · inferred: The new installer timeout can transition into apparent success without confirming installation completion. After the runner returns a timeout result, installPodmanMSI checks only for podman.exe and can publish GITHUB_PATH, enabling the following rootful setup against stale or incomplete installation state. The executable must exist for this path; otherwise installation fails. Ordinary nonzero-exit handling was already permissive in the base workflow, but continuation after the helper-level timeout is new.
Security review details

Security Blast Radius

  • inferred — The demonstrated impact is runner-local installation and downstream Windows integration-test execution. The helper already ran in the base workflow for rootful setup; adding installation does not establish a new PR-to-credential or cross-environment authority transition.

Trust Boundaries and Controls

  • observed — Artifact integrity is checked before privileged execution even for cached files. Hashing and execution still use separate accesses to the same mutable path, as in the base workflow; concurrent mutation is an existing limitation, not an established integrity regression from this PR.

Resilience and Maintainability Implications

  • inferred — Downstream setup has its own bounded initialization and recovery flow, providing functional failure containment. That is counterevidence against broad operational impact, but it does not establish that the requested MSI installation completed before setup began.
Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description provides useful implementation details and validation results, but it does not follow the repository template. It omits the required What and why, issue reference, change type, AI as… Restructure the description using the repository template. Complete or explicitly mark as not applicable the issue reference, change type, AI assistance details and attestations, testing selections and commands, checklist items, and manual …
Docstring Coverage Warning Docstring coverage is 3.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 10 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes the main change: moving the Podman MSI installation into the devsy-ci-podman install command.
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.
Full details: Description check

Explanation

The description provides useful implementation details and validation results, but it does not follow the repository template. It omits the required What and why, issue reference, change type, AI assistance, testing checklist, repository checklist, and reviewer notes sections.

Resolution

Restructure the description using the repository template. Complete or explicitly mark as not applicable the issue reference, change type, AI assistance details and attestations, testing selections and commands, checklist items, and manual verification. Retain the existing implementation details, test results, known lint findings, and Windows verification limitation in the appropriate sections.

Full details: Docstring Coverage

Explanation

Docstring coverage is 3.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 10 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 zizmor (1.30.1)
.github/workflows/pr-ci.yml

INFO zizmor: 🌈 zizmor v1.30.1
WARN audit:audit{input=Workflow(file://.github/workflows/pr-ci.yml)}: zizmor::audit::unsound_ternary: couldn't parse expression: matrix.provider-mode || ''parity''
fatal: no audit was performed
'template-injection' audit failed on file://.github/workflows/pr-ci.yml

Caused by:
0: error in 'template-injection' audit
1: failed to locate subfeature 'Subfeature { after: 143, fragment: Regex(Regex("matrix\.provider\-mode\s+\|\|\s+'parity'")) }' in feature ''"${RUNNER_TEMP}/devsy-ci-microsandbox" run --label "${{ matrix.label }}" --expected-count "${{ matrix.expected-spec-count }}" --provider-mode "${{ matrix.provider-mode || ''parity'' }}"''

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.

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit f553fd8
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad5e720431d5ab141ce8703

@skevetter skevetter added the ci-refactor CI/e2e refactor label Oct 19, 2026
@skevetter
skevetter marked this pull request as ready for review October 19, 2026 14:21
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter

Copy link
Copy Markdown
Contributor Author

All gates pass on f553fd8 (101 checks green, install podman (Windows) step ran green, CodeRabbit no actionable comments, 0 unresolved threads, commits verified, 300 non-test lines). Squash merge rejected: token lacks workflow scope. Needs human: merge.

@skevetter
skevetter merged commit 65a7322 into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/ci-podman-msi-install-go branch October 19, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-refactor CI/e2e refactor size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant