Skip to content

fix: look up the latest GitHub release among the 100 newest releases, not the 30 newest - #2048

Merged
lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:fix/github-installers-look-at-100-releases
Nov 21, 2026
Merged

lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:fix/github-installers-look-at-100-releases

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

Part of #1961.

A github download takes the newest release that matches its
prerelease setting, among the releases that the GitHub API lists. The
API lists 30 releases by default, so a repository which publishes many
prereleases can push its latest release out of them. The installer then
finds no release, and installs its fallback url, an older version, with
only a line in its output. sysml-lsp is such a case: Open-MBEE/OpenSysML
publishes a nightly prerelease almost every day, and its latest release,
v0.12.1, is the 11th today (the 8th on Nov 13), so about 19 more nightly
builds without a release would push it out, and the installer would
install v0.9.1.

The lookup now asks for 100 releases, the most that the API gives in one
page.

Test: GitHubAssetFetcherTest checks the URL of the lookup. It and the
installer tests pass (29 tests).

… not the 30 newest

Part of redhat-developer#1961.

A `github` download takes the newest release that matches its
`prerelease` setting, among the releases that the GitHub API lists. The
API lists 30 releases by default, so a repository which publishes many
prereleases can push its latest release out of them. The installer then
finds no release, and installs its fallback `url`, an older version, with
only a line in its output. sysml-lsp is such a case: Open-MBEE/OpenSysML
publishes a nightly prerelease almost every day, and its latest release,
v0.12.1, is the 11th today (the 8th on Nov 13), so about 19 more nightly
builds without a release would push it out, and the installer would
install v0.9.1.

The lookup now asks for 100 releases, the most that the API gives in one
page.

Test: `GitHubAssetFetcherTest` checks the URL of the lookup. It and the
installer tests pass (29 tests).
@lagergren lagergren added this to the 0.30.2 milestone Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Release lookups now request up to 100 results, increasing the number of releases available compared with the previous 30-result limit.

The release fetcher now requests up to 100 releases per page. A test checks that the URL helper includes the page-size parameter.

Changes: GitHub release fetching

Layer / File(s) Summary
Release URL and fetch integration
src/main/java/com/redhat/devtools/lsp4ij/installation/download/GitHubAssetFetcher.java, src/test/java/com/redhat/devtools/lsp4ij/installation/download/GitHubAssetFetcherTest.java
A URL helper adds per_page=100 to the releases endpoint. fetchReleasesJson uses the helper, and a test checks the generated URL.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: angelozerr

Merge Risk: Minimal · up to 43548

The installer now looks at up to 100 recent GitHub releases instead of 30, which lowers the chance it falls back to an older version when many prereleases exist. No concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: release lookup now considers the 100 newest GitHub releases instead of the 30 newest. The raw summary confirms that releasesUrl adds per_page=100 and fetchReleasesJso…
Description check Passed The description explains the problem and the fix. GitHub lists 30 releases by default, so prereleases can push the latest matching release out of the results. The change requests 100 releases per page…
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.
Full details: Title check

Explanation

The title states the main change: release lookup now considers the 100 newest GitHub releases instead of the 30 newest. The raw summary confirms that releasesUrl adds per_page=100 and fetchReleasesJson uses it, so the title matches the changeset.

Full details: Description check

Explanation

The description explains the problem and the fix. GitHub lists 30 releases by default, so prereleases can push the latest matching release out of the results. The change requests 100 releases per page. It also names a test, GitHubAssetFetcherTest, which matches the raw summary.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: be3baaac-af9c-46fc-bf08-abbf83933d10
Commits

Reviewing files that changed from the base of the PR and between 0af1afc and 4354864.

Files selected for processing: 2

  • src/main/java/com/redhat/devtools/lsp4ij/installation/download/GitHubAssetFetcher.java
  • src/test/java/com/redhat/devtools/lsp4ij/installation/download/GitHubAssetFetcherTest.java

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

@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 49.42%. Comparing base (0af1afc) to head (4354864).

Files with missing lines Patch % Lines
...p4ij/installation/download/GitHubAssetFetcher.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2048      +/-   ##
==========================================
- Coverage   49.44%   49.42%   -0.02%     
==========================================
  Files         813      813              
  Lines       33324    33325       +1     
  Branches     5191     5191              
==========================================
- Hits        16478    16472       -6     
- Misses      14272    14279       +7     
  Partials     2574     2574              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lagergren

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@lagergren
lagergren merged commit b982bd4 into redhat-developer:main Nov 21, 2026
9 checks passed
@lagergren lagergren added the bug Something isn't working label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant