Breaking Change in latest version of sonar-scanner-vsts

Which versions are you using

  • SonarQube : 9.9.4.87374
  • AzureDevOps scanner : 5.19.1 (/v4)

How is SonarQube deployed

zip

What happened ?

In the latest update of the AzureDevOps sonar-scanner-vsts task (5.19.1) there was a feature to remove the trailing “/” character on the SonarQube endpoint URL (SONARQUBE_ENDPOINT service connection variable). VSTS-338 Reintroduce compatibility of v4 tasks (#346) · SonarSource/sonar-scanner-vsts@6b3e7ad · GitHub
Notably, we used the v4 version of the task in our yaml pipelines, but that issue still arose since the v5 update. Did you make a back port fix ?

What we did to fix this

We were using that variable later on to call the Sonar API. So that automated update caused us to have a nasty breaking change to understand.
The fix was easy, we added the slash manually afterwards, but we just wanted to warn that modifying common variables in the pipeline context could be dangerous.

Hey there.

Thanks for the headsup. Using SONARQUBE_ENDPOINT elsewhere in the pipeline wasn’t expected (we don’t document this variable). We’ll keep our ears open for any other feedback, but in the meantime I’m glad you were able to fix the issue.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.