SonarQubePublish v6 fails with network errors ([SQ] API GET '/api/qualitygates/project_status')

Hi, we run into “network issues” with the azure devops task SonarQubePublish v6 (6.2.0).
With SonarQubePublish v5 this did not happen.

We are using Gitlab-Pipelines and Azure-DevOps pipelines with our self-hosted sonarqube instance.
Sonarqube is behind a reverse proxy. With gitlab there are no issues, only with devops.
The devops agents are cloud-agents.

Tested with Sonarqube Versions 10.5.xxx and currently 10.6.0.92116 > same result.

We are using the Azure DevOps Tasks SonarQubePrepare and SonarQubePublish in two devops pipelines (and depending on the pipeline SonarQubeAnalyze or Gradle).

In one pipeline we’re still using the Task Version v5 (SonarQubePrepare 5.19.2; SonarQubePublish 5.6.2). In this pipeline everything works well, besindes the warnings about the deprecated version.

In the other pipeline we are using Task Version v6 (SonarQubePrepare, Analyze and Publish all 6.2.0). We are getting the following error in about 1 of 3 pipeline runs:

Starting: SonarQubePublish
==============================================================================
Task         : Publish Quality Gate Result
Description  : Publish SonarQube's Quality Gate result on the Azure DevOps build result, to be used after the actual analysis.
Version      : 6.2.0
Author       : sonarsource
Help         : [More Information](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarqube-extension-for-azure-devops/)
==============================================================================
##[error]Error retrieving analysis: [SQ] API GET '/api/qualitygates/project_status' failed, error is network timeout at: https://sonar.xyz/api/qualitygates/project_status?analysisId=id
##[warning]Error while executing SonarQube:Publish task: Could not fetch analysis for ID 'id'

In the sonarqube logs web-logs all requests are answered with 200 - OK.

We’ve added retries to the Publish Task now as workaround. The second time the task finishes successfully.

Hi,

Welcome to the community!

According to your SonarQube logs, the requests are served successfully. That leads me to two questions:

  • What’s the turnaround time on those successful requests? Does it look reasonable? Excessive?
  • You’ve said you’ve got a proxy in the middle. What do its logs say? SonarQube is handing off the results just fine, so it seems reasonable to guess that it’s the middleman fumbling them.

 
Ann

Hi,

thank you for your response!

I’d ask the same questions, but as soon as I change the task version from SonarQubePublish@6 to SonarQubePublish@5 the issues are gone.

I’m working on getting access to the proxy logs. Other departments and so on… :wink:

1 Like