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

#569: Add support for release 9.4 of Sonarqube #570

Closed
wants to merge 1 commit into from

Conversation

mc1arke
Copy link
Owner

@mc1arke mc1arke commented Apr 4, 2022

The latest release of Sonarqube switches from using Pico Container for
dependency injection to using Spring. The method used for detecting the
constructor to be used for injecting in a multi-constructor class varies
between the 2 frameworks, with Pico only looking for public constructors
but Spring looking for any visible constructor, and then excluding any
constructors that do not have the @Autowired annotation on a muti-
constructor class. This change adds the relevant annotation onto the two
classes impacted by this change in frameworks, thereby allowing for the
Compute Engine to have the appropriate components generated for
completing decoration of Pull Requests.

The latest release of Sonarqube switches from using Pico Container for
dependency injection to using Spring. The method used for detecting the
constructor to be used for injecting in a multi-constructor class varies
between the 2 frameworks, with Pico only looking for public constructors
but Spring looking for any visible constructor, and then excluding any
constructors that do not have the `@Autowired` annotation on a muti-
constructor class. This change adds the relevant annotation onto the two
classes impacted by this change in frameworks, thereby allowing for the
Compute Engine to have the appropriate components generated for
completing decoration of Pull Requests.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@xahhy
Copy link

xahhy commented Apr 5, 2022

So this will fix the issue of not show PR decoration for version 9.4 right? Will it be a new version of the plugin?

@mc1arke
Copy link
Owner Author

mc1arke commented Apr 5, 2022

So this will fix the issue of not show PR decoration for version 9.4 right?

Yes. You can test this out by using the snapshot build of the plugin from this Pull Request: See the arifact section on https://github.com/mc1arke/sonarqube-community-branch-plugin/actions/runs/2092692348

Will it be a new version of the plugin?

Yes. This will be a new minor version of the plugin

@mc1arke mc1arke mentioned this pull request Apr 5, 2022
@mc1arke
Copy link
Owner Author

mc1arke commented Apr 8, 2022

I'm proposing this is superceded by #572 and #574 since they fix the constructor injection issue without making the plugin require Spring to be present, and therefore allows the plugin to remain backwards compatible with 9.1 and above of Sonarqube.

@mc1arke mc1arke closed this Apr 10, 2022
@honzajscz
Copy link

I have tested the above-mentioned snapshot and PRs are decorated by the comments. However, a status check is not updated and PRs cannot be closed in Azure DevOps
image

I have also noticed that the See the PR link is missing after the update. This is before update
image

@mc1arke
Copy link
Owner Author

mc1arke commented Apr 11, 2022

@honzajscz your issues indicate the scan didn't actually complete in Sonarqube so you either need to check if the scan is still pending, or whether it hit an error.

However, the PR is no longer being progressed so if the snapshot you were testing is the one from this PR then I'm not sure it's going to prove very much.

@mc1arke mc1arke deleted the sq-9_4-support branch December 31, 2022 16:44
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.

3 participants