What version of SonarQube extension is preinstalled on the hosted agents in Azure Devops?

My team is facing a problem similar to this: Publish Quality Gate Results Task Hanging up - #11 by mickaelcaro

There’s a fix available since Oct 2022 (VSTS extension 5.8.1). However, it is not clear whether our self-hosted build agents have gotten this version yet. This extension is preinstalled on them, but the version is unclear. All we know is that we call a SonarQubePublish@5 step in the pipeline.

How do I find what version of the extension I got on the hosted AzDO agent that is running the pipeline?

Hi,

The very first block of logs on the specific task is displaying the version, ie :

HTH,

Thanks Mickaël,

My logs shows a version 5.0.2 that does not exist on the SonarQube extension releases page: Releases · SonarSource/sonar-scanner-vsts · GitHub

I suppose this is a version of something else, e.g. sonar-scanner-msbuild? But this version has never been in the config.js of the extension either?..

If so, how do I infer the version of the extension from it (because the bugfix was done in the extension)?

And - if the extension is indeed old - is there a way to update it on the hosted agent?

5.0.2 is the last version of the publish task currently. There are multiple versionning in place for the extension. The extension itself has its own version (currently 5.10.0), and each of the tasks (Prepare, Analyze, Publish) have their own versions too.

How do I know if the task 5.0.2 includes the bugfix 5.8.1?

I would do it the other way around. Start from the extension version (5.8.1) and check if it has the wished publish task version on it for instance.
We don’t publish that information in a clear manner TBH, but our repo is public, you can check the tag that corresponds to the extension version, and dig a bit in the repo tree.

For instance here, selecting tag sq-5.8.1, you can see that publish task version was already 5.0.2 : sonar-scanner-vsts/task.json at sq-5.8.1 · SonarSource/sonar-scanner-vsts · GitHub

HTH,