Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLE-986: Update Parent POM, Release Notes, SLCORE #780

Merged
merged 6 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ qa_connectedModeSonarQube_task:
SQ_VERSION: 'LATEST_RELEASE'
QA_CATEGORY: 'LATEST_RELEASE'
- env:
SQ_VERSION: 'DEV[10.8]'
SQ_VERSION: 'DEV'
QA_CATEGORY: 'DEV'
<<: *SETUP_MAVEN_CACHE_QA
<<: *SETUP_ORCHESTRATOR_CACHE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ public void shouldAutomaticallyUpdateRuleSetWhenChangedOnServer() throws Excepti
}

@Test
@Ignore("12/2024: Due to last minute changes in SQ-S 10.8 and onwards the change of the setting does not work anymore")
public void switch_between_modes() throws Exception {
Assume.assumeTrue(orchestrator.getServer().version().isGreaterThanOrEquals(10, 8));

Expand Down
3 changes: 2 additions & 1 deletion its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sonarsource.parent</groupId>
<artifactId>parent</artifactId>
<version>80.0.0.2205</version>
<version>82.0.0.2314</version>
<relativePath />
</parent>

Expand All @@ -22,6 +22,7 @@
</modules>

<properties>
<license.name>GNU LGPL v3</license.name>
<license.title>SonarLint for Eclipse ITs</license.title>
<license.mailto>[email protected]</license.mailto>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
4 changes: 2 additions & 2 deletions org.sonarlint.eclipse.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
<artifactItem>
<groupId>org.sonarsource.java</groupId>
<artifactId>sonar-java-plugin</artifactId>
<version>8.6.0.37351</version>
<version>8.7.0.37452</version>
<type>jar</type>
</artifactItem>
<artifactItem>
<groupId>org.sonarsource.java</groupId>
<artifactId>sonar-java-symbolic-execution-plugin</artifactId>
<version>8.6.0.37351</version>
<version>8.7.0.37452</version>
<type>jar</type>
</artifactItem>
<artifactItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
import org.sonarsource.sonarlint.core.rpc.protocol.backend.binding.GetSharedConnectedModeConfigFileParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.binding.GetSharedConnectedModeConfigFileResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.branch.DidVcsRepositoryChangeParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.branch.GetMatchedSonarProjectBranchParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.branch.GetMatchedSonarProjectBranchResponse;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.config.DidChangeCredentialsParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.projects.GetAllProjectsParams;
import org.sonarsource.sonarlint.core.rpc.protocol.backend.connection.projects.SonarProjectDto;
Expand Down Expand Up @@ -328,14 +326,6 @@ public void didVcsRepositoryChange(ISonarLintProject project) {
.didVcsRepositoryChange(new DidVcsRepositoryChangeParams(ConfigScopeSynchronizer.getConfigScopeId(project)));
}

public GetMatchedSonarProjectBranchResponse getMatchedSonarProjectBranch(ISonarLintProject project)
throws InterruptedException, ExecutionException {
return getBackend()
.getSonarProjectBranchService()
.getMatchedSonarProjectBranch(new GetMatchedSonarProjectBranchParams(ConfigScopeSynchronizer.getConfigScopeId(project)))
.get();
}

public void credentialsChanged(ConnectionFacade connection) {
getBackend().getConnectionService().didChangeCredentials(new DidChangeCredentialsParams(connection.getId()));
}
Expand Down
32 changes: 21 additions & 11 deletions org.sonarlint.eclipse.ui/intro/RELEASE_NOTES.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,29 @@ <h1>{VERSION}</h1>
-->

<div>
<h1>10.9.1</h1>
<h1>10.10</h1>
<p>
See the <a href="https://github.com/SonarSource/sonarlint-eclipse/releases">GitHub Release page</a>
<ul>
<li>Rebranding from SonarLint to SonarQube for IDE</li>
thahnen marked this conversation as resolved.
Show resolved Hide resolved
<li>Drop support of username/password authentication for SonarQube Server</li>
<li>Support Standard / MQR Mode for SonarQube Server 10.8+</li>
<li><a href="https://sonarsource.atlassian.net/browse/SLCORE-858">Fixed an issue with the plug-ins temporary storage growing</a></li>
<li>Update Java analyzer -> <a href="https://github.com/SonarSource/sonar-java/releases/tag/8.7.0.37452">8.7</a></li>
<li>Update JS/TS/CSS analyzer -> <a href="https://github.com/SonarSource/SonarJS/releases/tag/10.18.0.28572">10.18</a></li>
<li>Update PHP analyzer -> <a href="https://github.com/SonarSource/sonar-php/releases/tag/3.40.0.12590">4.40</a></li>
<li>Update Python analyzer -> <a href="https://github.com/SonarSource/sonar-python/releases/tag/4.24.0.18631">4.24</a></li>
<li>Update HTML analyzer -> <a href="https://github.com/SonarSource/sonar-html/releases/tag/3.17.0.5548">3.17</a></li>
<li>Update XML analyzer -> <a href="https://github.com/SonarSource/sonar-xml/releases/tag/2.12.0.5749">2.12</a></li>
<li>Update text and secrets analyzer -> 2.19</li>
</ul>
</p>
</div>

<div>
<h2>10.9.1</h2>
<p>
See the <a href="https://github.com/SonarSource/sonarlint-eclipse/releases/tag/10.9.1.82333">GitHub Release page</a>
<ul>
<li><a href="https://sonarsource.atlassian.net/browse/SLE-989">Drop the dependency on EGit, rely only on shaded JGit.</a></li>
</ul>
Expand All @@ -44,16 +64,6 @@ <h2>10.9</h2>
</p>
</div>

<div>
<h2>10.8</h2>
<p>
See the <a href="https://github.com/SonarSource/sonarlint-eclipse/releases/tag/10.8.0.82289">GitHub Release page</a>
<ul>
<li><a href="https://sonarsource.atlassian.net/browse/SLE-948">Drop the PyDev sub-plug-in, only providing Syntax Highlighting in Rule Descriptions</a></li>
<li>Fixed some bugs and regressions.</li>
</ul>
</p>
</div>

<div>
<h2>Older releases</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.sonarlint.eclipse.ui.internal.job;

import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.CoreException;
Expand All @@ -32,16 +31,12 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.sonarlint.eclipse.core.SonarLintLogger;
import org.sonarlint.eclipse.core.documentation.SonarLintDocumentation;
import org.sonarlint.eclipse.core.internal.backend.ConfigScopeSynchronizer;
import org.sonarlint.eclipse.core.internal.backend.SonarLintBackendService;
import org.sonarlint.eclipse.core.internal.jobs.AnalysisReadyStatusCache;
import org.sonarlint.eclipse.core.internal.vcs.VcsService;
import org.sonarlint.eclipse.core.resource.ISonarLintFile;
import org.sonarlint.eclipse.core.resource.ISonarLintProject;
import org.sonarlint.eclipse.ui.internal.SonarLintUiPlugin;
import org.sonarlint.eclipse.ui.internal.dialog.AwaitProjectConnectionReadyDialog;
import org.sonarlint.eclipse.ui.internal.util.BrowserUtils;
import org.sonarlint.eclipse.ui.internal.util.MessageDialogUtils;

/**
Expand All @@ -55,15 +50,12 @@ public abstract class AbstractOpenInEclipseJob extends Job {

protected final ISonarLintProject project;
private final boolean skipAnalysisReadyCheck;
private final boolean skipBranchCheck;

protected AbstractOpenInEclipseJob(String name, ISonarLintProject project, boolean skipAnalysisReadyCheck,
boolean skipBranchCheck) {
protected AbstractOpenInEclipseJob(String name, ISonarLintProject project, boolean skipAnalysisReadyCheck) {
super(name);

this.project = project;
this.skipAnalysisReadyCheck = skipAnalysisReadyCheck;
this.skipBranchCheck = skipBranchCheck;
}

@Override
Expand Down Expand Up @@ -116,15 +108,6 @@ protected IStatus run(IProgressMonitor monitor) {
return Status.CANCEL_STATUS;
}
file = fileOpt.get();

/**
* Due to the Git logic moving slowly to SLCORE to be IDE-independant, this check might already been done on
* their side based on the feature using this logic. On the long run this is going to be removed as the branch
* check will be done completely on SLCORE side for every feature.
*/
if (!skipBranchCheck && !tryMatchBranches()) {
return Status.CANCEL_STATUS;
}
}

try {
Expand Down Expand Up @@ -158,48 +141,6 @@ private Optional<ISonarLintFile> tryGetLocalFile() {
return fileOpt;
}

/**
* Branch check: Local and remote information should match (if no local branch found, at least try your best).
*
* As mentioned above, this might not be needed by every feature building on-top of this class and will eventually
* be removed. That is also the reason for the constructor flag!
*/
private boolean tryMatchBranches() {
var branch = getBranch();
if (branch == null) {
return false;
}

// In case SLCORE is not yet ready for the SonarProjectBranchService, we also check via this plug-ins VcsService
// using the JGit dependency coming bundled from SLCORE. This should yield a result when actually in a Git
// repository but if not, it is no problem as it is only used in case of the Open in IDE with automatic Connected
// Mode setup.
Optional<String> localBranch = Optional.empty();
try {
var response = SonarLintBackendService.get().getMatchedSonarProjectBranch(project);
localBranch = Optional.ofNullable(response.getMatchedSonarProjectBranch());
} catch (InterruptedException | ExecutionException err) {
SonarLintLogger.get().debug("Cannot get matched branch from backend, trying local VCS service", err);
}
if (localBranch.isEmpty()) {
localBranch = VcsService.getCachedSonarProjectBranch(project);
}

if (localBranch.isEmpty()) {
// This error message may be misleading to COBOL / ABAP developers but that is okay for now :>
MessageDialogUtils.branchNotAvailable("The local branch of the project '" + project.getName()
+ "' could not be determined. SonarLint now can only try to find the matching local issue!");
} else if (!branch.equals(localBranch.get())) {
MessageDialogUtils.branchMismatch("The local branch '" + localBranch.get() + "' of the project '"
+ project.getName() + "' does not match the remote branch '" + branch + "'. "
+ "Please checkout the correct branch and invoke the requested action once again!");
BrowserUtils.openExternalBrowser(SonarLintDocumentation.BRANCH_AWARENESS, Display.getDefault());
return false;
}

return true;
}

/**
* The actual feature specific logic after everything is set up accordingly and the base checks are done.
*
Expand All @@ -210,13 +151,4 @@ private boolean tryMatchBranches() {

/** As we work per "ISonarLintFile" we want to get the IDE (project relative) path from a file on the server */
abstract String getIdeFilePath();

/**
* This is needed to get the branch from the specific feature information, shouldn't be overwritten by sub-classes
* that have "skipBranchCheck" set to "true"!
*/
@Nullable
protected String getBranch() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class OpenFixSuggestionInEclipseJob extends AbstractOpenInEclipseJob {
private final FixSuggestionDto fixSuggestion;

public OpenFixSuggestionInEclipseJob(FixSuggestionDto fixSuggestion, ISonarLintProject project) {
super("Open fix suggestion in IDE", project, true, true);
super("Open fix suggestion in IDE", project, true);

this.fixSuggestion = fixSuggestion;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class OpenIssueInEclipseJob extends AbstractOpenInEclipseJob {
private final boolean askedForPreferenceChangeAlready;

public OpenIssueInEclipseJob(OpenIssueContext context) {
super(context.getName(), context.getProject(), false, false);
super(context.getName(), context.getProject(), false);

this.name = context.getName();
this.issueDetails = context.getIssueDetails();
Expand All @@ -80,11 +80,6 @@ protected String getIdeFilePath() {
return issueDetails.getIdeFilePath().toString();
}

@Override
protected String getBranch() {
return issueDetails.getBranch();
}

/** Handle normal issues: They can be present as On-the-fly / Report markers */
private IStatus handleNormalIssue() throws CoreException {
// Check with possible On-The-Fly markers of that file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,10 @@ public static void dialogCancelled(String message) {
showError("Dialog cancelled", message);
}

public static void branchMismatch(String message) {
showError("Branch does not match", message);
}

public static void openInEclipseFailed(String message) {
showError("Open in Eclipse failed", message);
}

public static void branchNotAvailable(String message) {
Display.getDefault().syncExec(() -> MessageDialog.openInformation(
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Branch not matchable", message));
}

/** For the "Open in IDE" feature we want to display a yes/no question for the user to answer */
public static void openInIdeQuestion(String message, Runnable yesHandler) {
Display.getDefault().asyncExec(() -> {
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.sonarsource.parent</groupId>
<artifactId>parent</artifactId>
<version>80.0.0.2205</version>
<version>82.0.0.2314</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -60,6 +60,7 @@


<properties>
<license.name>GNU LGPL v3</license.name>
<license.title>SonarLint for Eclipse</license.title>
<license.mailto>[email protected]</license.mailto>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -76,7 +77,7 @@
<tycho.version>4.0.8</tycho.version>

<!-- Sloop embedded CLI version for fragment projects -->
<sloop.version>10.11.0.79652</sloop.version>
<sloop.version>10.11.0.79687</sloop.version>

<!-- SonarQube analysis -->
<sonar.java.source>11</sonar.java.source>
Expand Down
2 changes: 1 addition & 1 deletion target-platforms/commons-build.target
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<dependency>
<groupId>org.sonarsource.sonarlint.core</groupId>
<artifactId>sonarlint-java-client-osgi</artifactId>
<version>10.11.0.79652</version>
<version>10.11.0.79687</version>
<type>jar</type>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions target-platforms/commons-its.target
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
<version>2.2.222</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -83,7 +83,7 @@
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator</artifactId>
<version>4.0.0.404</version>
<version>5.1.0.2254</version>
<type>jar</type>
</dependency>
</dependencies>
Expand All @@ -104,7 +104,7 @@ DynamicImport-Package: *
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator-junit4</artifactId>
<version>4.0.0.404</version>
<version>5.1.0.2254</version>
<type>jar</type>
</dependency>
</dependencies>
Expand Down
Loading