-
Notifications
You must be signed in to change notification settings - Fork 52
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
SLCORE-668: Fix download of sonar-text #847
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
thahnen
force-pushed
the
fix/tha/SLCORE-668_SonarText
branch
from
January 26, 2024 13:58
6aeaf96
to
4006d04
Compare
thahnen
changed the title
(WIP) SLCORE-668: Fix download of sonar-text
SLCORE-668: Fix download of sonar-text
Jan 26, 2024
jblievremont
approved these changes
Jan 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Tested in SLVSCODE:
- Standalone mode uses the embedded analyzer
- Connected mode with SQ 9.9 also uses embedded analyzer
- Connected mode with SQ 10.4 uses the one from the server (with custom rule enabled)
Quality Gate passedIssues Measures |
henryju
pushed a commit
that referenced
this pull request
Feb 1, 2024
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
henryju
pushed a commit
that referenced
this pull request
Feb 1, 2024
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
henryju
pushed a commit
that referenced
this pull request
Feb 1, 2024
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
henryju
pushed a commit
that referenced
this pull request
Feb 2, 2024
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
henryju
pushed a commit
that referenced
this pull request
Feb 2, 2024
It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
There was an issue that connecting SonarLint to SQ 10.3 and earlier worked the same as before. However, with 10.4, the
sonar-text
analyzer wasn't downloaded anymore because it was still seen as embedded while thePluginsSynchonizer
was synchronizing the plug-ins for the connection.The first approach to mitigate this issue only worked when the connection was established; the IDE was closed and then opened again for the synchronization to start again. This was due to the check to remove the embedded instance of
sonar-text
not being able to access the server information yet to check the SQ version.The synchronization of the SQ server information was not finished the first time, but when the IDE was restarted, the information was already present.
With this PR, the changes are now finally in place to wait for the server information to be synchronized before making the check on SQ 10.4+ (when we don't use the embedded
sonar-text
but rather fetch the one from the server alongsidesonar-text-enterprise
) and before handing everything over to thePluginsSynchonizer
to synchronize the plug-ins to be downloaded.Testing
Due to SQ 10.4 DEV currently not yet including the new
sonar-text
andsonar-text-enterprise
versions, which support SonarLint via the manifest attributes, there are unit as well as medium tests in place to emulate the behavior of having SQ 10.4 and SQ 10.3!Additionally, manual tests were done with the new
sonar-text
andsonar-text-enterprise
versions and SQ 10.4 DEV locally, where the plug-ins were exchanged alongside manual testing against SQ 10.3 and SQ 10.2 wheresonar-text
was not to be downloaded but where the embedded one should be used.