Skip to content

Add JDK 21 setup to npm-sonar-analysis workflow - #368

Merged
Prafulrakhade merged 1 commit into
mosip:developfrom
Mahesh-Binayak:patch-8
Jul 23, 2026
Merged

Add JDK 21 setup to npm-sonar-analysis workflow#368
Prafulrakhade merged 1 commit into
mosip:developfrom
Mahesh-Binayak:patch-8

Conversation

@Mahesh-Binayak

@Mahesh-Binayak Mahesh-Binayak commented Jul 23, 2026

Copy link
Copy Markdown

Added setup for JDK 21 in the workflow.

Summary by CodeRabbit

  • Chores
    • Updated the automated code quality workflow to use Java 21.
    • Improved reliability of Sonar analysis in continuous integration.

Added setup for JDK 21 in the workflow.

Signed-off-by: Mahesh-Binayak <76687012+Mahesh-Binayak@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The Sonar analysis GitHub Actions workflow now provisions Temurin JDK 21 before dependency caching, tests, coverage generation, and SonarCloud analysis.

Changes

Sonar analysis workflow

Layer / File(s) Summary
Provision Java 21 for Sonar analysis
.github/workflows/npm-sonar-analysis.yml
Adds actions/setup-java@v3 with Temurin Java 21 before the existing analysis steps.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • mosip/kattu#367: Updates a related Sonar analysis workflow with explicit JDK 21 setup.

Suggested reviewers: ivanmeneges

Poem

Java arrives, steady and bright,
Sonar scans in morning light.
Tests can run, coverage sings,
A Temurin step gives workflow wings.

🚥 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 clearly matches the main change: adding JDK 21 setup to the npm-sonar-analysis workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
.github/workflows/npm-sonar-analysis.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@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: 2

🤖 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/npm-sonar-analysis.yml:
- Line 50: Update the Java setup step using actions/setup-java in the workflow
to reference the latest supported v5 release by its full immutable commit SHA,
rather than the mutable `@v3` tag. Ensure the selected action version is
compatible with the available runner and preserves JDK 21 provisioning.
- Line 50: Update the setup-java action reference in the workflow to the
specified full-length commit SHA instead of the mutable `@v3` tag, and retain the
resolved version in a trailing comment for auditability.
🪄 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 Plus

Run ID: 79e1c9b7-7d54-4a85-8e8a-7d18693a452d

📥 Commits

Reviewing files that changed from the base of the PR and between db0740a and 5e624a4.

📒 Files selected for processing (1)
  • .github/workflows/npm-sonar-analysis.yml

Comment thread .github/workflows/npm-sonar-analysis.yml
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.

2 participants