Skip to content

Conversation

@kvaps
Copy link
Member

@kvaps kvaps commented Jan 4, 2026

What this PR does

Fixes an issue where backport releases incorrectly became marked as "Latest" despite passing make_latest: 'false' to the GitHub API.

Root cause: The getLatestRelease() API returns the release with the "Latest" flag, not the highest semver version. Combined with race conditions during parallel release publishing and GitHub API potentially ignoring make_latest: 'false', backport releases were incorrectly marked as latest.

Solution:

  • Replace getLatestRelease() with semver-based max version detection across all published releases
  • After publishing a backport release, explicitly restore the latest flag on the highest semver release
  • Remove unused dead code from tags.yaml workflow

Release note

[ci] Fix latest release detection to use semver comparison instead of GitHub's "Latest" flag

Summary by CodeRabbit

  • Chores
    • Enhanced release automation: Consolidated draft release publishing with integrated semantic versioning validation, eliminating external tool dependencies. Improved latest-release tracking and prerelease decision logic.

✏️ Tip: You can customize this high-level summary in your review settings.

Replace unreliable getLatestRelease() API with semver-based max version
detection. After publishing a backport release, explicitly restore the
latest flag on the highest semver release to handle cases where GitHub
API ignores make_latest: 'false'.

Also remove dead code (unused steps) from tags.yaml workflow.

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 4, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request refactors release workflow logic by moving semver comparison and latest-release determination from external API calls into the workflows themselves. The tags workflow is simplified by removing semver comparison, while the pull-requests-release workflow adds internal semver parsing and conditional release adjustment logic.

Changes

Cohort / File(s) Summary
Release workflow refactoring
\\.github/workflows/pull-requests-release.yaml, \\.github/workflows/tags.yaml
Removed external semver comparison and latest-release lookups. The pull-requests-release workflow now includes internal semver parsing, draft-release identification, outdated version detection, and conditional make_latest adjustment logic. The tags workflow simplifies by skipping the dynamic comparison step entirely.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hops through workflows with newfound glee,
No more outside calls—the logic runs free!
Semver parsed local, releases arranged,
Draft becomes latest, the whole flow rearranged. 🚀


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a868874 and 66a756b.

📒 Files selected for processing (2)
  • .github/workflows/pull-requests-release.yaml
  • .github/workflows/tags.yaml

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 and usage tips.

@kvaps kvaps added backport Should change be backported on previus release backport-previous labels Jan 4, 2026
@kvaps kvaps marked this pull request as ready for review January 5, 2026 15:29
@kvaps kvaps requested review from lllamnyp and nbykov0 as code owners January 5, 2026 15:29
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 5, 2026
@kvaps kvaps merged commit 811fde9 into main Jan 5, 2026
25 of 26 checks passed
@kvaps kvaps deleted the fix-latest branch January 5, 2026 15:29
@dosubot dosubot bot added the bug Something isn't working label Jan 5, 2026
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Git push to origin failed for release-0.39 with exitcode 1

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Git push to origin failed for release-0.38 with exitcode 1

kvaps added a commit that referenced this pull request Jan 8, 2026
## What this PR does

Fixes an issue where backport releases incorrectly became marked as
"Latest" despite passing `make_latest: 'false'` to the GitHub API.

**Root cause:** The `getLatestRelease()` API returns the release with
the "Latest" flag, not the highest semver version. Combined with race
conditions during parallel release publishing and GitHub API potentially
ignoring `make_latest: 'false'`, backport releases were incorrectly
marked as latest.

**Solution:**
- Replace `getLatestRelease()` with semver-based max version detection
across all published releases
- After publishing a backport release, explicitly restore the latest
flag on the highest semver release
- Remove unused dead code from `tags.yaml` workflow

### Release note

```release-note
[ci] Fix latest release detection to use semver comparison instead of GitHub's "Latest" flag
```
kvaps added a commit that referenced this pull request Jan 8, 2026
## What this PR does

Fixes an issue where backport releases incorrectly became marked as
"Latest" despite passing `make_latest: 'false'` to the GitHub API.

**Root cause:** The `getLatestRelease()` API returns the release with
the "Latest" flag, not the highest semver version. Combined with race
conditions during parallel release publishing and GitHub API potentially
ignoring `make_latest: 'false'`, backport releases were incorrectly
marked as latest.

**Solution:**
- Replace `getLatestRelease()` with semver-based max version detection
across all published releases
- After publishing a backport release, explicitly restore the latest
flag on the highest semver release
- Remove unused dead code from `tags.yaml` workflow

### Release note

```release-note
[ci] Fix latest release detection to use semver comparison instead of GitHub's "Latest" flag
```
kvaps added a commit that referenced this pull request Jan 9, 2026
## What this PR does

Fixes an issue where backport releases incorrectly became marked as
"Latest" despite passing `make_latest: 'false'` to the GitHub API.

**Root cause:** The `getLatestRelease()` API returns the release with
the "Latest" flag, not the highest semver version. Combined with race
conditions during parallel release publishing and GitHub API potentially
ignoring `make_latest: 'false'`, backport releases were incorrectly
marked as latest.

**Solution:**
- Replace `getLatestRelease()` with semver-based max version detection
across all published releases
- After publishing a backport release, explicitly restore the latest
flag on the highest semver release
- Remove unused dead code from `tags.yaml` workflow

### Release note

```release-note
[ci] Fix latest release detection to use semver comparison instead of GitHub's "Latest" flag
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Should change be backported on previus release backport-previous bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants