Skip to content

Fixes #1830 Merge 1.3.2-rc.1 into develop for audit-manager#290

Merged
ckm007 merged 4 commits into
mosip:developfrom
GOKULRAJ136:dev-latest
Jun 4, 2026
Merged

Fixes #1830 Merge 1.3.2-rc.1 into develop for audit-manager#290
ckm007 merged 4 commits into
mosip:developfrom
GOKULRAJ136:dev-latest

Conversation

@GOKULRAJ136

@GOKULRAJ136 GOKULRAJ136 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added OpenAPI documentation examples for audit endpoints.
    • Enhanced Istio routing configuration for internal access.
    • Improved JVM tuning and memory configuration defaults.
  • Bug Fixes

    • Added transactional boundaries and error handling for audit persistence operations.
  • Documentation

    • Added repository guidance documentation for AI agents.
  • Chores

    • Upgraded project version to 1.4.0.
    • Updated repository and SCM metadata.
    • Updated GitHub Actions workflow triggers and Docker build configuration.
    • Updated Maven dependencies and plugin versions.
    • Refactored Helm startup and initialization scripts.
    • Cleaned up third-party licenses and Helm configuration files.

Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR coordinates a 1.4.0 release with repository migration from mosip/commons to mosip/audit-manager. Maven versions are bumped from 1.2.1-SNAPSHOT to 1.4.0-SNAPSHOT across all modules, dependencies are realigned to property references, the Dockerfile startup refactors to use a configure_start.sh script, Helm values receive JVM tuning and resource updates, audit persistence gains transactional error handling, and CI/CD workflows are adjusted for release branching.

Changes

Version 1.4.0 Release and Repository Migration

Layer / File(s) Summary
Root POM version and Maven repository setup
kernel/pom.xml
Root version bumped to 1.4.0-SNAPSHOT, JaCoCo version downgraded to 0.8.5, Sonatype OSSRH snapshot repository configured, SCM and developer metadata migrated to mosip/audit-manager.
API module POM version alignment
kernel/kernel-auditmanager-api/pom.xml
API module version 1.4.0-SNAPSHOT, kernel-bom dependency switched to ${kernel.core.version} property, OSSRH repository added, SCM and developer metadata point to audit-manager.
Service module POM version and dependencies
kernel/kernel-auditmanager-service/pom.xml
Service version 1.4.0-SNAPSHOT, kernel dependency properties updated to 1.4.0-SNAPSHOT, springdoc-openapi downgraded to 2.5.0, Sonatype repository configured, all metadata migrated to audit-manager.
Audit handler transactional error handling
kernel/kernel-auditmanager-api/src/main/java/io/mosip/kernel/auditmanager/impl/AuditHandlerImpl.java
addAudit method wrapped with Spring @Transactional annotation and explicit DataAccessException handling that returns false on persistence failures; imports updated for transaction and exception support.
Container startup script refactoring
kernel/kernel-auditmanager-service/Dockerfile
Dockerfile refactored to use configure_start.sh as ENTRYPOINT; build step copies script with normalized line endings, executable permissions, and non-root ownership; removes previous adapter JAR download and JVM flags from runtime.
Helm chart values and JVM tuning
helm/auditmanager/values.yaml, helm/auditmanager/.gitignore
Resource memory limits set to 5000Mi, comprehensive ZGC/heap/GC tuning replaces simple javaOpts, Prometheus metrics endpointPath explicitly set, Istio internal-access configuration repositioned, pod scheduling defaults re-expressed; .gitignore pattern updated to Charts.lock.
GitHub Actions workflow trigger and Docker build
.github/workflows/push-trigger.yml
Push trigger adds release* branch pattern, SQUASH_LAYERS input removed from docker-build.yml workflow call.
OpenAPI specification examples
api-docs/Audit-Manager-Controller.yml
Request and response examples added to POST /audits endpoint: AuditExample request payload and AuditSuccessResponse showing successful audit structure.
Database migration artifacts
db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_upgrade.sql, db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_rollback.sql
SQL scripts emit informational messages indicating no migration queries required for version transition.
Documentation and notices updates
AGENTS.md, THIRD-PARTY-NOTICES
AGENTS.md adds comprehensive repository guidance covering build commands, module structure, API flow, database schema, configuration, security, deployment, CI/CD, and version synchronization; THIRD-PARTY-NOTICES footer removed.

🎯 3 (Moderate) | ⏱️ ~25 minutes

🐰 A version hop, from 1.2 to 1.4,
With commons traded for audit-manager's track,
Docker scripts dance, Helm charts get tuned,
Transactions grow wise, no errors immune—
Release refined, the rabbit's in tune! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main objective: merging version 1.3.2-rc.1 into develop for the audit-manager repository while fixing issue #1830. It is specific and clearly communicates the primary change.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
kernel/kernel-auditmanager-service/pom.xml (1)

56-59: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set kernel-auditmanager-api dependency scope to runtime in service module.

kernel-auditmanager-service currently pulls kernel-auditmanager-api with default compile scope; this breaks the module contract defined for release packaging.

Proposed fix
 		<dependency>
 			<groupId>io.mosip.kernel</groupId>
 			<artifactId>kernel-auditmanager-api</artifactId>
 			<version>${kernel.audit-api.version}</version>
+			<scope>runtime</scope>
 		</dependency>

As per coding guidelines, "kernel-auditmanager-service must depend on kernel-auditmanager-api as a runtime dependency; external services embedding the API should declare it as a library dependency".

🤖 Prompt for 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.

In `@kernel/kernel-auditmanager-service/pom.xml` around lines 56 - 59, The
dependency declaration for kernel-auditmanager-api (groupId io.mosip.kernel,
artifactId kernel-auditmanager-api, version ${kernel.audit-api.version}) is
using the default compile scope; change its scope to runtime in the
kernel-auditmanager-service pom so the service does not compile-link the API.
Locate the dependency element that contains kernel-auditmanager-api and add a
<scope>runtime</scope> child (or update an existing scope) so the dependency
becomes runtime-scoped.
🧹 Nitpick comments (1)
AGENTS.md (1)

48-48: 💤 Low value

Add language specifier to the fenced code block.

The code block on line 48 should specify a language for better rendering and syntax highlighting.

📝 Suggested fix
-```
+```text
 POST /v1/auditmanager/audits
🤖 Prompt for 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.

