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

SCANJLIB-244 Log server type info on bootstrap #219

Conversation

aleksandra-bozhinoska-sonarsource
Copy link
Contributor

@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource commented Dec 26, 2024

SCANJLIB-244

PR Scope

  • Log server type on bootstrap, distinguishing between SonarQube Cloud/Server/Community Build.

TODOs:

  • After the changes are merged, the logging should be removed from sonar-scanner-cli and (potentially) sonar-scanner-maven and sonar-scanner-gradle; the version of the java library dependency should be updated accordingly
  • Decide on whether the server edition type should be added to the log and whether that will belong to the scope of this task or another

How to test?
Run the scanner with the local version of sonar-scanner-java-library (3.2-SNAPSHOT)

  1. When executing analysis using SonarQube Server:
  • ‘Communicating with SonarQube Server {version}’ INFO log message should be displayed. Example: ‘Communicating with SonarQube Server 2025.1-SNAPSHOT’
  1. When executing analysis using SonarQube Community Build:
  • ‘Communicating with SonarQube Community Build {version}’ INFO log message should be displayed. Example: ’Communicating with SonarQube Community Build 25.1-SNAPSHOT’
  1. When executing analysis using SonarQube Cloud:
  • ’Communicating with SonarQube Cloud’ INFO log message should be displayed.

Tasks

  • Investigate if some logs should be removed from the Sonar Scanner from Maven and Gradle
  • Create the ticket to remove the log line from sonar-scanner-cli
  • If relevant, create the tickets for the Maven and Gradle scanners

@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource force-pushed the improvement/aleksandrab/SCANJLIB-244/rebranding-in-logs branch from 57e6ebf to c4ba2e4 Compare December 26, 2024 14:16
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource marked this pull request as ready for review December 27, 2024 17:07
Copy link
Contributor

@claire-villard-sonarsource claire-villard-sonarsource left a comment

Choose a reason for hiding this comment

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

Good job!

I like the description in the PR, with the test cases and the follow-up actions. It is helpful for me to understand the scope of the feature as a whole. I also appreciate the description of the test procedure, it makes the review easier.

Do you plan to open the PR for sonar-scanner-cli (and maybe Maven and Gradle) too? Maybe we could do it to take care of this task end-to-end even if we are not the maintainers of the Maven and Gradle scanners, it could be helpful for the JVM squad to just review the changes.
At least, I believe we should open tickets for the 3 scanners and link them to this ticket to make sure the task is not forgotten.
(after discussion, we need a release to do the scanner changes and the release date is not planned yet, so opening tickets is enough)

I'll proceed with testing now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Tested successfully!

Communication with sonarcloud.io:

18:34:42.888 INFO Communicating with SonarQube Cloud

And with a local server with different versions:

18:39:51.179 INFO  Communicating with SonarQube Community Build 25.1-SNAPSHOT
19:10:08.158 INFO  Communicating with SonarQube Server 2025.1-SNAPSHOT
19:22:06.582 INFO  Communicating with SonarQube Server 2025.1.0.1234

I added some tasks related to my previous comment in the description though. It is not a blocker to merge this PR, and I think it should be done before closing the ticket.

Also, do you know if/when we plan to release the 3.2 version of this lib?

@aleksandra-bozhinoska-sonarsource
Copy link
Contributor Author

Tested successfully!

Communication with sonarcloud.io:

18:34:42.888 INFO Communicating with SonarQube Cloud

And with a local server with different versions:

18:39:51.179 INFO  Communicating with SonarQube Community Build 25.1-SNAPSHOT
19:10:08.158 INFO  Communicating with SonarQube Server 2025.1-SNAPSHOT
19:22:06.582 INFO  Communicating with SonarQube Server 2025.1.0.1234

I added some tasks related to my previous comment in the description though. It is not a blocker to merge this PR, and I think it should be done before closing the ticket.

Also, do you know if/when we plan to release the 3.2 version of this lib?

Thank you for reviewing Claire - I agree and will add the tests before merging, to have it complete in one place.

About the tickets in the scanners, yes we can do that after closing this one.

And about the release date, I am not sure, since I have merged @henryju's refactoring PR which will introduce some changes in the scanner projects - we should check this with him.

@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource force-pushed the improvement/aleksandrab/SCANJLIB-244/rebranding-in-logs branch from c4ba2e4 to 77e03b0 Compare January 3, 2025 16:37
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource force-pushed the improvement/aleksandrab/SCANJLIB-244/rebranding-in-logs branch from 77e03b0 to fe6c06b Compare January 6, 2025 09:39
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource merged commit 754c3c1 into master Jan 6, 2025
7 checks passed
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource deleted the improvement/aleksandrab/SCANJLIB-244/rebranding-in-logs branch January 6, 2025 10:23
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