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

SLLS-207 do not notify backend after assistCreatingConnection #401

Merged

Conversation

sophio-japharidze-sonarsource
Copy link
Contributor

@sophio-japharidze-sonarsource sophio-japharidze-sonarsource commented Oct 11, 2024

var newConnectionId = assistCreatingConnectionResponse.getNewConnectionId();
if (newConnectionId != null) {
var serverProductName = isSonarCloud ? "SonarCloud" : "SonarQube";
client.showMessage(new MessageParams(MessageType.Info, format("Connection to %s was successfully created.", serverProductName)));
backendServiceFacade.getBackendService().didChangeConnections(currentConnections);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call was in fact making things worse, as it was "faking" to notifying SLCORE that a connection was added BEFORE it had actually reached SLLS settings storage. SLCORE already has a mechanism that waits for the actual connection creation for 5 seconds.

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@vnaskos-sonar vnaskos-sonar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't reproduce the 401 error, I guess it depends a lot on timing. The change makes total sense though 👍

@sophio-japharidze-sonarsource sophio-japharidze-sonarsource merged commit 1f92e49 into master Oct 14, 2024
10 checks passed
@sophio-japharidze-sonarsource sophio-japharidze-sonarsource deleted the SLLS-207_assistConnection_hardening branch October 14, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants