We seem to be running into an issue with our azure devops pipeline task that publishes the Quality gate results. We are getting the below error and it seems to be consistently happening since the beginning of the day.
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
##[error][SQ] Could not fetch task for ID 'AWdaq41jza0Kta76fCiN'
##[error][SQ] API GET '/api/ce/task' failed, status code was: 404
We did have another pipeline that was failing with the same error but after a couple of attempts that went through however the above pipeline is consistently failing.
Is there any known issues at the moment as I don’t believe we have changed anything since it stopped working?
Could you share the logs of your Azure DevOps build please? You can reach me privately if needed.
Do you also know if the environment variables SYSTEM_PULLREQUEST_SOURCECOMMITID and BUILD_SOURCEVERSION are set?
Thank you for having a look at this for me, We have had a look and cant see any references to these variables in our build definition. I will send you the logs shorty via a private message.
Sorry to have to chase you up on this but we are still having issues with our builds and it seems Sonarcloud results are not being posted back to the PR’s now either. Do you have a time-frame for when this will be resolved?
Hi @Daniel_iSams, what is the project type (.NET, Nodejs, Java, etc…) you are scanning during build?
Our SonarCloud also have some “unable to load component …” issue, while running SonarQube Scanner on a task “Run Code Analysis”.
Do you guys experienced such issue on SonarCloud?
This issue appears to be resolved for some of our builds, but one definition is still throwing the error on the Publish Quality Gate Result task:
##[error][SQ] API GET ‘/api/ce/task’ failed, status code was: 404
##[error][SQ] Could not fetch task for ID ‘AWdaq41jza0Kta76fCiN’
##[error][SQ] API GET ‘/api/ce/task’ failed, status code was: 404
Is there anything cached? Do we need to change anything our end?
Hi - We are using Azure Devops Hosted Agents. It is a fresh agent every time. There is no possibility of there being a cached file left over from previous builds.
@Daniel_iSams according to the logs I received privately, the task “Publish Quality Gate Result” reads an analysis report that was not generated by the previous task “Run Code Analysis”. That means that the file is cached between builds. A workaround is detailed in https://jira.sonarsource.com/browse/VSTS-190.
@gregpakes your problem seems to be different as you guarantee that build cache is disabled. Could you please send me your logs privately? Thanks.
@simon.brandhof Just to clarify, the people on this thread are all developers from iSAMS experiencing the same blocking issues.
All of our build definitions are using Azure Devops hosted agents. At present we have been forced to disable sonarcloud for definitions experiencing issue #1 outlined above. To workaround issue #2 we have been forced to make the sonarcloud PR branch policy optional.
Both workaround are leaving us in an undesirable position.
Someone will send you some example logs privately.
As a primary workaround for the failing pipelines, you can disable the “Publish Task Result”, as this task only publishes the quality gate summary / result to the summary of the pipeline itself.
Some more questions that can help us troubleshoot :
For succeeding build pipeline, are the results correctly sent to your SonarCloud project (not only for PR, but also for branches) ?
Could you check that the Azure DevOps token you filled in the “Pull Request” section of the project’s setting hasn’t expired ?
Do yo have the possibility to re-issue the failing build that you provide the logs above with “system.debug=true” variable, to see if the task id that hasn’t been found remains the same ?