# SonarCloud not reporting Quality Gate Status back to DevOps PR

**URL:** <https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482>\
**Category:** SonarQube Cloud\
**Tags:** azure, azuredevops-services\
**Created:** [January 4, 2021, 11:45am UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482 "2021-01-04T11:45:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimLove](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jimlove/32/18065_2.png) [@JimLove](https://community.sonarsource.com/u/JimLove)\
**Post date:** [January 4, 2021, 11:45am UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/1 "2021-01-04T11:45:23Z")

</div>

- ALM used (Azure DevOps)
- CI system used (Azure DevOps)

We have branch policies that protect a branch with PR, and a Status Check policy on the Quality Gate results of an analysis.

Everything is working fine, I can see the quality gate result in SonarCloud, but it is not reporting back to the PR in DevOps, thus the PR is stuck with the quality gate status check in “Waiting”.

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/6/f/6f09e692f90453a5d26407caee33d3e06610b07b.png)

I have refreshed & updated the PAT from DevOps into the Administration tab, under Pull Requests, re-queued the build (which runs the analysis as a task), but this has had no effect.

---

<div class="post-metadata">

**Author:** ![wamcubs](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@wamcubs](https://community.sonarsource.com/u/wamcubs)\
**Post date:** [January 4, 2021, 3:26pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/2 "2021-01-04T15:26:11Z")

</div>

Hey what version of Azure DevOps are you using? We are having the same issue. It started when we upgraded to AzDO 2020 from 2019. Could be a compatibility issue. Hoping they get to fix it quickly.

---

<div class="post-metadata">

**Author:** ![JimLove](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jimlove/32/18065_2.png) [@JimLove](https://community.sonarsource.com/u/JimLove)\
**Post date:** [January 4, 2021, 3:40pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/3 "2021-01-04T15:40:48Z")

</div>

Hi Andrew - we’re using the hosted Azure DevOps, rather than Azure DevOps Server. Makes me think though if a change in the SonarCloud end has interfered how it works with the latest version of DevOps.

---

<div class="post-metadata">

**Author:** ![audriusB](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/audriusb/32/18198_2.png) [@audriusB](https://community.sonarsource.com/u/audriusB)\
**Post date:** [January 7, 2021, 12:33pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/4 "2021-01-07T12:33:11Z")

</div>

We are experiencing same issue as well on hosed Azure DevOps.  
can I ask if you are using SonarCloud build breaker task in your pipelines?  
[SonarCloud build breaker - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SimondeLang.sonarcloud-buildbreaker&ssr=false#qna)

We are trying to understand if this is an extension issue or Azure DevOps one

---

<div class="post-metadata">

**Author:** ![JimLove](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jimlove/32/18065_2.png) [@JimLove](https://community.sonarsource.com/u/JimLove)\
**Post date:** [January 7, 2021, 12:44pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/5 "2021-01-07T12:44:52Z")

</div>

Nah we’re using the SonarSource extension:

[SonarCloud - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud&targetId=16b22cc8-3f4c-4f28-838a-324473a62b25&utm_source=vstsproduct&utm_medium=ExtHubManageList)

---

<div class="post-metadata">

**Author:** ![Rouke.Broersma.IS](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rouke.broersma.is/32/6487_2.png) [@Rouke.Broersma.IS](https://community.sonarsource.com/u/Rouke.Broersma.IS)\
**Post date:** [January 7, 2021, 12:53pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/6 "2021-01-07T12:53:45Z")

</div>

The build breaker plugin would have no impact on pull request decoration so it is not related.

---

<div class="post-metadata">

**Author:** ![dkcdbh](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dkcdbh](https://community.sonarsource.com/u/dkcdbh)\
**Post date:** [January 7, 2021, 1:22pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/7 "2021-01-07T13:22:15Z")

</div>

> [@Rouke.Broersma.IS](#):
>
> mpact on pull req

please elaborate?

---

<div class="post-metadata">

**Author:** ![Rouke.Broersma.IS](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rouke.broersma.is/32/6487_2.png) [@Rouke.Broersma.IS](https://community.sonarsource.com/u/Rouke.Broersma.IS)\
**Post date:** [January 7, 2021, 1:31pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/8 "2021-01-07T13:31:55Z")

</div>

Pull request decoration is async from the pipeline. You push the report to sonarqube, sonarqube processes it and when done decorates the pull request. Meanwhile your build could still be going, or your build could fail due to the build breaker plugin, but sonarqube is still going to perform the pull request decoration.

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [January 7, 2021, 2:32pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/9 "2021-01-07T14:32:13Z")

</div>

Hi @JimLove and @audriusB ,

Apologies for the late reply. Can you share the background task id of the analysis that was not reported to the Azure DevOps PR? You can find it in Administration -\> Background Tasks. Given that information, I can investigate further to see what may be the issue.

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![audriusB](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/audriusb/32/18198_2.png) [@audriusB](https://community.sonarsource.com/u/audriusB)\
**Post date:** [January 7, 2021, 3:44pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/11 "2021-01-07T15:44:16Z")

</div>

Hi Marcin,  
Here is an example Background Task Id for PR stuck in “Waiting” state  
AXbdgTxaVXZ4b-ylW3qY

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [January 7, 2021, 4:18pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/12 "2021-01-07T16:18:06Z")

</div>

Hi @audriusB,

I checked the logs and it seems that the call to AzureDevOps is unauthorized. Are you sure that the token in the project configuration is valid?

Can you share the properties that you use to run the analysis **in private message**? I want to double-check few things.

Best,  
Marcin

---

<div class="post-metadata">

**Author:** ![JimLove](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jimlove/32/18065_2.png) [@JimLove](https://community.sonarsource.com/u/JimLove)\
**Post date:** [January 7, 2021, 4:41pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/13 "2021-01-07T16:41:52Z")

</div>

Hi @Marcin_Majewski ,

Here’s a task ID for my failure:

AXbMsP10nSBF5SJu\_hCk

EDIT: I’ve noticed this is now updating the PRs as expected, it may have been a short, intermittent issue only appearing on Monday (Jan 4th).

---

<div class="post-metadata">

**Author:** ![audriusB](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/audriusb/32/18198_2.png) [@audriusB](https://community.sonarsource.com/u/audriusB)\
**Post date:** [January 8, 2021, 10:55am UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/14 "2021-01-08T10:55:01Z")

</div>

We are still experiencing the issue.  
@JimLove, maybe there was something you did that got it resolved for you? Since Marcin says my issue is related to authorization (and I’m assuming we have same issue), maybe you tried something in that area?  
@Marcin_Majewski  
we tried it out on a new sonar project with new token and sonar gate is still “waiting” in devOps PR  
DevOps Sonar service connection is working, sonar analysis is working and is showing in SonarCloud. Only quality gate is failing.  
Also, how can I send a private message?

---

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [January 8, 2021, 11:21am UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/17 "2021-01-08T11:21:42Z")

</div>

I sent a private message.

---

<div class="post-metadata">

**Author:** ![JimLove](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jimlove/32/18065_2.png) [@JimLove](https://community.sonarsource.com/u/JimLove)\
**Post date:** [January 8, 2021, 11:22am UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/18 "2021-01-08T11:22:02Z")

</div>

> [@audriusB](#):
>
> @JimLove, maybe there was something you did that got it resolved for you? Since Marcin says my issue is related to authorization (and I’m assuming we have same issue), maybe you tried something in that area?

You may be right. I did generate a new PAT and added it to the Administration page in SonarCloud, but my initial test didn’t show any difference in results. Maybe it took some time to update, or cache was being used somewhere…

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [January 15, 2021, 2:32pm UTC](https://community.sonarsource.com/t/sonarcloud-not-reporting-quality-gate-status-back-to-devops-pr/36482/22 "2021-01-15T14:32:46Z")

</div>

Closed on January 15, 2021, 2:32pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
