[PR #486] Prefer pwsh for Windows upgrade background process and add nightly upgrade validation workflow #508

Closed
opened 2026-03-02 04:13:49 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/486

State: closed
Merged: Yes


Motivation

  • Windows background installer logs showed failures when Get-FileHash was unavailable in older PowerShell hosts, so the background installer should prefer pwsh where available and fall back to powershell to improve compatibility.
  • Add a scheduled/nightly workflow to validate upgrades from older releases across Linux, macOS, and Windows to catch regressions in the install/upgrade flow.

Description

  • Updated src/commands/upgrade.rs to spawn the Windows background install using pwsh first and fall back to powershell by wrapping spawn logic in spawn_powershell and trying pwsh then powershell.
  • Preserved existing logging, console-hiding (CREATE_NO_WINDOW), and silent stdout/stderr behavior for the spawned process.
  • Added .github/workflows/nightly-upgrade.yml which schedules a nightly upgrade-from-older job and a workflow_dispatch entry that selects random older releases, installs them, runs git-ai upgrade, and on Windows polls the installed version up to a 3-minute deadline until it matches the expected latest.

Testing

  • No automated tests were run in this change and CI/workflow validation is pending.

Codex Task


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/486 **State:** closed **Merged:** Yes --- ### Motivation - Windows background installer logs showed failures when `Get-FileHash` was unavailable in older PowerShell hosts, so the background installer should prefer `pwsh` where available and fall back to `powershell` to improve compatibility. - Add a scheduled/nightly workflow to validate upgrades from older releases across Linux, macOS, and Windows to catch regressions in the install/upgrade flow. ### Description - Updated `src/commands/upgrade.rs` to spawn the Windows background install using `pwsh` first and fall back to `powershell` by wrapping spawn logic in `spawn_powershell` and trying `pwsh` then `powershell`. - Preserved existing logging, console-hiding (`CREATE_NO_WINDOW`), and silent stdout/stderr behavior for the spawned process. - Added `.github/workflows/nightly-upgrade.yml` which schedules a nightly `upgrade-from-older` job and a `workflow_dispatch` entry that selects random older releases, installs them, runs `git-ai upgrade`, and on Windows polls the installed version up to a 3-minute deadline until it matches the expected latest. ### Testing - No automated tests were run in this change and CI/workflow validation is pending. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6988bfee2060832cacedd646d620ee40) <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/486" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:49 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#508
No description provided.