SONARJAVA-6592 Test ruling sync action#5762
Conversation
Based on action from core-languages-tooling.
- Exclude most ruling tests (guava, mall, jetty, etc.) using @ignore - Keep only commons-beanutils test active for PR validation - Add test changes to commons-beanutils S1134 to demonstrate diff comments This is a temporary change to speed up CI for demonstrating the ruling diff comment feature. Not intended for merge to master. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The submodules must be initialized to access source files for generating code snippets in ruling diff comments. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsIntegrates automated ruling diff and notification workflows while optimizing test execution. The malformed JSON in java-S1448.json has been corrected, and no further issues were found. ✅ 1 resolved✅ Bug: java-S1448.json is invalid JSON (missing opening brace)
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Ruling Diff SummaryDetected changes in 3 rule files: 16 issues removed, 4 issues added. S1134 (
|
The file was missing the opening brace '{', causing JSON parse errors.
Fixed format:
- Before: "key": [values]...
- After: {"key": [values]...}
2ecd11c to
1c3e3bf
Compare
Integrates the ruling-update-and-notify action to respond to Ruling QA failures. This job: - Runs after all ruling-qa matrix jobs complete - Only runs on pull requests - Posts ruling diff comments to PRs - Prepares for future fix PR creation (currently disabled) The sync-command needs to be implemented to download actual results from the ruling-qa job artifacts before enabling fix PR creation.
Changed from checking contains(needs.ruling-qa.result, 'failure') to checking if needs.ruling-qa.result != 'success'. For matrix jobs, the result is only 'success' if ALL matrix jobs succeeded, otherwise it's 'failure'.
Removed complex sync-command - the action now handles artifact download automatically. The workflow just needs to specify the basic parameters. This makes integration much cleaner and easier to maintain.
Temporarily keep only one matrix item (without-sonarqube-project on sonar-m-public) to make testing of the ruling-update-notify action faster and simpler.
CI failed: The CI build failed due to a combination of malformed JSON in a test resource file and an incorrectly configured build step that prevents ruling diff generation.OverviewThe build failed primarily due to invalid ruling data in the repository and a broken workflow path for generating ruling comparison reports. Across multiple test jobs, the build failed to reach completion because of JSON parsing errors and missing directories. FailuresMalformed JSON in Ruling Data (confidence: high)
Missing Diff Directory in Ruling QA (confidence: high)
Out-of-Sync Ruling Baseline (confidence: high)
Summary
Code Review ✅ Approved 1 resolved / 1 findingsIntroduces automated ruling synchronization and diff commenting workflows while optimizing CI test cycles. The malformed JSON in java-S1448.json has been corrected. ✅ 1 resolved✅ Bug: java-S1448.json is invalid JSON (missing opening brace)
Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|




Part of
Summary by Gitar
ruling-diff-comment.ymlto post comments on PRs when ruling JSON files change.test-ruling-update-notify.ymlto automate ruling updates and notifications on test failures.ruling-update-notifyjob intobuild.ymlto support ruling synchronization.JavaRulingTest.javausing@Ignoreto accelerate CI cycles.its/ruling/src/test/resources/includingjava-S1134.json,java-S1448.json, and addedjava-S1234.json.java-S1488.jsonfromits/ruling/src/test/resources/commons-beanutils/.This will update automatically on new commits.