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

SLCORE-668: Fix download of sonar-text #847

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

thahnen
Copy link
Member

@thahnen thahnen commented Jan 26, 2024

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 the PluginsSynchonizer 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 alongside sonar-text-enterprise) and before handing everything over to the PluginsSynchonizer to synchronize the plug-ins to be downloaded.

Testing

Due to SQ 10.4 DEV currently not yet including the new sonar-text and sonar-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 and sonar-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 where sonar-text was not to be downloaded but where the embedded one should be used.

It wasn't downloaded on SQ 10.4 DEV because it was still concidered to be embedded when the synchonization was happening.
@thahnen thahnen force-pushed the fix/tha/SLCORE-668_SonarText branch from 6aeaf96 to 4006d04 Compare January 26, 2024 13:58
@thahnen thahnen changed the title (WIP) SLCORE-668: Fix download of sonar-text SLCORE-668: Fix download of sonar-text Jan 26, 2024
@thahnen thahnen marked this pull request as ready for review January 26, 2024 14:59
Copy link
Member

@jblievremont jblievremont left a 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)

@thahnen thahnen merged commit c99c071 into master Jan 29, 2024
11 checks passed
@thahnen thahnen deleted the fix/tha/SLCORE-668_SonarText branch January 29, 2024 15:41
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants