fix(crm): align tenant-manager module name with provisioning (crm → crm-api)#2125
Merged
Merged
Conversation
…rm-api) 🐛 The CRM service registers with tenant-manager using moduleName "crm" but tenant databases are provisioned under module "crm-api", causing "no MongoDB config for tenant ... module crm" errors at runtime in multi-tenant mode.
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR updates the CRM tenant bootstrap configuration to change the module name identifier from ChangesCRM Bootstrap Configuration
Comment |
ClaraTersi
approved these changes
May 28, 2026
ferr3ira-gabriel
approved these changes
May 28, 2026
Contributor
🔒 Security Scan Results —
|
| Policy | Status |
|---|---|
| Default non-root user | ✅ Passed |
| No fixable critical/high CVEs | ✅ Passed |
| No high-profile vulnerabilities | ✅ Passed |
| No AGPL v3 licenses | ✅ Passed |
Pre-release Version Check
✅ No unstable version pins found.
Contributor
📊 Unit Test Coverage Report:
|
| Metric | Value |
|---|---|
| Overall Coverage | 87.7% ✅ PASS |
| Threshold | 85% |
Coverage by Package
| Package | Coverage |
|---|---|
github.com/LerianStudio/midaz/v3/components/crm/internal/adapters/http/in |
86.2% |
github.com/LerianStudio/midaz/v3/components/crm/internal/adapters/mongodb/alias |
92.1% |
github.com/LerianStudio/midaz/v3/components/crm/internal/adapters/mongodb/holder |
87.1% |
github.com/LerianStudio/midaz/v3/components/crm/internal/services |
95.2% |
Generated by Go PR Analysis workflow
|
Actionable comments posted: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
moduleName = "crm"(components/crm/internal/bootstrap/config.tenant.go:29), but tenant databases are provisioned under modulecrm-api.no MongoDB config for tenant <id> service plugin-crm module crm"crm-api"so the module identity matches what tenant-manager has provisioned for the service.Scope
Single one-line change. Service name (
plugin-crm) and OTel resource name (crm) intentionally left untouched — only the multi-tenant identifier moves.Test plan
tmmongoresolves a tenant DB config for modulecrm-api(no more "no MongoDB config for tenant" error)initTenantMiddleware, which is a no-op whenMULTI_TENANT_ENABLED=false)🤖 Generated with Claude Code