Skip to content

fix: say that there is nothing to check or install when the installer has no check or run - #2056

Merged
lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:fix/installer-links-without-check-or-run
Nov 21, 2026
Merged

lagergren merged 1 commit into
redhat-developer:mainfrom
lagergren:fix/installer-links-without-check-or-run

Conversation

@lagergren

Copy link
Copy Markdown
Collaborator

Fixes #1229.

The links of the Installer tab, Check Installation, Run Installation and Check / Run Installation, ran the check or run task of the installer if it had one, and otherwise did nothing. Either way, they said that the installation completed successfully, so with an installer that has no run, Run Installation seemed to install the language server, as #1229 shows.

A run, with or without a check before it, now needs a run task, and a check a check task. Without it, the link says so in the console of the tab and in a warning, Nothing to install for name. The installer has no run., or Nothing to check …, and runs nothing. Check / Run Installation with a run and no check still runs it. This covers the Installer tab of a language server and the one of a DAP debug session, which both go through ServerInstallerManager.install(String, InstallerContext).

Not here:

  • Disabling the links: HyperlinkLabel, which LSP4IJ uses for every link, doesn't render or handle a disabled state, so a disabled link would look and act as before.
  • The check of the installer when a language server starts, which treats an installer without check as installed, so that an installer with only a run doesn't run at each start.

Test: ServerInstallerManagerMissingTaskTest checks which actions an installer without check, without run or without either has a task for. It also checks that Run Installation and Check / Run Installation of an installer without run, and Check Installation of one without check, give a warning that there is nothing to install or check. Without the change, the first and the last give the "completed successfully" notification and the second an error. It and the other installer tests pass (66 tests).

… has no check or run

The links of the Installer tab, Check Installation, Run Installation and
Check / Run Installation, ran the check or run task of the installer if it
had one, and otherwise did nothing; either way, they reported that the
installation completed successfully. A run, with or without a check before
it, needs a run task, and a check a check task: without it, the link now
says in the console and in a warning that there is nothing to install, or
to check, as the installer has no run, or no check.
@lagergren lagergren added this to the 0.30.2 milestone Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Installation requests now stop with a warning when the installer does not provide the task required for the selected action. This prevents an installation from proceeding without its requested check or run task and makes the missing task clear before any background work begins.

ServerInstallerManager.install now checks whether the installer defines the task required by the requested action. If the task is missing, installation stops and a warning notification identifies the missing task.

Changes: Installer Task Validation

Layer / File(s) Summary
Check and report missing tasks
src/main/java/com/redhat/devtools/lsp4ij/installation/definition/ServerInstallerManager.java, src/test/java/com/redhat/devtools/lsp4ij/installation/definition/ServerInstallerManagerMissingTaskTest.java
ServerInstallerManager checks for a check task for CHECK and a run task for RUN or CHECK_AND_RUN. When the required task is missing, it clears the context, logs an error, and sends a warning notification. Tests cover task availability and warning notifications.

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to df6ff

Installer links now warn and run nothing when the required check or run task is missing, instead of reporting success. The change is small and covered by new tests. No blocking merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the main change: when the installer lacks the check or run task, the Installer tab reports that there is nothing to check or install. This matches the raw summary, which adds task-ava…
Description check Passed The description explains the problem (links reported success without running a task), the new behavior (requires run or check tasks, warns and runs nothing), the scope and exclusions, and the added Se…
Linked Issues check Passed Issue #1229 asks that installation links be disabled or hidden when the installer configuration is missing, or that the UI warn the user. The PR takes the warning option. In ServerInstallerManager.ins…
Out of Scope Changes check Passed The changed code is limited to the install entry point and its task-availability check in ServerInstallerManager.java, plus the new ServerInstallerManagerMissingTaskTest. Each change serves the #1229 …
Full details: Title check

Explanation

The title states the main change: when the installer lacks the check or run task, the Installer tab reports that there is nothing to check or install. This matches the raw summary, which adds task-availability checks in ServerInstallerManager.install and a warning notification, and the PR objectives, which target missing check/run tasks.

Full details: Description check

Explanation

The description explains the problem (links reported success without running a task), the new behavior (requires run or check tasks, warns and runs nothing), the scope and exclusions, and the added ServerInstallerManagerMissingTaskTest. It matches the changeset and the linked objectives.

Full details: Linked Issues check

Explanation

Issue #1229 asks that installation links be disabled or hidden when the installer configuration is missing, or that the UI warn the user. The PR takes the warning option. In ServerInstallerManager.install(String, InstallerContext), a missing task now stops the action before background work starts. The method notifyNothingToExecute() prints to the tab console and sends a WARNING notification: 'Nothing to install for <name>. The installer has no run.' or 'Nothing to check for <name>. The installer has no check.' Nothing runs. hasTaskToExecute() maps RUN and CHECK_AND_RUN to getRun() != null, and CHECK to getCheck() != null. So Check / Run with a run and no check still runs the run. The test ServerInstallerManagerMissingTaskTest covers these cases and asserts the warning type, title and content. The warning covers only missing check and run tasks, not every missing JSON attribute. That is the case in the reported scenario, and the issue allows a warning as an alternative. Note: the whole-PR diff could not be read, so the base content was not compared. The head file content was read and matches the PR description.

Full details: Out of Scope Changes check

Explanation

The changed code is limited to the install entry point and its task-availability check in ServerInstallerManager.java, plus the new ServerInstallerManagerMissingTaskTest. Each change serves the #1229 objective: it prevents a false success report when a required task is absent. The PR does not change startup checks or disable links, as its description states. The new test directly supports the change. The whole-PR diff could not be read, so this verdict relies on the head file contents and the supplied PR summary. No unrelated change was found in the evidence available.

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: dab5b049-67fc-46a4-af67-ef569f0037e8
Commits

Reviewing files that changed from the base of the PR and between b982bd4 and df6ffe3.

Files selected for processing: 2

  • src/main/java/com/redhat/devtools/lsp4ij/installation/definition/ServerInstallerManager.java
  • src/test/java/com/redhat/devtools/lsp4ij/installation/definition/ServerInstallerManagerMissingTaskTest.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 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.56%. Comparing base (b982bd4) to head (df6ffe3).

Files with missing lines Patch % Lines
...nstallation/definition/ServerInstallerManager.java 80.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2056      +/-   ##
==========================================
+ Coverage   49.49%   49.56%   +0.07%     
==========================================
  Files         813      813              
  Lines       33350    33365      +15     
  Branches     5195     6861    +1666     
==========================================
+ Hits        16505    16538      +33     
+ Misses      14272    14257      -15     
+ Partials     2573     2570       -3     

☔ 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 21, 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 21, 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 26b38ce into redhat-developer:main Nov 21, 2026
9 checks passed
@lagergren lagergren added bug Something isn't working install labels Nov 22, 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 install

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation links should be disabled/hidden if there is no configuration

1 participant