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

Update ITs to always use the latest version of the Scanner for .NET #8439

Merged
merged 3 commits into from
Dec 11, 2023

Conversation

antonioaversa
Copy link
Contributor

@antonioaversa antonioaversa commented Dec 5, 2023

Bump S4NET to latest (6.0.0.81631)

The 6.0.0.81631 release of the S4NET is a major version release, introducing several breaking changes that need to be tested with sonar-dotnet ITs.

The PR stays in draft for the time being, since we may not need this if we successfully run on the latest S4NET.

The work to run on the latest S4NET, instead of a fixed version, will be done in the context of SonarSource/sonar-scanner-msbuild#1774

The first commit of the PR, authored by @antonioaversa, was only for testing of 6.0.0.81631 in sonar-dotnet.
The final version of the PR authored by @costin-zaharia-sonarsource, taking advantage of the new "latest version" feature of the orchestrator, is done in this commit and this commit.

its/pom.xml Outdated
@@ -20,7 +20,7 @@
</organization>

<properties>
<scannerMsbuild.version>5.15.0.80890</scannerMsbuild.version>
<scannerMsbuild.version>6.0.0.81631</scannerMsbuild.version>

Choose a reason for hiding this comment

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

I think we should discuss the "how" of the current sprint before making these changes. One valid approach to avoid in the future this kind of commits is to always download the latest released version.

@antonioaversa antonioaversa marked this pull request as draft December 5, 2023 09:34
@antonioaversa antonioaversa changed the title Bump S4NET to 6.0.0.81631 for ITs Bump Scanner for .NET to 6.0.0.81631 for ITs Dec 5, 2023
@costin-zaharia-sonarsource costin-zaharia-sonarsource force-pushed the antonio/bump-s4net-6.0.0.81631 branch 6 times, most recently from 6aa5b13 to 603264a Compare December 7, 2023 22:11
<artifactId>sonar-scanner-msbuild</artifactId>
<version>${scannerMsbuild.version}</version>
<type>zip</type>
<classifier>net46</classifier>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@costin-zaharia-sonarsource
Educational: was this dependency there to ensure that the zip was locally available for the orchestrator to use it? Or it was unnecessary, since the orchestrator was retrieving the zip of the scanner by itself anyway?

Choose a reason for hiding this comment

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

I do not know. I suspect it was a leftover; probably, it was installed from a local path at some point and then, the code changed and the configuration remained forgotten.

<version>3.6.1</version>
<executions>
<execution>
<id>get-scanner-2.1</id>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@costin-zaharia-sonarsource
Educational: I guess the <type>zip</type> above, in the sonar-scanner-msbuild dependency, was not enough to get the zip of the scanner?

Choose a reason for hiding this comment

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

I do not know. This seems to be very old. My understanding is that it wasn't used/needed anymore.

<artifactId>sonar-scanner-msbuild</artifactId>
<groupId>org.sonarsource.scanner.msbuild</groupId>
<packaging>zip</packaging>
<version>2.1.0.0</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@costin-zaharia-sonarsource
Educational: It is unclear to me what is the relation between this <configuration> element, which refers to version 2.1.0.0, and the dependency element above, which refers to <version>${scannerMsbuild.version}</version>, so to 5.15.0.80890 (in the previous version of the code).
Was version 2.1.0.0 incorrect, and overridden by the dependency element, so not used by the maven-dependency-plugin to perform the download?

Choose a reason for hiding this comment

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

I do not know. This seems to be very old. My understanding is that it wasn't used/needed anymore. Probably configuration changed and this was forgotten.

its/pom.xml Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

LGTM!

Copy link

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
No Duplication information No Duplication information

Copy link

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
No Duplication information No Duplication information

Copy link
Contributor Author

@antonioaversa antonioaversa left a comment

Choose a reason for hiding this comment

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

Changes done in this commit and this commit LGTM!

@antonioaversa antonioaversa marked this pull request as ready for review December 11, 2023 14:32
@antonioaversa antonioaversa merged commit c4fe953 into master Dec 11, 2023
35 checks passed
@antonioaversa antonioaversa deleted the antonio/bump-s4net-6.0.0.81631 branch December 11, 2023 14:33
@costin-zaharia-sonarsource costin-zaharia-sonarsource changed the title Bump Scanner for .NET to 6.0.0.81631 for ITs Update ITs to always use the latest version of the Scanner for .NET Dec 11, 2023
matemoln pushed a commit that referenced this pull request Dec 13, 2023
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