[PR #481] Nightly workflow: only test upgrades for releases that include the upgrade command #505

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/481

State: closed
Merged: Yes


Motivation

  • Prevent the nightly upgrade job from selecting releases that predate the git-ai upgrade implementation which caused spurious failures.
  • Ensure the workflow can determine the minimum release that supports the upgrade command by inspecting repository tags.
  • Make selected-version outputs more debuggable by exposing the computed minimum upgrade version and fetching tags during checkout.

Description

  • Enabled tag fetching in the checkout step by setting fetch-tags: true so tag-based queries work in the runner.
  • Added Python logic (both POSIX and Windows variants) that finds the latest commit touching src/commands/upgrade.rs, collects semver tags that contain that commit, and computes the minimum semver tag that includes the upgrade command.
  • Filtered candidate older releases to only those strictly newer than the computed min_upgrade and older than the latest release, and exposed min_upgrade via GITHUB_OUTPUT for visibility.
  • Mirrored the same logic for Windows runners and cleaned up minor string/printing formatting in the embedded scripts.

Testing

  • The previous nightly run (before this change) failed with Unknown git-ai command: upgrade when installing v1.0.15, demonstrating the root cause this PR addresses and resulting in an automated job exit code 1.
  • No new workflow run has been executed after these changes; the updated workflow has been committed and a PR created so the job can be triggered manually or on schedule to validate the fix.

Codex Task


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/481 **State:** closed **Merged:** Yes --- ### Motivation - Prevent the nightly upgrade job from selecting releases that predate the `git-ai upgrade` implementation which caused spurious failures. - Ensure the workflow can determine the minimum release that supports the upgrade command by inspecting repository tags. - Make selected-version outputs more debuggable by exposing the computed minimum upgrade version and fetching tags during checkout. ### Description - Enabled tag fetching in the checkout step by setting `fetch-tags: true` so tag-based queries work in the runner. - Added Python logic (both POSIX and Windows variants) that finds the latest commit touching `src/commands/upgrade.rs`, collects semver tags that contain that commit, and computes the minimum semver tag that includes the upgrade command. - Filtered candidate older releases to only those strictly newer than the computed `min_upgrade` and older than the latest release, and exposed `min_upgrade` via `GITHUB_OUTPUT` for visibility. - Mirrored the same logic for Windows runners and cleaned up minor string/printing formatting in the embedded scripts. ### Testing - The previous nightly run (before this change) failed with `Unknown git-ai command: upgrade` when installing `v1.0.15`, demonstrating the root cause this PR addresses and resulting in an automated job exit code 1. - No new workflow run has been executed after these changes; the updated workflow has been committed and a PR created so the job can be triggered manually or on schedule to validate the fix. ------ [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/481" 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#505
No description provided.