Skip to content

release: v3.4.0 – staging → master#880

Merged
nevil-mathew merged 21 commits into
masterfrom
staging
Mar 6, 2026
Merged

release: v3.4.0 – staging → master#880
nevil-mathew merged 21 commits into
masterfrom
staging

Conversation

@nevil-mathew

@nevil-mathew nevil-mathew commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added SERVICE_NAME configuration option for service health checks.
  • Bug Fixes

    • Improved Kafka event validation to prevent broadcasting invalid events.
    • Enhanced unique constraint error detection in tenant operations.
  • Improvements

    • Refined error handling and logging for clearer troubleshooting.
    • Enhanced event broadcaster reliability with better error reporting.
    • Updated dependencies to latest compatible versions.

MallanagoudaB and others added 21 commits October 30, 2025 13:04
Add SERVICE_NAME env var (UserService default) + update health check dependency.
…age-file-for-healthCheck

adding-version-from-package-file-for-healthCheck
… for better clarity and removed unnecessary console log
Pass tenant code to user roles and improve error handling
release: v3.4.0-rc.1 – develop → staging
fix: refactor organization feature creation to use async/await for be…
release: v3.4.0-rc.1 – develop → staging
@coderabbitai

coderabbitai Bot commented Mar 6, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 33071028-91e3-45be-9b75-53a89fb94b49

📥 Commits

Reviewing files that changed from the base of the PR and between dca3785 and 13a22f2.

⛔ Files ignored due to path filters (2)
  • src/api-doc/MentorED-Users.postman_collection.json is excluded by !src/api-doc/**
  • src/configs/kafka.js is excluded by !src/configs/**
📒 Files selected for processing (9)
  • src/.env.sample
  • src/controllers/v1/account.js
  • src/envVariables.js
  • src/health-checks/health-check.js
  • src/health-checks/health.config.js
  • src/helpers/eventBroadcasterMain.js
  • src/package.json
  • src/services/account.js
  • src/services/tenant.js

Walkthrough

This PR introduces a SERVICE_NAME environment variable for health check identification, updates health check implementation to use actual package version, refactors error handling and logging across account and tenant services, and bumps package version to 3.3.24 with updated health-check dependency.

Changes

Cohort / File(s) Summary
Health Check Configuration
src/.env.sample, src/envVariables.js, src/health-checks/health-check.js, src/health-checks/health.config.js
Added SERVICE_NAME environment variable with default 'UserService'. Updated health-check handler to import and use actual package.json version instead of hardcoded version property; removed ver field from health response payloads.
Package Dependencies
src/package.json
Bumped package version from 1.0.0 to 3.3.24 and updated elevate-services-health-check dependency from ^0.0.6 to ^0.0.9.
Account Service Refactoring
src/controllers/v1/account.js, src/services/account.js
Wrapped encryption operations (email and phone) in try/catch blocks; removed console.log/error statements from catch blocks; softened Redis deletion error handling by swallowing errors in post-action cleanup.
Tenant Service Enhancement
src/services/tenant.js
Changed org feature creation from concurrent Promise.all to sequential async loop for improved rollback handling; added instanceof check for Sequelize UniqueConstraintError to return TENANT_ALREADY_EXISTS; updated userRolesService.create to accept tenantCode as additional parameter.
Event Broadcaster Optimization
src/helpers/eventBroadcasterMain.js
Introduced local constants for event enablement checks; replaced generic logs with prefixed structured error messages; removed debug logs and request body logging; hardened Kafka dispatch with validation and enabled checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 A SERVICE_NAME now guides our health,
From static versions to dynamic wealth,
Encryption wrapped in try-catch care,
Sequential features, refactored with flair,
The code hops lighter, cleaner, and bright! 🌟

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch staging

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.

@nevil-mathew
nevil-mathew merged commit 3ae42a3 into master Mar 6, 2026
0 of 2 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