SonarQube publish Quality Gate task fails on Azure Devops

DevOps builds are failing in “Publish Quality Gate Result” task. We have observed an upgrade on SonarQube in Azure DevOps service on Oct 1, 2021 at 5:33 PM GMT+5:30, post that builds are starts failing.

2021-10-04T08:34:36.7562552Z ##[debug][SQ] Waiting for task ‘AXxKcCOEo0JxDiMpyFoc’ to complete.
2021-10-04T08:34:36.7563469Z ##[debug][SQ] API GET: ‘/api/ce/task’ with query “{“id”:“AXxKcCOEo0JxDiMpyFoc”,“additionalFields”:“warnings”}”
2021-10-04T08:34:36.7687074Z ##[debug]Response: 400 Body: “{“errors”:[{“msg”:“Value of parameter ‘additionalFields’ (warnings) must be one of: [stacktrace, scannerContext]”}]}”
2021-10-04T08:34:36.7691572Z ##[debug][SQ] API GET ‘/api/ce/task’ failed, status code was: 400
2021-10-04T08:34:36.7725672Z ##[error][SQ] API GET ‘/api/ce/task’ failed, status code was: 400
2021-10-04T08:34:36.7733830Z ##[debug]Processed: ##vso[task.issue type=error;][SQ] API GET ‘/api/ce/task’ failed, status code was: 400
2021-10-04T08:34:36.7740229Z ##[debug][SQ] Publish task error: [SQ] Could not fetch task for ID ‘AXxKcCOEo0JxDiMpyFoc’
2021-10-04T08:34:36.7744244Z ##[debug]task result: Failed
2021-10-04T08:34:36.7748266Z ##[error][SQ] Could not fetch task for ID ‘AXxKcCOEo0JxDiMpyFoc’

Hi @jispnsvc welcome to the community.

Which version of SonarQube are you using ?

Thanks.
Mickaël

Hi @mickaelcaro ,

We are using sonar version 6.7.6

Thanks. I would strongly suggest to upgrade (the one you’re using is not supported anymore), the feature on which you have the error message is supported for SQ > 7.4.

Mickaël

Thanks for your response.
This issue started arising on Oct 1, 2021 at 5:33 PM GMT+5:30. There is a version upgrade 4.23.0 (Latest) happened on DevOps service.

Is it possible to use previous version in DevOps pipelines to mitigate this issue.

Hey @mickaelcaro,
I am also facing a similar issue, please help at the earliest. Is it possible to use the previous version in DevOps pipelines to mitigate this issue?

Hi @ashranbaig

Yes, please follow this post : SonarQube VSTS Extension v4.23.0 Fails to Launch - #6 by Colin_SonarSource