Curious alert posted on analysis page

  • versions used: SonarQube-8.4.2 D.E., Sonar Plugins:
    $ ls -1 $SONARQUBE_HOME/extensions/plugins
    backelite-sonar-swift-plugin-0.4.6.jar
    checkstyle-sonar-plugin-4.29.jar
    java-i18n-rules-0.1.0.jar
    README.txt
    sonar-cobertura-plugin-2.0.jar
    sonar-csharp-plugin-8.1.0.13383.jar
    sonar-css-plugin-1.1.1.1010.jar
    sonar-findbugs-plugin-3.11.1.jar
    sonar-flex-plugin-2.5.1.1831.jar
    sonar-go-plugin-1.6.0.719.jar
    sonar-groovy-plugin-1.6.jar
    sonar-html-plugin-3.2.0.2082.jar
    sonar-jacoco-plugin-1.1.0.898.jar
    sonar-java-plugin-6.3.2.22818.jar
    sonar-javascript-plugin-6.2.0.12043.jar
    sonar-kotlin-plugin-1.5.0.315.jar
    sonar-php-plugin-3.3.0.5166.jar
    sonar-pmd-plugin-3.2.1.jar
    sonar-python-plugin-2.5.0.5733.jar
    sonar-ruby-plugin-1.5.0.315.jar
    sonar-scala-plugin-1.5.0.315.jar
    sonar-scm-git-plugin-1.9.1.1834.jar
    sonar-scm-svn-plugin-1.9.0.1295.jar
    sonar-softvis3d-plugin-1.1.0.jar
    sonar-typescript-plugin-2.1.0.4359.jar
    sonar-vbnet-plugin-8.1.0.13383.jar
    sonar-webdriver-plugin-1.0.5.jar
    sonar-xml-plugin-2.0.1.2020.jar
    sonar-yaml-plugin-1.5.1.jar

  • error observed
    Project analyzed displays error message:

No indications of any issues in ce.log:
ce_udf-model-schema.log (8.2 KB)

Hi,

Which ALM?

 
Ann

GitHub
Sorry, I cannot provide a repeatable example project.

Hi @Jaff,

Do you mind being more explicit about your report? Did the PR decoration actually worked?

I’ve noticed Pull Request decoration | status=SUCCESS in the log, hence my question.

Cheers

Philippe,
Yes. PR decoration was visible in the GitHub page:

Warning still displays on the analysis page.

Can you provide us with a view of this project settings, especially the Pull request decoration tab? I’m mainly interested by the value of the Repository identifier field.

As mentioned in the warning message, I think your Repository identifier should contains the organization slug too: org/rpo.

This is also mentioned here:

image

What’s weird to me is that I would expect the PR decoration to fail without the proper repository identifier. I’ll dig a bit further.

Hi @Jaff, I’ve tried to reproduce and the PR decoration definitely can’t work without the organization slug being part of the repository identifier.

Could you fix the repository identifier and keep us inform on how it impacted your PR decoration?

Those settings are definitely present; although sometimes on first analysis of a new project they are absent, I have observed. What might be the solution for that situation?

Hi @Jaff,

I’ll need you to be more precise in your answers otherwise I won’t be able to help.

  1. Did you add the repository slug to the repository identifier field?
  2. Did you notice something different with the PR decoration? What does the details of the SonarQube Code Analysis check look like on Github?
  3. Do you still see the initial analysis warning in SonarQube?

Cheers

Hi,
To answer your questions:

  1. Did you add the repository slug to the repository identifier field?
    Yes, this detail is present in the configuration
  2. Did you notice something different with the PR decoration? What does the details of the SonarQube Code Analysis check look like on Github?
  3. Do you still see the initial analysis warning in SonarQube?
    Yes, but it turns out the configuration settings were wrong, so I’ll try running it again
    Here is result:

    From ce.log:
    2020.10.28 00:28:24 INFO ce[AXVsmxCwbW42HO9FIvLc][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Webhooks | globalWebhooks=0 | projectWebhooks=0 | status=SUCCESS | time=5ms
    2020.10.28 00:28:26 WARN ce[AXVsmxCwbW42HO9FIvLc][c.s.C.D.E.M] Failed to create comment. Please check GitHub Application for write access to pull requests. \n{“message”:“Resource not accessible by integration”,“documentation_url”:“https://docs.github.com/rest/reference/issues#create-an-issue-comment”}
    2020.10.28 00:28:26 INFO ce[AXVsmxCwbW42HO9FIvLc][o.s.c.t.p.a.p.PostProjectAnalysisTasksExecutor] Pull Request decoration | status=SUCCESS | time=2253ms
    2020.10.28 00:28:26 INFO ce[AXVsmxCwbW42HO9FIvLc][o.s.c.t.CeWorkerImpl] Executed task | project=com.tivo.danube.model.udf:danube-model-udf | type=REPORT | pullRequest=167 | id=AXVsmxCwbW42HO9FIvLc | submitter=sonar | status=SUCCESS | time=2874ms

This is the correct setting, in response to your question from September 26:

Well I suppose the logs you posted are a good way to troubleshoot additional warnings:

2020.10.28 00:28:26 WARN ce[AXVsmxCwbW42HO9FIvLc][c.s.C.D.E.M] Failed to create comment. Please check GitHub Application for write access to pull requests.

=> https://docs.sonarqube.org/latest/analysis/pr-decoration/#header-1

FYI - Logs have been improved in SonarQube 8.5 (See this ticket). You might want consider upgrading to it at some point to better understand what’s going on.

Thanks, upgrade to 8.5.1 was done last Friday; situation improved, as we no longer seeing the warning

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