Skip to content

fix(ci): recover partial Windows Podman initialization - #1374

Merged
skevetter merged 1 commit into
mainfrom
codex/windows-podman-bootstrap-recovery
Oct 5, 2026
Merged

skevetter merged 1 commit into
mainfrom
codex/windows-podman-bootstrap-recovery

Conversation

@skevetter

@skevetter skevetter commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Cold Windows WSL initialization can exceed the old 90-second cap and leave a distribution before Podman commits machine metadata. Recovery then aborted on expected VM does not exist responses, even after WSL cleanup.

Allow initialization up to 150 seconds within the unchanged 270-second bootstrap budget, reserving diagnostics and first-attempt recovery time. Accept only the exact missing-default-machine response during Podman stop/remove, clean up only podman-machine-default, and retry a fresh initialization after successful cleanup. Unexpected errors still fail recovery. Synchronize the descendant-process test before termination, and include helper changes in the existing integration CI path filter. Job timeouts are unchanged.

Validation:

  • PowerShell helper suite passed 10 consecutive local runs on macOS with PowerShell 7.6.6, including a simulated 110-second init and timed-out partial-init recovery.
  • task cli:lint:ci: passed, 0 issues.
  • Targeted repository pre-commit checks, YAML/actionlint, and git diff --check: passed.
  • Local CodeRabbit review of the final diff: completed, 0 findings.
  • Final head 21ec18039ae2d2b63944d77f97279781c551248f: signature verified locally and by GitHub (verified=true, reason=valid).
  • Remote CLI Lint, Check Commits, CLA and Hound checks passed. CI Pre-commit/unit tests are still in progress; dependent Windows integration jobs remain pending.
  • Before merge: complete at least 10 Windows helper executions and 5 full Windows Podman integration runs, then the remote Greptile and CodeRabbit reviewer gates. Local repetitions do not count as Windows executions.

The optional image-cache optimization is deferred.

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability of Windows Podman setup by allowing more time for initialization and handling recovery from timed-out, partial setup attempts more carefully.
    • Recovery now recognizes when a Podman machine is already absent, while cleanup failures still prevent an unsafe retry.
  • Chores

    • Changes to Windows Podman setup scripts now trigger the relevant Go-related CI checks.

@netlify

netlify Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 21ec180
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ac3f5642d14710008cb3d01

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

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: 14b3701b-7475-471e-9216-11691762548d
📥 Commits

Reviewing files that changed from the base of the PR and between d8cc2eb and 21ec180.

📒 Files selected for processing (3)
  • .github/workflows/pr-ci.yml
  • hack/ci/setup-podman-windows.Tests.ps1
  • hack/ci/setup-podman-windows.ps1

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Windows Podman setup script now reserves bootstrap time for diagnostics and recovery, allows longer machine initialization, and handles an exact VM-absent result during cleanup. Tests cover timeout and recovery scenarios. The CI path filter now includes matching Windows setup scripts.

Changes

Windows Podman Bootstrap

Layer / File(s) Summary
Machine initialization budget
hack/ci/setup-podman-windows.ps1, hack/ci/setup-podman-windows.Tests.ps1
The initialization timeout increases to 150 seconds. The first attempt reserves time for diagnostics and recovery, and tests verify initialization limits and remaining-budget behavior.
Partial initialization recovery
hack/ci/setup-podman-windows.ps1, hack/ci/setup-podman-windows.Tests.ps1
Recovery accepts the exact VM-absent result for machine reset commands. Tests cover partial-state cleanup, stale distribution removal, retries, and cleanup failures.
Timeout test and CI path coverage
hack/ci/setup-podman-windows.Tests.ps1, .github/workflows/pr-ci.yml
The timeout stopper test checks that the parent stops within its grace period while its child remains alive. The CI path filter now matches the Windows Podman setup scripts.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 21ec1

This change extends the Windows Podman initialization window and makes recovery tolerate an already-absent machine. No concrete merge-blocking defect was found. The remaining step is the Windows integration runs the author already plans.

Architecture Summary

Architecture risk: 🔵 Low · up to 21ec1

The change affects 1 system.

Changed systems: hack

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — hack (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in hack/ci/setup-podman-windows.Tests.ps1: The test saves the real timeout stopper alongside the bounded-command runner for direct invocation.
  • observed — Modified behavior in hack/ci/setup-podman-windows.Tests.ps1: The descendant test now launches a parent script that records its child PID via a temporary file, waits for readiness, and directly calls the real stopper. It asserts the parent exits within the bounded grace while the child remains alive; the finally block stops any remaining parent and child and removes the temporary directory. This replaces a bounded-runner timeout test that asserted the same child-survival outcome after the runner timed out.
  • observed — Modified behavior in hack/ci/setup-podman-windows.Tests.ps1: The command mock now supports queued durations per command, dequeuing one per invocation and adding the lesser of that duration and the timeout to elapsed time. It reports timeout only when duration exceeds the timeout; otherwise the existing fixed-duration path runs.
  • observed — Modified behavior in hack/ci/setup-podman-windows.Tests.ps1: Set-Scenario now resets the queued-duration map along with the other scenario state.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: recovery from partial Windows Podman initialization failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@skevetter
skevetter force-pushed the codex/windows-podman-bootstrap-recovery branch from b8c6a2a to 21ec180 Compare October 5, 2026 19:07
@github-actions github-actions Bot added the size/l label Oct 5, 2026
@skevetter
skevetter marked this pull request as ready for review October 5, 2026 21:53
@mergify

mergify Bot commented Oct 5, 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
skevetter merged commit 2285f05 into main Oct 5, 2026
131 of 163 checks passed
@skevetter
skevetter deleted the codex/windows-podman-bootstrap-recovery branch October 5, 2026 22:09
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