In `@AGENTS.md` at line 48, The fenced code block containing the text "POST
/v1/auditmanager/audits" should include a language specifier for proper
rendering; update that triple-backtick fence to include a language (e.g.,
```text or ```http) so the block becomes labeled (for example change ``` to
```text or ```http) surrounding the "POST /v1/auditmanager/audits" line.
🤖 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 `@AGENTS.md`:
- Line 53: Update the documentation entry that currently references
AuditUtils.validateAudit() to the actual validation method used in code:
AuditUtils.validateAuditRequestDto(auditRequest). Specifically, change the text
on the line that documents validation (currently showing
AuditUtils.validateAudit()) to mention AuditUtils.validateAuditRequestDto and,
if helpful, note that AuditHandlerImpl calls
AuditUtils.validateAuditRequestDto(auditRequest) for validation.

In `@db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_rollback.sql`:
- Line 1: The rollback SQL prints literal $CURRENT_VERSION/$UPGRADE_VERSION
because psql variables aren't being used; update the rollback SQL to use psql
variable syntax (e.g., :CURRENT_VERSION and :UPGRADE_VERSION) instead of
shell-style $VAR, and ensure the script that invokes psql for the rollback path
(the same upgrade.sh caller that runs the upgrade SQL) passes those values via
psql -v CURRENT_VERSION="$CURRENT_VERSION" -v UPGRADE_VERSION="$UPGRADE_VERSION"
so the variables are interpolated at runtime.

In `@db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_upgrade.sql`:
- Line 1: The \echo line currently prints literal
$CURRENT_VERSION/$UPGRADE_VERSION because those are shell vars not psql vars;
update the caller (upgrade.sh) to pass the versions into psql via -v
CURRENT_VERSION="$CURRENT_VERSION" -v UPGRADE_VERSION="$UPGRADE_VERSION" and
change the SQL file's \echo to use psql variable substitution (referencing
:CURRENT_VERSION and :UPGRADE_VERSION) so the actual version strings are
interpolated when psql runs.

In `@helm/auditmanager/.gitignore`:
- Line 2: The .gitignore contains the incorrect entry "Charts.lock"; Helm's
dependency lockfile is named "Chart.lock" (singular). Edit the .gitignore and
replace the "Charts.lock" entry with "Chart.lock" so the actual generated Helm
lockfile is correctly ignored.

In
`@kernel/kernel-auditmanager-api/src/main/java/io/mosip/kernel/auditmanager/impl/AuditHandlerImpl.java`:
- Line 44: Replace the current call to AuditUtils.validateAuditRequestDto(...)
in AuditHandlerImpl with the mandated validation entrypoint
AuditUtils.validateAudit(...); specifically, locate the call to
AuditUtils.validateAuditRequestDto in the AuditHandlerImpl class and invoke
AuditUtils.validateAudit passing the same audit request object so validation
follows the repository guideline and yields the KER-AUD-001 error code on
failure. Ensure any surrounding exception handling remains compatible with the
new method's contract.
- Around line 43-50: The current addAudit implementation in AuditHandlerImpl
swallows DataAccessException and returns false, causing AuditManagerServiceImpl
to incorrectly report success; remove the try-catch that converts
DataAccessException to a boolean (or rethrow a runtime/checked persistence
exception) so persistence failures propagate from
AuditUtils.validateAuditRequestDto/getAuditEntity/auditRepository.save, and then
update AuditManagerServiceImpl to check the actual outcome (either catch and map
the propagated exception to an error response or respect a returned success
value) so API response status reflects real DB write success or failure.

---

Outside diff comments:
In `@kernel/kernel-auditmanager-service/pom.xml`:
- Around line 56-59: The dependency declaration for kernel-auditmanager-api
(groupId io.mosip.kernel, artifactId kernel-auditmanager-api, version
${kernel.audit-api.version}) is using the default compile scope; change its
scope to runtime in the kernel-auditmanager-service pom so the service does not
compile-link the API. Locate the dependency element that contains
kernel-auditmanager-api and add a <scope>runtime</scope> child (or update an
existing scope) so the dependency becomes runtime-scoped.

---

Nitpick comments:
In `@AGENTS.md`:
- Line 48: The fenced code block containing the text "POST
/v1/auditmanager/audits" should include a language specifier for proper
rendering; update that triple-backtick fence to include a language (e.g.,
```text or ```http) so the block becomes labeled (for example change ``` to
```text or ```http) surrounding the "POST /v1/auditmanager/audits" line.
🪄 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: CHILL

Plan: Pro

Run ID: 3031783a-8ac8-4fc1-ac73-3b1144a8b2e8

📥 Commits

Reviewing files that changed from the base of the PR and between dc32a7b and e8c5630.

📒 Files selected for processing (13)
  • .github/workflows/push-trigger.yml
  • AGENTS.md
  • THIRD-PARTY-NOTICES
  • api-docs/Audit-Manager-Controller.yml
  • db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_rollback.sql
  • db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_upgrade.sql
  • helm/auditmanager/.gitignore
  • helm/auditmanager/values.yaml
  • kernel/kernel-auditmanager-api/pom.xml
  • kernel/kernel-auditmanager-api/src/main/java/io/mosip/kernel/auditmanager/impl/AuditHandlerImpl.java
  • kernel/kernel-auditmanager-service/Dockerfile
  • kernel/kernel-auditmanager-service/pom.xml
  • kernel/pom.xml
💤 Files with no reviewable changes (1)
  • THIRD-PARTY-NOTICES

Comment thread AGENTS.md
Comment thread db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_rollback.sql
Comment thread db_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_upgrade.sql
Comment thread helm/auditmanager/.gitignore
@ckm007 ckm007 merged commit e3b33b8 into mosip:develop Jun 4, 2026
9 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