Fixes #1830 Merge 1.3.2-rc.1 into develop for audit-manager#290
Conversation
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
WalkthroughThis 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. ChangesVersion 1.4.0 Release and Repository Migration
🎯 3 (Moderate) | ⏱️ ~25 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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>
There was a problem hiding this comment.
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 winSet
kernel-auditmanager-apidependency scope to runtime in service module.
kernel-auditmanager-servicecurrently pullskernel-auditmanager-apiwith 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-servicemust depend onkernel-auditmanager-apias 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 valueAdd 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
📒 Files selected for processing (13)
.github/workflows/push-trigger.ymlAGENTS.mdTHIRD-PARTY-NOTICESapi-docs/Audit-Manager-Controller.ymldb_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_rollback.sqldb_upgrade_scripts/mosip_audit/sql/1.2.0.1_to_1.3.0_upgrade.sqlhelm/auditmanager/.gitignorehelm/auditmanager/values.yamlkernel/kernel-auditmanager-api/pom.xmlkernel/kernel-auditmanager-api/src/main/java/io/mosip/kernel/auditmanager/impl/AuditHandlerImpl.javakernel/kernel-auditmanager-service/Dockerfilekernel/kernel-auditmanager-service/pom.xmlkernel/pom.xml
💤 Files with no reviewable changes (1)
- THIRD-PARTY-NOTICES
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores