Skip to content

Conversation

@Md-Humair-KK
Copy link
Contributor

@Md-Humair-KK Md-Humair-KK commented Nov 18, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded Java requirement to 21 and refreshed build toolchain, Spring Boot, Spring Cloud, Lombok, multiple plugins and library versions.
    • Switched CI workflows to the Java 21 variant.
    • Removed legacy JVM test flag from build configuration.
  • Tests

    • Added Mockito as a test dependency.
    • Simplified tests by removing an outdated global test initializer.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

Upgraded mock-plugin build from Java 11 to Java 21, updated many Maven plugins and dependency versions (including Spring Boot/Cloud and Lombok), added Mockito test dependency, removed an illegal-access JVM flag, changed workflow template references to master-java21, and removed a test @Before setup that used reflection.

Changes

Cohort / File(s) Summary
Build Toolchain & Plugins
mock-plugin/pom.xml
Java toolchain and compiler settings bumped 11 → 21; updated maven.compiler, jar, war, surefire, jacoco, sonar, javadoc, and shade plugin versions; added repository/versions entries; removed --illegal-access=permit from Surefire argLine.
Frameworks & Dependencies
mock-plugin/pom.xml
Upgraded Spring Boot 2.3.6.RELEASE → 3.2.12 and Spring Cloud Hoxton.SR8 → 2023.0.8; bumped kernel-keymanager-service, esignet, esignet-signup; Lombok 1.18.22 → 1.18.42; added org.mockito:mockito-core:5.20.0 (test scope) and related manifest entry.
Tests
mock-plugin/src/test/java/io/mosip/esignet/plugin/mock/service/MockHelperServiceTest.java
Removed the @Before-annotated setUp() method that used reflection to initialize a final static field (supportedKycAuthFormats).
CI Workflows
.github/workflows/push-trigger.yml
Updated workflow template references from mastermaster-java21 across jobs (build, publish, sonar, etc.).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Check compatibility and compilation under Java 21 (source/target and toolchain settings).
  • Verify Spring Boot 2→3 migration impacts (dependencies, API changes).
  • Ensure test suite runs with the new Surefire and without --illegal-access=permit.
  • Confirm MockHelperServiceTest still initializes required state after removing the reflective setUp().

Poem

🐰 I hopped from eleven up to twenty-one,
Maven leaves rustled — a shiny new run.
Spring sprouts and plugins all had a new tune,
Tests lost a setup, the build greets the moon.
🥕 Hooray — the mock plugin dances under the moon!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and directly summarizes the main change: migrating the mock plugin from Java 11 to Java 21, which aligns with the primary objective reflected in all three files.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9fb363 and 5a245e2.

📒 Files selected for processing (1)
  • .github/workflows/push-trigger.yml (9 hunks)
🔇 Additional comments (1)
.github/workflows/push-trigger.yml (1)

26-26: Verify that master-java21 templates exist in the mosip/kattu repository.

All workflow template references have been uniformly updated from @master to @master-java21 across build, publish, and sonar-analysis jobs. While the master-java21 branch naming pattern aligns with documented MOSIP Java 21 migration practices, confirm that these templates actually exist in the mosip/kattu repository and are compatible with the current parameter passing before merging. The workflow will fail at runtime if the templates are unavailable or have incompatible signatures.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a755650 and 4913257.

📒 Files selected for processing (3)
  • mock-plugin/pom.xml (3 hunks)
  • mock-plugin/src/test/java/io/mosip/esignet/plugin/mock/service/MockHelperServiceTest.java (1 hunks)
  • mock-plugin/src/test/java/io/mosip/signup/plugin/mock/service/MockIdentityVerifierPluginImplTest.java (5 hunks)
🔇 Additional comments (5)
mock-plugin/pom.xml (1)

165-168: Good practice: version inherited from dependencyManagement.

The spring-web dependency correctly inherits its version from the spring-boot-dependencies BOM defined in dependencyManagement. This ensures version consistency across Spring dependencies.

mock-plugin/src/test/java/io/mosip/esignet/plugin/mock/service/MockHelperServiceTest.java (1)

7-10: Import organization looks good.

The imports are properly organized and align with the test requirements. No issues detected with these standard DTO imports.

mock-plugin/src/test/java/io/mosip/signup/plugin/mock/service/MockIdentityVerifierPluginImplTest.java (3)

10-11: Imports correctly support async Kafka testing.

The new imports (ProducerRecord, RecordMetadata, SendResult, CompletableFuture) are appropriate for mocking asynchronous Kafka send operations in the test.

Also applies to: 24-24, 33-33


76-83: Proper async Kafka mock implementation.

The test correctly mocks KafkaTemplate's asynchronous send method by returning a completed CompletableFuture. This allows synchronous testing of async behavior and is a best practice with Mockito 5.x.


92-94: Assertions properly verify async Kafka sends.

The test correctly captures and validates multiple Kafka send operations, confirming both the count (2 sends) and the content (transaction ID). This provides good coverage of the async behavior.

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
mock-plugin/pom.xml (1)

260-270: Optional: Add explicit version tag to surefire plugin for consistency.

The maven-surefire-plugin has a version property defined at line 79 (${maven.surefire.plugin.version}) but doesn't use it in the plugin declaration. Other plugins in the POM do specify versions explicitly. Consider adding <version>${maven.surefire.plugin.version}</version> for consistency with plugins like sonar-maven-plugin and spring-boot-maven-plugin.

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
+   <version>${maven.surefire.plugin.version}</version>
    <configuration>

This applies similarly to maven-jar-plugin, maven-war-plugin, and maven-javadoc-plugin if you wish to standardize the approach across all plugins.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8270932 and c9fb363.

📒 Files selected for processing (1)
  • mock-plugin/pom.xml (3 hunks)
🔇 Additional comments (4)
mock-plugin/pom.xml (4)

70-90: Java 21 migration is solid and comprehensive.

All Java version properties, Maven plugins, and Spring framework components have been appropriately updated for Java 21. Spring Boot 3.2.12 and Spring Cloud 2023.0.8 are the current stable releases in their respective lines, and all versions are compatible with Java 21.


106-106: Lombok version is current.

Lombok 1.18.42 is the latest stable release and fully compatible with Java 21.


148-153: Mockito dependency addition is appropriate.

Mockito 5.20.0 (latest 5.x release as of November 2025) has been added with correct test scope, enabling modern mocking capabilities for Java 21.


260-270: Surefire configuration is correct for Java 21.

The --illegal-access=permit flag has been properly removed, and the --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED directive is retained for module access. This configuration is compatible with Java 21.

Signed-off-by: Md-Humair-KK <mdhumair.kankudti@gmail.com>
@ase-101 ase-101 merged commit 3186450 into mosip:develop Dec 1, 2025
11 of 13 checks passed
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.

3 participants