Skip to content

#2462: Add Codex url-updater - #2499

Open
laert-ll wants to merge 2 commits into
devonfw:mainfrom
laert-ll:task/2462-create-urlupdater-for-codex
Open

laert-ll wants to merge 2 commits into
devonfw:mainfrom
laert-ll:task/2462-create-urlupdater-for-codex

Conversation

@laert-ll

@laert-ll laert-ll commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2462

Implemented changes:

  • Added a CodexUrlUpdater
  • Updated CHANGELOG.adoc

Testing instructions

  1. cd ~/projects/_ide/urls
  2. it checkout -b codex-test
  3. cd ~/projects/IDEasy/workspace/main/IDEasy
  4. mvn -f url-updater/pom.xml exec:exec -Dexec.executable="java" -Dexec.args="-cp %classpath com.devonfw.tools.ide.url.UpdateInitiator /home/username/projects/_ide/urls /home/username/projects/_ide/tmp PT1H codex"

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 35201050434

Coverage increased (+0.04%) to 74.199%

Details

  • Coverage increased (+0.04%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 10 coverage regressions across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

10 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/url/updater/UpdateManager.java 10 38.82%

Coverage Stats

Coverage Status
Relevant Lines: 19022
Covered Lines: 14747
Line Coverage: 77.53%
Relevant Branches: 8520
Covered Branches: 5689
Branch Coverage: 66.77%
Branches in Coverage %: Yes
Coverage Strength: 3.31 hits per line

💛 - Coveralls

@laert-ll
laert-ll marked this pull request as ready for review September 17, 2026 08:38
@laert-ll laert-ll moved this from 🆕 New to Team Review in IDEasy board Sep 17, 2026
@quando632 quando632 self-assigned this Sep 17, 2026

@quando632 quando632 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this one. It slots cleanly into GithubUrlReleaseUpdater instead of hand-rolling anything, the Javadoc explains the name vs. rust-v tag mismatch well, and the test covers all six OS/arch combinations plus both filter cases. I verified the six asset names against the real rust-v0.154.0 and rust-v0.112.0 releases, they match exactly.

Two points I would like to see addressed, details inline.

protected String getGithubRepository() {
return "codex";
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/repos/openai/codex/releases is requested without per_page, so only the 30 most recent releases are seen, and openai/codex publishes 8 to 10 releases a day. On that page exactly one stable Rust CLI release survives mapVersion (0.155.0). The daily run in update-urls.yml keeps up with new releases, but versions outside the window are never backfilled, so codex would start out with a single version.

The suggestion raises the page size (same idea as page_size=50 in JavaUrlUpdater). The stub in CodexUrlUpdaterTest then needs get(urlPathEqualTo("/repos/openai/codex/releases")), because urlMatching also compares the query string; with that change the test passes.

Suggested change
@Override
protected String doGetVersionUrl() {
return super.doGetVersionUrl() + "?per_page=100";
}

*/
public class CodexUrlUpdater extends GithubUrlReleaseUpdater {

private static final VersionIdentifier MIN_CODEX_VID = VersionIdentifier.of("0.112.0");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MIN_CODEX_VID drops everything below 0.112.0, although the assets exist earlier: rust-v0.111.0 carries the same set of codex-* assets, and the Linux and macOS tarballs go back to at least rust-v0.20.0. This becomes visible once the page size is raised, so documenting why the floor sits here (or lowering it) would help. The suggestion assumes the floor is intentional, please adjust the wording to the actual reason.

Suggested change
private static final VersionIdentifier MIN_CODEX_VID = VersionIdentifier.of("0.112.0");
/** Oldest Codex CLI version offered by IDEasy (older releases exist but are intentionally not provided). */
private static final VersionIdentifier MIN_CODEX_VID = VersionIdentifier.of("0.112.0");

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

Labels

None yet

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Create UrlUpdater for codex

3 participants