It should not be a warning when failing to publish github results when master

  • which versions are you using (SonarQube 9.4.0-DE, dockerized)
  • what are you trying to achieve
    Analysis of master branch
  • what have you tried so far to achieve this
    Normal processing of code base in Jenkins, Overview page shows a warning. Log file contains stack-trace for failure:
2022.07.12 08:39:43 INFO  ce[AYHxkGIhMeSggZqRht3T][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=2ms
2022.07.12 08:39:43 INFO  ce[AYHxkGIhMeSggZqRht3T][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=0ms
2022.07.12 08:39:44 WARN  ce[AYHxkGIhMeSggZqRht3T][c.s.F.C.A.B] Failed to access GitHub, the repository or the Pull Request
2022.07.12 08:39:44 WARN  ce[AYHxkGIhMeSggZqRht3T][c.s.F.D.F.J] Branch decoration failed
java.lang.IllegalStateException: Failed to report status to Devops platform: couldn't get the branch details
	at com.sonarsource.F.D.F.J.B(Unknown Source)
	at com.sonarsource.F.D.F.J.D(Unknown Source)
	at java.base/java.util.Optional.orElseThrow(
	at com.sonarsource.F.D.F.J.C(Unknown Source)
	at com.sonarsource.F.D.F.J.A(Unknown Source)
	at com.sonarsource.F.D.F.L.A(Unknown Source)
	at com.sonarsource.F.D.k.A(Unknown Source)
	at org.sonar.ce.async.SynchronousAsyncExecution.addToQueue(
	at com.sonarsource.F.D.k.A(Unknown Source)
	at java.base/java.util.Optional.ifPresent(
	at com.sonarsource.F.D.k.finished(Unknown Source)
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.executeTask(
	at org.sonar.ce.task.projectanalysis.api.posttask.PostProjectAnalysisTasksExecutor.finished(
	at org.sonar.ce.task.step.ComputationStepExecutor.executeListener(
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(
	at org.sonar.ce.taskprocessor.CeWorkerImpl$
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(
	at java.base/java.util.concurrent.Executors$
	at java.base/
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/
2022.07.12 08:39:44 INFO  ce[AYHxkGIhMeSggZqRht3T][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Report branch Quality Gate status to devops platforms | status=SUCCESS | time=1014ms
2022.07.12 08:39:44 INFO  ce[AYHxkGIhMeSggZqRht3T][o.s.c.t.CeWorkerImpl] Executed task | project=com.XXX.vod.catalog:pubmind-core | type=REPORT | branch=master | branchType=BRANCH | id=AYHxkGIhMeSggZqRht3T | submitter=sonar | status=SUCCESS | time=4426ms


Could you go to the project’s Background Tasks page (under Project Settings) and use the cog menu on the relevant task to look at the scanner context? I’m interested in the ‘Project scanner properties’ section to know whether branch/PR parameters were passed to the analysis.


Sorry, I meant to get back to you on this issue. Here’s the detail you asked about.
pubmind-core_context.txt (8.4 KB)


I’m not seeing any PR-related properties here. Is this an ongoing problem?


Yes, usually dependent on job setup in Jenkinsfile. At one time, we suggested developers specify branch properties, but then were told it was not necessary, so I reversed those instructions. I learned later that strategy was often incorrect. I can try re-running this job with Jenkins Replay option to observe results. However, as I pointed out since this is master, it should NOT be handled as a Pull-Request.


I’m confused. What publishing are you expecting for the main branch? We only publish to the DevOps Platform for Pull/Merge Requests.


We do not expect publish of results, but we also do not expect warnings about something being missed that should not be there.


Okay, I think I understand now. Sorry I’ve been slow on the uptake. What version are you running?


9.4.0 now, planning 9.6.0 upgrade now. My manager has been reluctant to upgrade on x.x.0 releases, expecting point releases to follow as was true a while back.

1 Like

Hi @Jaff,

It isn’t being treated as a PR; it’s trying to publish the quality gate status on your master branch. I understand the “Pull Request decoration” line is confusing, but the important line is just underneath: “Branch decoration failed”.

It looks like the API call to {GITHUB_API_URL}/repos/{REPO}/branches/master isn’t returning any info.

  • Can SonarQube correctly contact your GitHub server (you can check this via Administration > General Settings > DevOps Platform Integrations)?
  • If it can, could it be your branch name is somehow different on Jenkins than on GitHub (like after a renaming from “master” to “main”, or vice-versa)?
  • Are you using, or GitHub Enterprise? If the latter, which version are you using?

Patch releases are more the exception rather than the rule (except if you’re on an LTS version). At least, we try very hard to keep it like that :smile:. Of course, 9.6.1 is proving me wrong here :wink:. But there are many versions that never had a patch version (like 9.1.0, 9.3.0, 9.4.0, and 9.5.0).

Per your questions, we are NOT using GitHub Enterprise as yet, still And pretty sure in this instance that branch rename did not occur.

Hi again,

And did you manage to check whether SonarQube can correctly contact GitHub? You can check this via Administration > General Settings > DevOps Platform Integrations. Click on the GitHub tab, and click on Check configuration.

Yes, we have no issues connecting to GitHub, save for occasional network glitches.

Can you try calling{REPO}/branches/master manually? What does GitHub return?

  "message": "Not Found",
  "documentation_url": ""

So apparently there’s an issue with your master branch on GitHub. I’d investigate in that direction. SonarQube is reporting that it cannot publish a Quality Gate status to your master branch, because GitHub returns an error. It doesn’t seem related to SonarQube itself.