Skip to content

#2714: fix oc url-updater version regex to support multi-digit minor … - #2744

Open
HadiDawoud wants to merge 1 commit into
devonfw:mainfrom
HadiDawoud:feature/2714-oc-url-updater-regex
Open

HadiDawoud wants to merge 1 commit into
devonfw:mainfrom
HadiDawoud:feature/2714-oc-url-updater-regex

Conversation

@HadiDawoud

@HadiDawoud HadiDawoud commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes #2714

Implemented changes:

  • Changed OcUrlUpdater version pattern from (\d\.\d\.\d*) (single-digit minor only) to
    (?<=href=")(\d+\.\d+\.\d+)(?![\w.-]), which now matches multi-digit minor versions
    (e.g. 4.10.0, 4.22.19) and skips -rc folders and partial version prefixes.
  • Added package-private test constructor to OcUrlUpdater (same pattern as GitUrlUpdater).
  • Added regression test OcUrlUpdaterTest with a mocked mirror index.

Note: the issue suggested href="(\d+\.\d+\.\d+)/", but WebsiteUrlUpdater reads
matcher.group() (full match), not a capture group. Switching it to group(1) broke
GcLogAnalyzerUrlUpdater and EclipseUrlUpdater whose patterns have no capture group.
The lookaround form keeps the change local to OcUrlUpdater.


Testing instructions

  1. Run the new test: mvn -pl url-updater -Dtest=OcUrlUpdaterTest test — passes with the
    new pattern, fails with the old one (red→green verified).
  2. Optional manual check: run the url-updater for oc against the live mirror and confirm
    versions newer than 4.9.59 (e.g. 4.22.19) are picked up.

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary»
  • PR top-level comment summarizes 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
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc
  • You have not changed any dependency in pom.xml files
  • You have formulated clear instructions on how to test your contribution

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Oct 23, 2026
@HadiDawoud HadiDawoud moved this from 🆕 New to 🏗 In progress in IDEasy board Oct 23, 2026
@HadiDawoud HadiDawoud added oc OpenShift CLI urls ide-urls repo and related processes and features labels Oct 23, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 39966217298

Coverage increased (+0.03%) to 75.147%

Details

  • Coverage increased (+0.03%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 19771
Covered Lines: 15509
Line Coverage: 78.44%
Relevant Branches: 8793
Covered Branches: 5956
Branch Coverage: 67.74%
Branches in Coverage %: Yes
Coverage Strength: 3.37 hits per line

💛 - Coveralls

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

Labels

oc OpenShift CLI urls ide-urls repo and related processes and features

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

oc url-updater misses all versions since OpenShift 4.10 (version regex only allows single digit minor)

2 participants