Fix SonarQube build-wrapper path and usage#1450
Merged
tuhaihe merged 1 commit intoapache:mainfrom Dec 14, 2025
Merged
Conversation
88f9024 to
e3877cf
Compare
269ddcb to
3a27431
Compare
my-ship-it
approved these changes
Dec 12, 2025
3a27431 to
591c47e
Compare
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 and
execution conditions:
- Added explicit triggers for push/PR events when the workflow
file itself is modified, enabling validation of workflow
changes
- Allow PRs to validate the build process while preventing unauthorized
SonarCloud access
The workflow will now:
- Run all build steps in PRs for validation purposes
- Execute SonarQube scans only on:
* Weekly scheduled runs (apache/cloudberry only)
* Manual workflow dispatch (apache/cloudberry only)
* Push to main branch when workflow file changes
(apache/cloudberry only)
591c47e to
08f6b25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions