Azure DevOps puslish report bug

Hi SonarSources team!

We are facing this strange behavior sometimes:

This is Scan log:


2022-01-10T14:18:55.7366481Z 14:18:55.735 DEBUG: Report metadata written to D:\a\_temp\sonar\1.0.2804.83004-[preprod]\d4489441-4839-ed5b-f19a-f5d854b6e4a7\report-task.txt

2-01-10T14:18:55.7394710Z 14:18:55.738 DEBUG: Post-jobs :

2022-01-10T14:18:55.7487947Z 14:18:55.747 DEBUG: eslint-bridge server will shutdown

2022-01-10T14:19:03.0471012Z 14:19:03.046 INFO: Analysis total time: 5:30.875 s

2022-01-10T14:19:03.0593564Z 14:19:03.058 INFO: ------------------------------------------------------------------------

2022-01-10T14:19:03.0594340Z 14:19:03.058 INFO: EXECUTION SUCCESS

2022-01-10T14:19:03.0595078Z 14:19:03.058 INFO: ------------------------------------------------------------------------

2022-01-10T14:19:03.0595952Z 14:19:03.058 INFO: Total time: 6:09.392s

2022-01-10T14:19:03.9846811Z 14:19:03.981 INFO: Final Memory: 371M/1168M

2022-01-10T14:19:04.2301512Z 14:19:03.981 INFO: ------------------------------------------------------------------------

2022-01-10T14:19:04.2328416Z ##[debug]Exit code 0 received from tool 'D:\a\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.26.0\sonar-scanner\bin\sonar-scanner.bat'

2022-01-10T14:19:04.2329999Z ##[debug]STDIO streams have closed for tool 'D:\a\_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.26.0\sonar-scanner\bin\sonar-scanner.bat'

This is Publish log:


##[debug] D:\a\_temp\sonar (directory)

##[debug] D:\a\_temp\sonar\1.0.2804.83004-[preprod] (directory)

##[debug] D:\a\_temp\sonar\1.0.2804.83004-[preprod]\d4489441-4839-ed5b-f19a-f5d854b6e4a7 (directory)

##[debug] D:\a\_temp\sonar\1.0.2804.83004-[preprod]\d4489441-4839-ed5b-f19a-f5d854b6e4a7\report-task.txt (file)

##[debug]4 results

##[debug]found 4 paths

##[debug]applying include pattern

##[debug]adjustedPattern: 'D:\a\_temp\sonar\1.0.2804.83004-[preprod]\**\report-task.txt'

##[debug]0 matches

##[debug]0 final results

##[debug][SQ] Searching for sonar\1.0.2804.83004-[preprod]\**\report-task.txt - found 0 file(s)

##[warning]No analyses found in this build! Please check your build configuration.

But sometimes it just works:


##[debug] D:\a\_temp\sonar\1.0.3262.83014-[NG-8002-Sonarcloud] (directory)

##[debug] D:\a\_temp\sonar\1.0.3262.83014-[NG-8002-Sonarcloud]\05960be9-edcc-4623-bd33-79f6b2fe9104 (directory)

##[debug] D:\a\_temp\sonar\1.0.3262.83014-[NG-8002-Sonarcloud]\05960be9-edcc-4623-bd33-79f6b2fe9104\report-task.txt (file)

##[debug]3 results

##[debug]found 3 paths

##[debug]applying include pattern

##[debug]adjustedPattern: 'D:\a\_temp\sonar\1.0.3262.83014-[NG-8002-Sonarcloud]\**\report-task.txt'

##[debug]1 matches

##[debug]1 final results

##[debug][SQ] Searching for sonar\1.0.3262.83014-[NG-8002-Sonarcloud]\**\report-task.txt - found 1 file(s)

##[debug][SQ] Read Task report file: D:\a\_temp\sonar\1.0.3262.83014-[NG-8002-Sonarcloud]\05960be9-edcc-4623-bd33-79f6b2fe9104\report-task.txt

Can you help us with that? What might be the course of the issue?

Thanks!

Hi @ArtemT

Which version of the task itself is used for those 2 executions ? It should be shown at the very beginning of the logs. Are those 2 builds on the same machine / build agent ?

Thank you.

Hi @mickaelcaro

Task         : Run Code Analysis
Description  : Run scanner and upload the results to the SonarCloud server.
Version      : 1.26.0
Author       : sonarsource
Help         : Version: 1.26.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
Task         : Publish Quality Gate Result
Description  : Publish SonarCloud's Quality Gate result on the Azure Pipelines build result. To be used after the actual analysis.
Version      : 1.11.0
Author       : sonarsource
Help         : Version: 1.11.0. [More Information](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/)

The agents are different, but image is the same, so it shouldn’t affect

Image: windows-2019
Agent: Azure Pipelines 23
Started: Mon at 5:19 PM
Duration: 6m 53s

Hi @ArtemT would it be possible to have full logs of both task, in both cases please ? I’d like to see whether the report is correctly written. I can send you a DM if you wish to share privately, let me know.

Thanks

Hi @mickaelcaro ,
Please, DM me