Pull request decoration failed. Commit 'abc' not found in pull request 'xyz'

  • Sonar version: Enterprise Edition v9.9.7
  • ALM used: GitHub
  • CI system used: Github Actions
  • Scanner command
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Override sonar coverage exclusions for master
        if: github.event_name == 'push'
        run: echo "SONAR_COVERAGE_EXCLUSIONS=-Dsonar.coverage.exclusions=**/*Config.java" >> $GITHUB_ENV

      - name: Build and analyze
        env:
          GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ENTERPRISE }}
          SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL_ENTERPRISE }}
          REPORT_API_KEY: ${{ secrets.RP_API_KEY }}
        run: |        
          start_time=$(date +%s)    
          unset GOOGLE_APPLICATION_CREDENTIALS
          mvn -B -T 1C clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar -Dsonar.projectKey=${{ github.event.repository.name }} -Dsonar.projectName=${{ github.event.repository.name }} ${{ env.SONAR_COVERAGE_EXCLUSIONS }} -Dproject.version=x.x.x -Dnexus.username=${{ secrets.NEXUS_USER }} -Dnexus.password=${{ secrets.NEXUS_PWD }}
          end_time=$(date +%s)
          duration_minutes=$(( (end_time - start_time) / 60 ))
          echo "Total time: $duration_minutes minutes."
  • Languages of the repository : Java

  • Error observed
    Sonarqube status remains stuck in pending state, Expected : Waiting for status to be reported even when analysis has run and posted a summary on PR and with a warning on sonarqube dashboard Pull request decoration failed. Commit 'abc' not found in pull request 'xyz'

  • Potential workaround

Already visited : Pull request decoration failed. Commit xxx not found in pull request xxx
but not been able to relate with my current worlflow

  • Short term fix: We are currently pushing a empty commit to re trigger wf, as sonar gets new commit id.

Please help with a solution.

@ganncamp,@Colin can we get some initial inputs from your end,

This issue has been recurring for a couple of months, with increased intensity now.

It has lead to become a major blocker for us, please acknowledge and try to provide us with some help.

Looking forward for your reply.

Hi,

Welcome to the community!

I invite you to familiarize yourself with the FAQ, and in particular this section:

I created a topic, when can I expect a response?

This is an open community with people volunteering their free time to provide assistance. We’re eager to contribute to the community, but you are not guaranteed a fast response.

Be patient

  • Wait a few days before bumping a topic that hasn’t received a response.

As well as this section:

What is @name mentioning? Should I do it?

@name mentioning is when you type someone’s username with an @ preceding it. Doing this sends a notification to the user. Depending on their settings, it may also send them an email message.

In general, it is considered bad form to @name mention someone not already engaged in the conversation. Please don’t do it.

Regarding your question, your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.9.7 → 2025.1.1-> 2025.2 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann