Skip to content

Conversation

@tuhaihe
Copy link
Member

@tuhaihe tuhaihe commented Nov 24, 2025

This commit updates the SonarQube GitHub Actions workflow to follow the officially recommended configuration. The previous workflow failed because the CFamily analyzer could not locate the generated compile_commands.json file due to an incorrect or quoted build-wrapper output path.

Changes included:

  • Align workflow steps with SonarSource’s recommended sequence.
  • Ensure build-wrapper-linux-x86-64 correctly produces output under $BUILD_WRAPPER_OUT_DIR.

This update should allow the C/C++ analysis to run successfully and avoid exit code 3 errors in future SonarQube scans.

Fixes #1449

What does this PR do?

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


The SonarQube weekly analysis workflow was failing due to a missing
`compile_commands.json` file. This occurs because the build-wrapper
output directory was previously referenced with an incorrect path
containing an unintended quotation mark, causing the CFamily plugin
to abort with a NoSuchFileException.

This change fixes the failure by aligning the workflow with
SonarCloud recommended usage.

Additionally, this commit updates the workflow triggers:
- `push` now explicitly targets the `main` branch;
- `pull_request` now includes path-level filters so that the workflow
  runs whenever the workflow file itself is modified.
@tuhaihe tuhaihe force-pushed the fix-sonarqube-error branch from 88f9024 to e3877cf Compare November 24, 2025 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Sonarqube Analysis workflow error

1 participant