[PR #484] [MERGED] Fix nightly upgrade workflow: PowerShell Python here-string and version normalization #511

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

📋 Pull Request Information

Original PR: https://github.com/git-ai-project/git-ai/pull/484
Author: @svarlamov
Created: 2/8/2026
Status: Merged
Merged: 2/8/2026
Merged by: @svarlamov

Base: mainHead: codex/create-nightly-github-action-for-git-ai-versions


📝 Commits (2)

  • 6d61ff7 Fix nightly upgrade workflow on Windows
  • d5d5988 Merge branch 'main' into codex/create-nightly-github-action-for-git-ai-versions

📊 Changes

1 file changed (+7 additions, -3 deletions)

View changed files

📝 .github/workflows/nightly-upgrade.yml (+7 -3)

📄 Description

Motivation

  • Prevent PowerShell parser errors on Windows runners caused by an embedded python - <<'PY' heredoc.
  • Avoid false CI failures from v-prefixed tags by normalizing version strings before comparisons.
  • Keep upgrade tests limited to releases that include the git-ai upgrade command by retaining the v1.0.26 floor.

Description

  • Run the Windows version-selection Python via a PowerShell here-string assigned to $script and call python -c $script to avoid redirection parsing errors in pwsh (change in .github/workflows/nightly-upgrade.yml).
  • Normalize v-prefixed versions when comparing installed vs latest by stripping the leading v on non-Windows (latest="${{ steps.versions.outputs.latest }}" then latest="${latest#v}" and installed="${installed#v}") and on Windows ($latest = $latest.TrimStart('v') and trimming installed with .TrimStart('v')).
  • Preserve the minimum upgrade floor min_upgrade_tuple = (1, 0, 26) and fetch-tags: true so the workflow only selects releases >= v1.0.26 that contain the upgrade feature.
  • Updated file: .github/workflows/nightly-upgrade.yml with the Windows fix and version-normalization adjustments.

Testing

  • Previous automated workflow runs showed two failures: the non-Windows job reported Expected v1.0.42, got 1.0.42 due to the v prefix mismatch, and the Windows job failed with a PowerShell ParserError caused by the heredoc-style Python redirection.
  • No automated workflows were executed after this change in the PR; the edits are intended to address the observed CI failures but the workflow still needs to be triggered (workflow_dispatch or scheduled) to validate success automatically.

Codex Task


Open with Devin

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/git-ai-project/git-ai/pull/484 **Author:** [@svarlamov](https://github.com/svarlamov) **Created:** 2/8/2026 **Status:** ✅ Merged **Merged:** 2/8/2026 **Merged by:** [@svarlamov](https://github.com/svarlamov) **Base:** `main` ← **Head:** `codex/create-nightly-github-action-for-git-ai-versions` --- ### 📝 Commits (2) - [`6d61ff7`](https://github.com/git-ai-project/git-ai/commit/6d61ff7b97949fe6dccdff3333dbe2186e103273) Fix nightly upgrade workflow on Windows - [`d5d5988`](https://github.com/git-ai-project/git-ai/commit/d5d59885a734736decbde4cfb8ecfefd5effa6d2) Merge branch 'main' into codex/create-nightly-github-action-for-git-ai-versions ### 📊 Changes **1 file changed** (+7 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/nightly-upgrade.yml` (+7 -3) </details> ### 📄 Description ### Motivation - Prevent PowerShell parser errors on Windows runners caused by an embedded `python - <<'PY'` heredoc. - Avoid false CI failures from `v`-prefixed tags by normalizing version strings before comparisons. - Keep upgrade tests limited to releases that include the `git-ai upgrade` command by retaining the `v1.0.26` floor. ### Description - Run the Windows version-selection Python via a PowerShell here-string assigned to `$script` and call `python -c $script` to avoid redirection parsing errors in `pwsh` (change in ` .github/workflows/nightly-upgrade.yml`). - Normalize `v`-prefixed versions when comparing installed vs latest by stripping the leading `v` on non-Windows (`latest="${{ steps.versions.outputs.latest }}"` then `latest="${latest#v}"` and `installed="${installed#v}"`) and on Windows (`$latest = $latest.TrimStart('v')` and trimming `installed` with `.TrimStart('v')`). - Preserve the minimum upgrade floor `min_upgrade_tuple = (1, 0, 26)` and `fetch-tags: true` so the workflow only selects releases >= `v1.0.26` that contain the `upgrade` feature. - Updated file: ` .github/workflows/nightly-upgrade.yml` with the Windows fix and version-normalization adjustments. ### Testing - Previous automated workflow runs showed two failures: the non-Windows job reported `Expected v1.0.42, got 1.0.42` due to the `v` prefix mismatch, and the Windows job failed with a PowerShell `ParserError` caused by the heredoc-style Python redirection. - No automated workflows were executed after this change in the PR; the edits are intended to address the observed CI failures but the workflow still needs to be triggered (`workflow_dispatch` or scheduled) to validate success automatically. ------ [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/484" 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 --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:13:50 +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#511
No description provided.