SonarQube DevOps extension 5.19.2 still contain 5.19.1 tasks

Hi,

We have this warning in our builds

This task was configured to use Java 11, but the SonarQube server v10.4.1 does not support it. Ignoring the configuration and using JAVA_HOME instead. Specify jdkversion in your task definition to use Java 17 to remove this warning.

I installed version 5.19.2 of the SonarQube DevOps extensions but I still see version 5.19.1 being installed

Downloading task: SonarQubePrepare (5.19.1)
Downloading task: SonarQubeAnalyze (5.19.1)
Downloading task: SonarQubePublish (5.6.1)

I opened sonar-scanner-vsts-5.19.2.2534-sonarqube.vsix and if i look at tasks\analyze\v5\task.json it still mentions 5.19.1 not .2

Hi,

Could you provide your pipeline and your analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann

Not sure what the logs wil tell that I haven’t already mentioned
I installed version 5.19.2 of the SonarQube DevOps extensions.

But the package contains the 5.19.1 SonarQubePrepare and SonarQubeAnalyze tasks so effectively this fix hasn’t been released.

Starting: Prepare analysis on SonarQube
==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 5.19.1
Author       : sonarsource
Help         : Version: 5.19.1. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================

Starting: Run Code Analysis
==============================================================================
Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarQube server.
Version      : 5.19.1
Author       : sonarsource
Help         : Version: 5.19.1. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
##[warning]This task was configured to use Java 11, but the SonarQube server v10.4.1 does not support it. Ignoring the configuration and using JAVA_HOME instead. Specify jdkversion in your task definition to use Java 17 to remove this warning.

Hi,

That doesn’t look like verbose logging…

 
Ann

I’m confused why would you need a log file, to me this is clearly an issue where the old 5.19.1 tasks are packaged in the new 5.19.2 vsix

If you unzip sonar-scanner-vsts-5.19.2.2534-sonarqube.vsix, and look at the task.json for each task you can see the version number

  • Prepare Analysis Configuration 5.19.1
  • Run Code Analysis 5.19.1
  • Publish Quality Gate Result 5.6.1

Hello @Valentijn and thank you for reaching out,

The versions of the tasks are independant from the extension version. In fact, lots of tasks have completely different versions than the current extension version 5.19.2.

The version that you see for the SonarQube extension

  • Prepare Analysis Configuration 5.19.1
  • Run Code Analysis 5.19.1
  • Publish Quality Gate Result 5.6.1

Are the latest one:

Regarding the warning that you see

This task was configured to use Java 11, but the SonarQube server v10.4.1 does not support it. Ignoring the configuration and using JAVA_HOME instead. Specify jdkversion in your task definition to use Java 17 to remove this warning.

To fix this warning, you can modify your pipeline configuration to specify jdkversion at the run analysis step:

- task: SonarQubeAnalyze@5
  inputs:
    jdkversion: 'JAVA_HOME_17_X64'

Thanks for the answer, i’ll ignore the warning for now.
My build agents are running java_21_x64 which is not a supported option, guess i’ll wait for the 6 version of the tasks.

Hello @Valentijn ,

Alternatively, to drop the warning right now, you can also specify JAVA_HOME and ensure your java home is set to Java 21:

- task: SonarQubeAnalyze@5
  inputs:
    jdkversion: 'JAVA_HOME'

I have created an internal ticket to let users select Java 21 in their pipeline, we will release it in the upcoming days in the current version of the tasks, so you will be able to use it without waiting for the next major version.