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

Check agent is correctly installed during plugin startup #1000

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

mc1arke
Copy link
Owner

@mc1arke mc1arke commented Nov 16, 2024

Users currently submit a number of reports for Sonarqube reporting that branch analysis is not available despite them having the plugin installed, which are typically triggered by the user not having set up the Java agent on one of the components correctly. This is compounded by the Sonarqube plugin screen showing the plugin as being installed in these scenarios even where the plugin's classes and configuration have not been fully loaded into Sonarqube. To overcome this, the plugin bootstrap class is now checking for the agent having made an alteration to one of the bootstrap methods as an indication that the agent has run successfully for both the Compute Engine and Web components, with the plugin failing to start if either component doesn't detect the agent modifications, and therefore preventing the Sonarqube server starting. Whilst this won't fully resolve the problem of users not installing the plugin properly, it prevents them believing the plugin is installed and then only finding out things aren't right at the point they try and submit an analysis with branch or pull request properties.

Users currently submit a number of reports for Sonarqube reporting that
branch analysis is not available despite them having the plugin
installed, which are typically triggered by the user not having set up
the Java agent on one of the components correctly. This is compounded by
the Sonarqube plugin screen showing the plugin as being installed in
these scenarios even where the plugin's classes and configuration have
not been fully loaded into Sonarqube. To overcome this, the plugin
bootstrap class is now checking for the agent having made an alteration
to one of the bootstrap methods as an indication that the agent has run
successfully for both the Compute Engine and Web components, with the
plugin failing to start if either component doesn't detect the agent
modifications, and therefore preventing the Sonarqube server starting.
Whilst this won't fully resolve the problem of users not installing the
plugin properly, it prevents them believing the plugin is installed and
then only finding out things aren't right at the point they try and
submit an analysis with branch or pull request properties.
@mc1arke mc1arke merged commit 6259650 into master Nov 17, 2024
12 checks passed
@mc1arke mc1arke deleted the installation-check branch November 17, 2024 12:09
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.

1 participant