SonarCloud does not post summary comment to Pull Request on Github

Hello,
We have recently moved from SonarQube to SonarCloud to take advantage of the many features this version provided. Especially PR and branch analysis.

Our project is a NodeJs + Typescript service. We have our repository on Github and we run CircleCI to build and run our tests. We have a combination of Unit and integration tests, which we run before calling the SonarCloud step using the SonarCloud orb version 2.0.0.

For the most part works good, however the PR analysis does not leave a summary comment unless we enable the GitHub action.

We had the Github action running on build, which left the summary comment in the PR, however this is redundant since we run the scan also on CircleCI pipeline. Also, the Github summary comment lack the coverage that was later gathered by the sonar CircleCI pipeline step.

Note that we have the sonar-project.properties file for this same reason, we only have the coverage generated on the pipeline and is not pushed to the repository or uploaded anywhere else.

Our sonar-project.properties has but a few properties set:

sonar.projectKey=**our project key**
sonar.organization=**out organization**

#--- SonarQube server properties
sonar.host.url=https://sonarcloud.io

# --- Project properties (https://docs.sonarqube.org/latest/analyzing-source-code/analysis-parameters/)
sonar.sources=src
sonar.language=ts
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.exclusions=src/**/**.spec.ts, src/**/**.test.ts, src/**/*.snap, src/test/**/*

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

Iā€™ve also tried adding the following properties dynamically prior to run the scan:

url="${CIRCLE_PULL_REQUEST}"
pullRequestKey=${url##*/}

echo "sonar.pullrequest.base=main" >> sonar-project.properties
echo "sonar.pullrequest.branch=${CIRCLE_BRANCH}" >> sonar-project.properties
echo "sonar.pullrequest.key=$pullRequestKey" >> sonar-project.properties

We need help tidying this up as we find the PR summary to be very helpful. What could be the problem?

Hi,

Are you still experiencing this today?

 
Thx,
Ann

Hi G Ann,

Yes, this is pretty much still happening. Iā€™ve review as much as I could to make sure its all sound.
I made sure project is bound to Github, and the pull request summary is enabled. But still no luck.

Iā€™ve also noticed that event the Github action has stopped working now, it did not leave the summary comment. Other times we noticed it will only leave a comment once and never update.

I hope this can be solved as this is almost a deal breaker for us.

1 Like

Hi,

The calvary has been called in.

 
Ann

1 Like

Hi @fechy

I hope this time the cavalry wonā€™t be late :slight_smile:
Could you please share the full GitHub actions workflow file here?
Iā€™ll also contact you in a private thread to get some private information to help with the investigation.

Could you confirm when you started to see that problem? Did you ever have the summary working, and it stopped, or did it never work for you?

Also, at this precise moment, there are 2 incidents happening, one on the GitHub side and one on the SonarCloud side (happening since yesterday morning CET) that could also be impacting you, the timing information will help me figure out if it is the same issue or not at all.

Thanks in advance,
Claire

1 Like

Hi Claire,

I appreciate your quick response.

I mentioned that out Github action is to be discontinued because we rely on CircleCI to run our tests and provide the coverage. So having the Github action running is redundant.

In terms of timing, we have just recently started using SonarCloud, and on Monday the Github action was sort of working (with no coverage though). The CircleCI pipeline was never updating the pull request.

We can put this on pause until this incidents are gone and retry right after and if its continuing we can review the configuration. What you think?

Iā€™ll appreciate you can provide me with some status page or similar I can check to see if the incident is solved.

Kind regards,

Hi,

The Pull request incident on SonarCloud started yesterday morning CET, I suspect you may be quite unlucky on this one.
We are implementing the fix at the moment, and it should be fixed in the coming hours.
If it works for you, sure, letā€™s resume the investigation once they are fixed. You can follow the progress here: https://sonarcloud.statuspage.io/
or here: Azure DevOps PR decoration incident
The title mentions Azure DevOps but it seems to be wider than just Azure.

If I understood correctly, your target is to use Circle CI, so I suggest we focus on having this solution working? Have you followed our in-product tutorial specific to Circle CI to configure the build, with coverage and everything?
You can access it in SonarCloud, and click on your project. On the left bar, click ā€œInformationā€. On the left column of the page, at the very bottom, click ā€œCheck analysis methodā€ and then choose the ā€œCircle CIā€ tutorial.

From the CircleCi part all is working, coverage gathered and analysis running. Only missing piece is the Github summary comment.

It would be great to update the status page though. At the moment, it says that the Github integration is operational so I took some time trying to figure out why it stopped working on our end before I finally found this thread.

Also experiencing the same issue on our projects. If that can help, this occurs only on the projects which are not directly bound to github (for instance this one is not working anymore but that one still is).

2 Likes

Thanks a lot yā€™all for your contribution!

We will update the status page, and I confirm that the issue affects Azure DevOps and unbound repositories on other platforms only.
ETA for the fix is 20:00 GMT+2 today (in ~2 hours)

1 Like

Hi,

Yes, the incident affects Azure DevOps and unbound projects in the platforms. Iā€™ll post further status updates here:

 
Ann

1 Like

Hi @Claire_Villard,
The issue is now fixed, we are getting the PR summary comment with the proper analysis data from CircleCI posted without the need of Github actions.

Kudos! and thanks for your help.

2 Likes

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