Skip to content

feat: implement issue #699 — [Fleet Monitor] petry-projects/.github-private — .github/workflows/sonarcloud.yml - #703

Merged
don-petry merged 33 commits into
mainfrom
dev-lead/issue-699-20260614-0956
Jun 18, 2026
Merged

don-petry merged 33 commits into
mainfrom
dev-lead/issue-699-20260614-0956

Conversation

@don-petry

@don-petry don-petry commented Jun 14, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #699

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • Tests

    • Added an automated regression test to validate the SonarCloud GitHub Actions configuration contains the required scanner JVM settings.
  • Chores

    • Updated the SonarCloud GitHub Actions workflow to pass an additional JVM argument during the scan, alongside the existing Java executable setting.

@don-petry
don-petry requested a review from a team as a code owner June 14, 2026 10:02
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1ac989c2-5de9-4c06-a8cc-332d7d6ed1d1

📥 Commits

Reviewing files that changed from the base of the PR and between 128224b and b7a0294.

📒 Files selected for processing (3)
  • .github/workflows/sonarcloud.yml
  • .github/workflows/test.yml
  • tests/test_sonarcloud_workflow.sh

📝 Walkthrough

Walkthrough

Adds -Dsonar.scanner.skipJreProvisioning=true to the args list in the SonarCloud scan workflow. Introduces a Bash regression test script that uses yq to validate both required JVM scanner arguments are present in the workflow YAML. Registers the script as a new step in the unit-test workflow job.

Changes

SonarCloud config fix and regression validation

Layer / File(s) Summary
SonarCloud arg fix, regression script, and test wiring
.github/workflows/sonarcloud.yml, tests/test_sonarcloud_workflow.sh, .github/workflows/test.yml
sonarcloud.yml gains the -Dsonar.scanner.skipJreProvisioning=true argument; the new test_sonarcloud_workflow.sh script uses yq to extract the SonarCloud Scan step's .with.args and fails if either skipJreProvisioning or javaExePath is absent; test.yml installs yq and wires that script as a "Run sonarcloud workflow tests" step in the unit-tests job.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Suggested labels

needs-human-review

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: implementing a fix for issue #699 targeting the SonarCloud workflow file.
Linked Issues check ✅ Passed The PR addresses issue #699 by adding skipJreProvisioning flag to SonarCloud workflow and implementing validation tests to ensure JVM settings are properly configured.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the degraded SonarCloud workflow: updates to sonarcloud.yml, test.yml modifications to support testing, and addition of a test script to validate the workflow configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-699-20260614-0956

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a regression test script, tests/test_sonarcloud_workflow.sh, to verify that the SonarCloud workflow configuration correctly pins the scanner JRE to the setup-java JDK. The feedback suggests resolving the workflow file path relative to the script's location rather than assuming execution from the repository root, which improves the script's robustness.

Comment thread tests/test_sonarcloud_workflow.sh Resolved
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 10:03
@don-petry
don-petry disabled auto-merge June 14, 2026 10:04
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 10:05
@don-petry
don-petry disabled auto-merge June 14, 2026 12:09
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:11
@don-petry
don-petry disabled auto-merge June 14, 2026 12:22
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:23
@don-petry
don-petry disabled auto-merge June 14, 2026 13:23
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 13:25
@don-petry
don-petry disabled auto-merge June 14, 2026 14:29
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 14:30
@don-petry
don-petry disabled auto-merge June 14, 2026 15:14
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 15:15

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test.yml:
- Around line 24-25: The "Run sonarcloud workflow tests" step executes
tests/test_sonarcloud_workflow.sh which requires the yq utility to be installed,
but the workflow does not install it beforehand, causing the test to fail. Add a
new step immediately before the "Run sonarcloud workflow tests" step to install
yq using an appropriate package manager for the runner environment (such as
apt-get, brew, or a dedicated GitHub Action), ensuring the dependency is
available when the test script runs.

