Issue Description : Sonar Cloud Publish step is running indefinitely then fails with agent runtime error.
There is no change made to Sonar Prepare step / Publish step neither on any pipeline’s configurations.
Failure/Error message : ##[error]The job running on agent Hosted Agent ran longer than the maximum time of 60 minutes.
##[error]The operation was cancelled.
Sonar publish task was working fine till September 21st , It used to take 10 minutes to execute and publish sonar results to sonar cloud and on 21st suddenly our pipelines started failing as the sonar publish step alone is taking more than 60 minutes. This results our agent to throw error with "The job running on agent Hosted Agent ran longer than the maximum time of 60 minutes. "
Could you please provide more detailed logs about the issue? Also, I’m not sure I have clear the name of at least one of the projects so I can try to dig further.
Hi, Thanks for checking this issue. I am not able to send the complete debug logs here . It just shows as loading and nothing happens. Can you please drop me mail at prakash.menon@wipro.com so I can send the logs via email.
I sent you a private through this platform as it’s the preferred method to share information. Could you please check your messages to see the one I sent you?
Apologies for the delay in my response as I’ve been out for some time. I’ll take a look at this with priority today and hopefully provide an answer to your issue soon.
From the information you’ve sent me, it seems that the issue is related to the decoration of the PR, meaning, what’s timing out is the Publish Quality Gate Result, is that accurate? Could you please confirm that if you log into SonarCloud you can see the results of a given PR?
I can see from one of the logs that
...
2023-09-20T18:41:17.5184370Z [INFO] ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=GeminiDevops_Gemini-App&pullRequest=3126
2023-09-20T18:41:17.5185168Z [INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2023-09-20T18:41:17.5609684Z [INFO] Analysis total time: 1:23.340 s
2023-09-20T18:41:17.5626239Z [INFO] ------------------------------------------------------------------------
2023-09-20T18:41:17.5627865Z [INFO] BUILD SUCCESS
2023-09-20T18:41:17.5630119Z [INFO] ------------------------------------------------------------------------
2023-09-20T18:41:17.5645556Z [INFO] Total time: 02:18 min
2023-09-20T18:41:17.5649243Z [INFO] Finished at: 2023-09-20T18:41:17Z
2023-09-20T18:41:17.5651341Z [INFO] ------------------------------------------------------------------------
...
And later,
2023-09-20T18:41:17.9352768Z ==============================================================================
2023-09-20T18:41:17.9352962Z Task : Publish Quality Gate Result
2023-09-20T18:41:17.9353087Z Description : Publish SonarCloud's Quality Gate result on the Azure Pipelines build result. To be used after the actual analysis.
2023-09-20T18:41:17.9353301Z Version : 1.13.0
2023-09-20T18:41:17.9353402Z Author : sonarsource
2023-09-20T18:41:17.9353519Z Help : Version: 1.13.0. [More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
2023-09-20T18:41:17.9353753Z ==============================================================================
2023-09-20T19:36:03.7794655Z ##[error]The operation was canceled.
2023-09-20T19:36:03.7798394Z ##[section]Finishing: SonarCloudPublish
Confirming that the issue is related only to publishing the QG will help me to narrow the issue.
No , We are not able to see the results in sonar cloud. If we create new branch and run analysis the new branch results are not getting populated in sonar cloud. The logs shows as it is publishing results but when we check in cloud we not able to see the branch name .
Alright, thanks @prakashmenon19 . Is it possible if you could activate the SonarCloud scan, run it again and provide me the logs only shown in the “1_Job.txt” (the rest is not needed)?
If it times out again, perhaps review the next day if you can see the analysis results in SonarCloud just to confirm or not if they are shown there.
We have run the sonar analysis again in branch feature/sonar and can see its same issue. the issue is at Sonarcloudpublish as mentioned above. The task runs for 1 hour and then pipeline fails.
Hi Aura , can you please update on this issue. Pending from long and we are not able to run sonar analysis on our code. Can we please have quick meeting so we can screen share and show what is happening might be useful for the investigation.