Skip to content

Commit

Permalink
SLCORE-924: No binding suggestion with SQ/SC info
Browse files Browse the repository at this point in the history
When no binding suggestion was found, the response that will be handled by the IDE will contain the information whether it was for a SonarCloud connection or not.
  • Loading branch information
thahnen committed Sep 12, 2024
1 parent 27d459b commit e67473c
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 19 deletions.
13 changes: 13 additions & 0 deletions API_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 10.6

## Breaking changes

* signature of `org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientDelegate#noBindingSuggestionFound` was changed
* replaced parameter with `org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams`
* former parameter `projectKey` can now be accessed by `params.getProjectKey()`

## New features

* Add a field to `org.sonarsource.sonarlint.core.rpc.protocol.common.NoBindingSuggestionFoundParams` indicating whether the suggestion where
no binding was found by is SonarCloud or not, can be used to display a more precise notification in the IDE rather than a generic one

# 10.4

## Breaking changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ private void assistConnectionAndBindingIfNeeded(AssistCreatingConnectionParams c
var serverUrl = getServerUrl(connectionParams);
LOG.debug("Assist connection and binding if needed for project {} and server {}", projectKey, serverUrl);
try {
var connectionsMatchingOrigin = connectionParams.getConnectionParams().isLeft() ?
connectionConfigurationRepository.findByUrl(serverUrl) :
connectionConfigurationRepository.findByOrganization(connectionParams.getConnectionParams().getRight().getOrganizationKey());
var isSonarCloud = connectionParams.getConnectionParams().isRight();
var connectionsMatchingOrigin = isSonarCloud ?
connectionConfigurationRepository.findByOrganization(connectionParams.getConnectionParams().getRight().getOrganizationKey()) :
connectionConfigurationRepository.findByUrl(serverUrl);
if (connectionsMatchingOrigin.isEmpty()) {
startFullBindingProcess();
try {
var assistNewConnectionResult = assistCreatingConnectionAndWaitForRepositoryUpdate(connectionParams, cancelMonitor);
var assistNewBindingResult = assistBindingAndWaitForRepositoryUpdate(assistNewConnectionResult.getNewConnectionId(),
var assistNewBindingResult = assistBindingAndWaitForRepositoryUpdate(assistNewConnectionResult.getNewConnectionId(), isSonarCloud,
projectKey, cancelMonitor);
callback.andThen(assistNewConnectionResult.getNewConnectionId(), assistNewBindingResult.getConfigurationScopeId(), cancelMonitor);
} finally {
Expand All @@ -104,7 +105,7 @@ private void assistConnectionAndBindingIfNeeded(AssistCreatingConnectionParams c
} else {
// we pick the first connection but this could lead to issues later if there were several matches (make the user select the right
// one?)
assistBindingIfNeeded(connectionsMatchingOrigin.get(0).getConnectionId(), projectKey, callback, cancelMonitor);
assistBindingIfNeeded(connectionsMatchingOrigin.get(0).getConnectionId(), isSonarCloud, projectKey, callback, cancelMonitor);
}
} catch (Exception e) {
LOG.error("Unable to show issue", e);
Expand Down Expand Up @@ -136,19 +137,19 @@ private AssistCreatingConnectionResponse assistCreatingConnectionAndWaitForRepos
return assistNewConnectionResult;
}

private void assistBindingIfNeeded(String connectionId, String projectKey, Callback callback, SonarLintCancelMonitor cancelMonitor) {
private void assistBindingIfNeeded(String connectionId, boolean isSonarCloud, String projectKey, Callback callback, SonarLintCancelMonitor cancelMonitor) {
var scopes = configurationRepository.getBoundScopesToConnectionAndSonarProject(connectionId, projectKey);
if (scopes.isEmpty()) {
var assistNewBindingResult = assistBindingAndWaitForRepositoryUpdate(connectionId, projectKey, cancelMonitor);
var assistNewBindingResult = assistBindingAndWaitForRepositoryUpdate(connectionId, isSonarCloud, projectKey, cancelMonitor);
callback.andThen(connectionId, assistNewBindingResult.getConfigurationScopeId(), cancelMonitor);
} else {
// we pick the first bound scope but this could lead to issues later if there were several matches (make the user select the right one?)
callback.andThen(connectionId, scopes.iterator().next().getConfigScopeId(), cancelMonitor);
}
}

private NewBinding assistBindingAndWaitForRepositoryUpdate(String connectionId, String projectKey, SonarLintCancelMonitor cancelMonitor) {
var assistNewBindingResult = assistBinding(connectionId, projectKey, cancelMonitor);
private NewBinding assistBindingAndWaitForRepositoryUpdate(String connectionId, boolean isSonarCloud, String projectKey, SonarLintCancelMonitor cancelMonitor) {
var assistNewBindingResult = assistBinding(connectionId, isSonarCloud, projectKey, cancelMonitor);
// Wait 5s for the binding to be created in the repository. This is happening asynchronously by the
// ConfigurationService::didUpdateBinding event
var configurationScopeId = assistNewBindingResult.getConfigurationScopeId();
Expand Down Expand Up @@ -209,11 +210,11 @@ private void revokeToken(AssistCreatingConnectionParams connectionParams, SonarL
}
}

NewBinding assistBinding(String connectionId, String projectKey, SonarLintCancelMonitor cancelMonitor) {
NewBinding assistBinding(String connectionId, boolean isSonarCloud, String projectKey, SonarLintCancelMonitor cancelMonitor) {
var configScopeCandidates = bindingCandidatesFinder.findConfigScopesToBind(connectionId, projectKey, cancelMonitor);
// For now, we decided to only support automatic binding if there is only one clear candidate
if (configScopeCandidates.size() != 1) {
client.noBindingSuggestionFound(new NoBindingSuggestionFoundParams(projectKey));
client.noBindingSuggestionFound(new NoBindingSuggestionFoundParams(projectKey, isSonarCloud));
return new NewBinding(connectionId, null);
}
var bindableConfig = configScopeCandidates.iterator().next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.client.analysis.RawIssueDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.ConnectionSuggestionDto;
Expand Down Expand Up @@ -181,7 +182,7 @@ default Path getBaseDir(String configurationScopeId) throws ConfigScopeNotFoundE

List<ClientFileDto> listFiles(String configScopeId) throws ConfigScopeNotFoundException;

void noBindingSuggestionFound(String projectKey);
void noBindingSuggestionFound(NoBindingSuggestionFoundParams params);

void didChangeAnalysisReadiness(Set<String> configurationScopeIds, boolean areReadyForAnalysis);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public void didChangeTaintVulnerabilities(DidChangeTaintVulnerabilitiesParams pa

@Override
public void noBindingSuggestionFound(NoBindingSuggestionFoundParams params) {
notify(() -> delegate.noBindingSuggestionFound(params.getProjectKey()));
notify(() -> delegate.noBindingSuggestionFound(params));
}

public void didChangeAnalysisReadiness(DidChangeAnalysisReadinessParams params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.client.analysis.RawIssueDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.ConnectionSuggestionDto;
Expand Down Expand Up @@ -211,7 +212,7 @@ public List<ClientFileDto> listFiles(String configScopeId) {
}

@Override
public void noBindingSuggestionFound(String projectKey) {
public void noBindingSuggestionFound(NoBindingSuggestionFoundParams params) {
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.backend.tracking.TaintVulnerabilityDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.ConnectionSuggestionDto;
Expand Down Expand Up @@ -849,7 +850,7 @@ public List<String> getLogMessages() {
}

@Override
public void noBindingSuggestionFound(String projectKey) {
public void noBindingSuggestionFound(NoBindingSuggestionFoundParams params) {
}

Check failure on line 854 in medium-tests/src/test/java/mediumtest/fixtures/SonarLintBackendFixture.java

View check run for this annotation

Cirrus CI / test_linux

medium-tests/src/test/java/mediumtest/fixtures/SonarLintBackendFixture.java#L854

mediumtest.issues.OpenFixSuggestionInIdeMediumTests.it_should_not_assist_binding_if_multiple_suggestions
Raw output
Argument(s) are different! Wanted:
fakeSonarLintRpcClient.noBindingSuggestionFound(
    org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams@15a33b58
);
-> at mediumtest.fixtures.SonarLintBackendFixture$FakeSonarLintRpcClient.noBindingSuggestionFound(SonarLintBackendFixture.java:854)
Actual invocations have different arguments:
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.257] [main] INFO org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl - SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@2e27b0b2
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.331] [SonarLint Server RPC sequential executor] INFO sonarlint - Telemetry disabled on server startup
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.336] [SonarLint Server RPC sequential executor] INFO sonarlint - Started embedded server on port 64120
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.337] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Starting local-only issue database from /tmp/slUserHome7314047127578726823/xodus-local-only-issue-store558841202293690691
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.listFiles(
    "configScopeB"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$30(SonarLintRpcClientImpl.java:334)
fakeSonarLintRpcClient.listFiles(
    "configScopeA"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$30(SonarLintRpcClientImpl.java:334)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.502] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Assist connection and binding if needed for project projectKey and server http://localhost:45103/
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.502] [SonarLint Server RPC sequential executor] DEBUG sonarlint - No connections configured, skipping binding suggestions.
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.502] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Looking for node in the PATH
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.502] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Execute command '/usr/bin/which node'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.assistCreatingConnection(
    org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams@a1eecfc,
    org.sonarsource.sonarlint.core.rpc.client.SonarLintCancelChecker@335f560c
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$assistCreatingConnection$16(SonarLintRpcClientImpl.java:234)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.502] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Waiting for connection creation notification...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.506] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Command '/usr/bin/which node' exited with 0
stdout: /usr/bin/node
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.506] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Found node at /usr/bin/node
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.506] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Checking node version...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.506] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Execute command '/usr/bin/node -v'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.514] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Command '/usr/bin/node -v' exited with 0
stdout: v18.17.1
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.514] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Detected node version: 18.17.1
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.514] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Auto-detected Node.js path set to: /usr/bin/node (version 18.17.1)
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.514] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Loaded 0 plugins
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.516] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Creating container for module 'configScopeB'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.517] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Creating container for module 'configScopeA'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.didChangeAnalysisReadiness(
    [configScopeB, configScopeA],
    true
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$didChangeAnalysisReadiness$33(SonarLintRpcClientImpl.java:358)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.517] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Binding suggestions computation queued for connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.517] [Binding Suggestion Provider] DEBUG sonarlint - Skipping binding suggestion computation as it is disabled
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.603] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.603] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.603] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.603] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Query project 'projectKey' on connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.getCredentials(
    "connectionId"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$getCredentials$21(SonarLintRpcClientImpl.java:267)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.604] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No credentials for connection 'connectionId'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.selectProxies(
    http://localhost:45103
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$selectProxies$23(SonarLintRpcClientImpl.java:282)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.606] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - GET 200 http://localhost:45103/api/components/show.protobuf?component=projectKey | response time=2ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.606] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Downloaded project details in 2ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.606] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.606] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:14:41.606] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.noBindingSuggestionFound(
    org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams@a1e8ffc
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$noBindingSuggestionFound$32(SonarLintRpcClientImpl.java:354)

	at mediumtest.fixtures.SonarLintBackendFixture$FakeSonarLintRpcClient.noBindingSuggestionFound(SonarLintBackendFixture.java:854)
	at mediumtest.issues.OpenFixSuggestionInIdeMediumTests.it_should_not_assist_binding_if_multiple_suggestions(OpenFixSuggestionInIdeMediumTests.java:201)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

Check failure on line 854 in medium-tests/src/test/java/mediumtest/fixtures/SonarLintBackendFixture.java

View check run for this annotation

Cirrus CI / test_linux

medium-tests/src/test/java/mediumtest/fixtures/SonarLintBackendFixture.java#L854

mediumtest.issues.OpenIssueInIdeMediumTests.it_should_not_assist_binding_if_multiple_suggestions
Raw output
Argument(s) are different! Wanted:
fakeSonarLintRpcClient.noBindingSuggestionFound(
    org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams@6aa3e23b
);
-> at mediumtest.fixtures.SonarLintBackendFixture$FakeSonarLintRpcClient.noBindingSuggestionFound(SonarLintBackendFixture.java:854)
Actual invocations have different arguments:
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.53] [main] INFO org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl - SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@6716eb44
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.575] [SonarLint Server RPC sequential executor] INFO sonarlint - Telemetry disabled on server startup
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.578] [SonarLint Server RPC sequential executor] INFO sonarlint - Started embedded server on port 64120
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.579] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Starting local-only issue database from /tmp/slUserHome3180009706985062426/xodus-local-only-issue-store9272947334798485022
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.listFiles(
    "configScopeB"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$30(SonarLintRpcClientImpl.java:334)
fakeSonarLintRpcClient.listFiles(
    "configScopeA"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$listFiles$30(SonarLintRpcClientImpl.java:334)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Binding suggestion computation queued for config scopes 'configScopeB,configScopeA'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Looking for node in the PATH
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - Attempt to find a good match for 'SonarLint IntelliJ 2' on connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Execute command '/usr/bin/which node'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Assist connection and binding if needed for project projectKey and server http://localhost:46265/
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - Load projects from connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.getCredentials(
    "connectionId"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$getCredentials$21(SonarLintRpcClientImpl.java:267)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Query project 'projectKey' on connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.getCredentials(
    "connectionId"
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$getCredentials$21(SonarLintRpcClientImpl.java:267)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Binding Suggestion Provider] DEBUG sonarlint - No credentials for connection 'connectionId'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.595] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No credentials for connection 'connectionId'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.selectProxies(
    http://localhost:46265
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$selectProxies$23(SonarLintRpcClientImpl.java:282)
fakeSonarLintRpcClient.selectProxies(
    http://localhost:46265
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$selectProxies$23(SonarLintRpcClientImpl.java:282)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Command '/usr/bin/which node' exited with 0
stdout: /usr/bin/node
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Found node at /usr/bin/node
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Checking node version...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Execute command '/usr/bin/node -v'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [Binding Suggestion Provider] DEBUG sonarlint - GET 200 http://localhost:46265/api/components/search.protobuf?qualifiers=TRK&ps=500&p=1 | response time=2ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - GET 200 http://localhost:46265/api/components/show.protobuf?component=projectKey | response time=2ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [Binding Suggestion Provider] DEBUG sonarlint - Page downloaded in 3ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [Binding Suggestion Provider] DEBUG sonarlint - Creating index for 1 project
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.598] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Downloaded project details in 3ms
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - Found 0 suggestions for configuration scope 'configScopeB'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - Attempt to find a good match for 'SonarLint IntelliJ 1' on connection 'connectionId'...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Binding Suggestion Provider] DEBUG sonarlint - Found 0 suggestions for configuration scope 'configScopeA'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.suggestBinding(
    {"configScopeB" = [], "configScopeA" = []}
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$suggestBinding$5(SonarLintRpcClientImpl.java:173)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - No binding clues were found
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - Match connections...
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.599] [Show Issue or Hotspot Request Handler] DEBUG sonarlint - 0 clues having at least one matching connection
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.noBindingSuggestionFound(
    org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams@330f7d20
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$noBindingSuggestionFound$32(SonarLintRpcClientImpl.java:354)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.604] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Command '/usr/bin/node -v' exited with 0
stdout: v18.17.1
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.604] [SonarLint Server RPC sequential executor] DEBUG org.sonarsource.sonarlint.core.nodejs.NodeJsHelper - Detected node version: 18.17.1
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.604] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Auto-detected Node.js path set to: /usr/bin/node (version 18.17.1)
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.604] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Loaded 0 plugins
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.607] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Creating container for module 'configScopeB'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.log(
     [2024-09-12T08:08:59.607] [SonarLint Server RPC sequential executor] DEBUG sonarlint - Creating container for module 'configScopeA'
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$log$9(SonarLintRpcClientImpl.java:199)
fakeSonarLintRpcClient.didChangeAnalysisReadiness(
    [configScopeB, configScopeA],
    true
);
-> at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$didChangeAnalysisReadiness$33(SonarLintRpcClientImpl.java:358)

	at mediumtest.fixtures.SonarLintBackendFixture$FakeSonarLintRpcClient.noBindingSuggestionFound(SonarLintBackendFixture.java:854)
	at mediumtest.issues.OpenIssueInIdeMediumTests.it_should_not_assist_binding_if_multiple_suggestions(OpenIssueInIdeMediumTests.java:277)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

public List<DidChangeTaintVulnerabilitiesParams> getTaintVulnerabilityChanges() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.config.DidUpdateConnectionsParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.config.SonarCloudConnectionConfigurationDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.fix.FixSuggestionDto;
Expand Down Expand Up @@ -197,7 +198,7 @@ void it_should_not_assist_binding_if_multiple_suggestions() throws Exception {
var statusCode = executeOpenFixSuggestionRequestWithoutToken(FIX_PAYLOAD, ISSUE_KEY, PROJECT_KEY, BRANCH_NAME, ORG_KEY);

assertThat(statusCode).isEqualTo(200);
verify(fakeClient, timeout(1000)).noBindingSuggestionFound(PROJECT_KEY);
verify(fakeClient, timeout(1000)).noBindingSuggestionFound(new NoBindingSuggestionFoundParams(PROJECT_KEY, true));
verify(fakeClient, never()).showIssue(any(), any());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.config.DidUpdateConnectionsParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.config.SonarQubeConnectionConfigurationDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.issue.IssueDetailsDto;
Expand Down Expand Up @@ -273,7 +274,7 @@ void it_should_not_assist_binding_if_multiple_suggestions() throws Exception {
var statusCode = executeOpenIssueRequest(ISSUE_KEY, PROJECT_KEY, BRANCH_NAME);

assertThat(statusCode).isEqualTo(200);
verify(fakeClient, timeout(1000)).noBindingSuggestionFound(PROJECT_KEY);
verify(fakeClient, timeout(1000)).noBindingSuggestionFound(new NoBindingSuggestionFoundParams(PROJECT_KEY, false));
verify(fakeClient, never()).showIssue(any(), any());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.sonarsource.sonarlint.core.rpc.protocol.backend.tracking.TaintVulnerabilityDto;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.AssistBindingResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.binding.NoBindingSuggestionFoundParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionParams;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.AssistCreatingConnectionResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.client.connection.ConnectionSuggestionDto;
Expand Down Expand Up @@ -305,7 +306,7 @@ public List<ClientFileDto> listFiles(String configScopeId) {
}

@Override
public void noBindingSuggestionFound(String projectKey) {
public void noBindingSuggestionFound(NoBindingSuggestionFoundParams params) {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@
public class NoBindingSuggestionFoundParams {

private final String projectKey;
private final boolean isSonarCloud;

public NoBindingSuggestionFoundParams(String projectKey) {
public NoBindingSuggestionFoundParams(String projectKey, boolean isSonarCloud) {
this.projectKey = projectKey;
this.isSonarCloud = isSonarCloud;
}

public String getProjectKey() {
return projectKey;
}

public boolean isSonarCloud() {
return isSonarCloud;
}
}

0 comments on commit e67473c

Please sign in to comment.