In `@tests/test_sonarcloud_workflow.sh`:
- Around line 33-34: The grep commands used for checking literal property tokens
should use the `-F` flag to perform fixed-string matching instead of regex
pattern matching. Replace `grep -q` with `grep -Fq` in the checks for the
sonar.scanner.skipJreProvisioning property to ensure exact literal string
matching and avoid potential issues with regex metacharacters. Apply this change
to all similar grep invocations that verify literal tokens in the shell script.
- Around line 40-42: The grep check in the conditional statement only verifies
that the key "sonar.scanner.javaExePath=" exists in the args, but does not
validate that it points to the correct value derived from the setup-java step
output. Replace the current grep pattern to check not just for key presence, but
for the key with the expected value path that includes the reference to the
setup_java outputs and the bin/java location. This ensures the test fails if the
javaExePath is set to an incorrect value, preventing regressions where the key
exists but points to the wrong location.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cdd666f6-f6d1-4ff0-9a50-67d18ca9ce44

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa0a2e and 128224b.

📒 Files selected for processing (3)
  • .github/workflows/sonarcloud.yml
  • .github/workflows/test.yml
  • tests/test_sonarcloud_workflow.sh

Comment thread .github/workflows/test.yml Resolved
Comment thread tests/test_sonarcloud_workflow.sh Resolved
Comment thread tests/test_sonarcloud_workflow.sh Resolved
@don-petry
don-petry disabled auto-merge June 14, 2026 15:31
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 15:33
@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-17T17:27:54Z

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-17T17:59:15Z.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
**Issues addressed:** 3 (all already fixed and resolved)
- yq installation in test.yml: Fixed in lines 24-27 (Install test dependencies step) [resolved + confirmed]
- grep -F flag for literal matching: Fixed in line 33 (using grep -Fq) [resolved + confirmed]
- javaExePath value validation: Fixed in line 41 (checking full expected value) [resolved + confirmed]
**Additional checks:**
- SonarCloud Quality Gate: **PASSED** ✓ (0 new issues, 0 security hotspots)
- All CI checks: **SUCCESS** ✓
- Gemini thread: Already resolved and outdated ✓
**Files changed:** `.github/workflows/test.yml`, `tests/test_sonarcloud_workflow.sh` (already in this PR)
**No action needed** — all issues are already fixed, threads are resolved with CodeRabbit confirmations, and all checks pass.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-17T19:02:56Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-17T19:12:33Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-17T19:12:33Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-17T19:31:08Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-17T19:31:08Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-17T21:47:26Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-18T00:21:26Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-18T00:30:49Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-18T00:30:49Z

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-18T01:01:18Z.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #703
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-18T02:22:56Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-18T02:22:56Z

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-18T02:54:15Z.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: ee1a842fe546d03791e0a6354de9f6c1fa705144
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)

Summary

PR adds -Dsonar.scanner.skipJreProvisioning=true to fix flaky SonarCloud scanner JRE downloads (HTTP 403, ~26.5% failure, issue #699) plus a regression-guard test. Triage escalated on an unverifiable CHANGES_REQUESTED; I verified it was CodeRabbit's bot review whose 3 inline findings are all addressed and explicitly acknowledged as resolved in current code. CI is fully green, the PR's own files are unchanged since the prior automated approval, and there are no security-sensitive changes — approving.

Findings

  • INFO: reviewDecision still reads CHANGES_REQUESTED, but this is CodeRabbit (a bot) whose 3 actionable inline comments were each fixed and explicitly marked <review_comment_addressed>. GitHub does not flip reviewDecision when threads are resolved without a new approving review, so the stale state is benign.
  • INFO: yq is installed via 'apt-get install -y yq' and the test queries it with jq-style syntax (select(...)|.with.args). Compatible with both Ubuntu's yq variants and verified working empirically — the unit-tests CI job that runs tests/test_sonarcloud_workflow.sh passes green.
  • INFO: Regression test is well-scoped: set -euo pipefail, read-only, resolves the workflow path via BASH_SOURCE so it runs from any CWD, asserts both the skipJreProvisioning flag and the exact javaExePath value. No injection/eval; safe.

Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.

@sonarqubecloud

Copy link
Copy Markdown

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-18T03:11:34Z.

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.

[Fleet Monitor] petry-projects/.github-private — .github/workflows/sonarcloud.yml

2 participants