Skip to content

Iterate all pages of the GitHub releases API in url-updaters #2877

Open
1 of 2 issues completed
Open

Description

@laert-ll

Feature idea

GitHub-based url-updaters retrieve versions from the GitHub API with a single request. The API response is paginated, so currently only the first page is being processed, i.e. by default only the 30 most recent items. This has led to problems with tools such as OpenAI's codex, which publishes ~8-10 releases every day, and anything outside the first page is never picked up. A recent attempt to manually set the page limit to 100 items led to a timeout (see #2852).

Thus instead of processing a single page, the updater should iterate over all pages of the paginated API response:

  1. Loop through the pages of the version endpoint.
  2. Extend the request URL with the pagination parameters for each page.
  3. Merge the JSON responses into one combined list.

Additional context

The base class is https://github.com/devonfw/IDEasy/blob/main/url-updater/src/main/java/com/devonfw/tools/ide/url/updater/AbstractGithubUrlUpdater.java which has two sub-classes that both call GitHub APIs and should benefit from this improvement.

Internally it should use a loop calling the GitHub API page by page until less hits than the maximum of configured hits per page had been returned.

As the issue already stated problems about codex with so many releases leading to timeouts and overloading, we should already thing further:

  • We should check the GitHub API and JSON results for something like a timestamp, sequential release/tag counter, or alike.
  • We should check if it is possible to filter the API to get only results newer than such a timestamp, sequence, etc. and potentially even get the result hits sorted via that field ascending.
  • Then we could use our status.json file and extend the model to track this field value to memorise what we have already seen and processed.
  • Then we could check if we already have a status for the current URL Updater with such new field storing the state from where we previously left off.
  • Finally, we can then continue the GitHub API search to only return results newer than this stored timestamp.

Please note that this additional persisting is adding quite some extra complexity to this story.
Feel free to create sub-tasks to split it into smaller tasks and PRs that allow faster progress+review.

#2852

Sub-issues

Sub-issues

1 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added theissue type on Nov 16, 2026
  2. added
    enhancement
    on Nov 16, 2026
  3. self-assigned this
    on Nov 20, 2026
  4. added
    urls
    ready-to-implement
    on Nov 20, 2026
  5. capg-leo commented on Nov 24, 2026

    @capg-leo
    Contributor

    I investigated the processing approach for GitHub-based URL updaters.

    Findings:

    • For releases, GitHub provides useful metadata such as a release ID as well as created_at and published_at. The release ID could theoretically be stored as a marker and pagination could stop once that release is reached again.
    • However, the releases API does not provide suitable filtering or sorting to directly request only releases newer than the stored marker. We would still have to start pagination from the beginning and would need fallback handling if the stored release can no longer be found.
    • For tags, this is more difficult. The API provides the tag reference and commit SHA, but no suitable timestamp that could reliably be used as an incremental marker. Stopping at a previously known tag could therefore risk missing newly added tags.
    • I also looked into the existing status.json mechanism. It is currently tied to individual UrlVersions. For incremental GitHub processing, we would instead need state on repository/updater level, which would require additional state management and fallback logic.

    Conclusion: The optimization seems technically possible to some extent, especially for releases, but it would add additional complexity and cannot be applied as reliably to tags.

    For now, I would therefore keep the pagination implemented in #2916 (per_page=100 and continue until a page contains fewer than 100 results) rather than adding incremental state handling.

    If we still want to pursue the optimization, I think it should be handled as a separate implementation task after deciding how repository/updater-level state should be persisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementready-to-implementurls

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions