Skip to content

#2515: add UrlUpdater for KubeLinter (kube-linter) - #2602

Open
majesteSil wants to merge 7 commits into
devonfw:mainfrom
majesteSil:feature/2515-kubelinter-url-updater
Open

majesteSil wants to merge 7 commits into
devonfw:mainfrom
majesteSil:feature/2515-kubelinter-url-updater

Conversation

@majesteSil

@majesteSil majesteSil commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes #2515

Adds a UrlUpdater for KubeLinter so the ide-urls repository discovers the versions and download URLs of the new kube-linter tool. This is the first of two PRs for #2515: the commandlet itself follows in a second PR that consumes the URLs discovered here (the commandlet cannot resolve real download URLs until this updater is merged).

Implemented changes:

  • KubeLinterUrlUpdater extends GithubUrlReleaseUpdater — discovers versions from the stackrox/kube-linter GitHub releases and maps the six per-platform/architecture .tar.gz assets (linux / darwin / windows × x64 + arm64).
  • Gates on a minimum version (0.7.0) — below that the release assets are incomplete/inconsistent (e.g. v0.6.8 has no windows_arm64.tar.gz, v0.5.1 has no darwin.tar.gz), so the six <os>_<arch>.urls files are only produced for versions with a complete asset set.
  • Registers the updater in UpdateManager.
  • Adds KubeLinterUrlUpdaterTest (WireMock) asserting all six platform/architecture .urls files (with checksum) are created, plus a kube-linter-releases.json mock.

Notes:

  • The version is derived from the GitHub release name field (e.g. v0.8.3); the v prefix is stripped via getVersionPrefixToRemove().
  • Asset names use the OS-specific darwin name for macOS (not mac), and the version is carried by the release tag (not the file name), so URLs follow the explicit per-OS pattern (as in InsoUrlUpdater).
  • No CHANGELOG.adoc entry and no LICENSE.adoc row for this PR — precedent for a url-updater-only change (cf. Create InsoUrlUpdater #1905 Inso UrlUpdater) is that those belong to the commandlet PR, which adds the tool to the user-facing tool set.

Testing instructions

  1. Run the new unit test:
    mvn -o -pl url-updater -am test -Dtest=KubeLinterUrlUpdaterTest -Dsurefire.failIfNoSpecifiedTests=false
    (-am builds the upstream ide-cli module the url-updater depends on; the flag lets the cli module pass with no matching test.) Result: 1/1 green.
  2. The pre-commit hook runs mvn -q verify -pl '!documentation' (Spotless format, Checkstyle lint, build + tests) — green for the changed files (the remaining Checkstyle violations in this module are pre-existing legacy files, out of scope per the ratchet).
  3. (Production, manual) The UpdateInitiator (run nightly via GitHub Actions) will now include KubeLinterUrlUpdater and populate ide-urls under kube-linter/kube-linter/<version>/<os>_<arch>.urls. A manual local run is possible via the UpdateInitiator main class (see documentation/contributing/commandlet-and-url-updater.adoc).

Checklist for this PR

  • When running mvn clean test locally all tests pass and build is successful — full mvn clean test from the repo root is avoided on purpose (it triggers the long-running documentation module, see AGENTS.md); instead the pre-commit hook's mvn -q verify -pl '!documentation' (build + all module tests) ran green, and the new KubeLinterUrlUpdaterTest is green.
  • PR title is of the form #«issue-id»: «brief summary»
  • PR top-level comment summaries what has been done and contains link to addressed issue
  • PR and issue(s) have suitable labels (added enhancement / commandlet; adjust if a more specific updater label is preferred)
  • Issue is set to In Progress and assigned to the contributor (or there is no issue)
  • You followed all coding conventions (Spotless + Checkstyle clean on the changed files)
  • You have added the issue implemented by your PR in CHANGELOG.adoc — N/A: url-updater-only change, no user-facing tool yet (precedent Create InsoUrlUpdater #1905); the commandlet PR carries the CHANGELOG entry.
  • You have not changed any dependency in pom.xml / updated LICENSE — N/A: no runtime dependency added here (KubeLinter is an installed tool, not a library); the LICENSE.adoc row is added in the commandlet PR.
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

Checklist for tool commandlets

N/A for this PR — this PR only adds the UrlUpdater, not the commandlet. The commandlet (second PR) will be checked against this list (installation, sandbox, LICENSE.adoc, help texts, dependency install, KUBE_LINTER_VERSION/KUBE_LINTER_EDITION, platform coverage).

@majesteSil majesteSil moved this from 🆕 New to Team Review in IDEasy board Oct 1, 2026
@majesteSil majesteSil added enhancement New feature or request commandlet ide sub-command labels Oct 1, 2026
@coveralls

coveralls commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 37664927752

Coverage increased (+0.03%) to 74.231%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

15 previously-covered lines in 1 file lost coverage.

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

Coverage Stats

Coverage Status
Relevant Lines: 19593
Covered Lines: 15211
Line Coverage: 77.63%
Relevant Branches: 8689
Covered Branches: 5783
Branch Coverage: 66.56%
Branches in Coverage %: Yes
Coverage Strength: 3.33 hits per line

💛 - Coveralls

@laim2003 laim2003 self-assigned this Oct 1, 2026
@laim2003
laim2003 self-requested a review October 1, 2026 16:07

@laim2003 laim2003 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 @majesteSil, great work, I just found some very minor improvements. Otherwise looks great!

majesteSil and others added 3 commits October 5, 2026 10:38
- rename MIN_KUBE_LINTER_VID to MIN_KUBE_LINTER_VERSION_IDENTIFIER (naming convention)
- rename local vid to versionIdentifier and improve readability
- document the upstream v0.6.5 trailing-space tag that triggers an InvalidPathException
@majesteSil majesteSil added the urls ide-urls repo and related processes and features label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commandlet ide sub-command enhancement New feature or request urls ide-urls repo and related processes and features

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Add commandlet for KubeLinter (kube-linter)

3 participants