Fix multi-tenant subscription failure due to outdated cds-mtxs version and missing HANA database_id configuration#296
Merged
Conversation
…re due to a known bug in @sap/cds-mtxs
…in cds-mtxs _pollError
…-mtxs srv-mgr create()
…scription failure
…that are not needed
PujaDeshmukh17
previously approved these changes
Jul 3, 2026
6770755
PujaDeshmukh17
approved these changes
Jul 3, 2026
PujaDeshmukh17
approved these changes
Jul 3, 2026
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.
Describe your changes
This PR fixes multi-tenant application subscription failures caused by two independent issues:
Issue 1: MTX Sidecar Version Mismatch
The MTX sidecar (
incidents-mtx-mtx) was using outdated dependencies (@sap/cds: ^8,@sap/cds-mtxs: ^2, deprecated@sap/cds-hana) which caused process crashes during HDI container creation polling. Updated to current versions across bothcentral-spaceandpersonal-spacesidecars:@sap/cds: ^8→^9@sap/cds-mtxs: ^2→^3@sap/cds-hana: ^2→@cap-js/hana: ^2@sap/xssec: ^3→^4Issue 2: Multiple HANA Cloud Databases in Subaccount
A second HANA Cloud instance (
adms-hana) was added to the provider subaccount. With two HANA databases present, Service Manager refused to provision HDI containers automatically and returned a broker error:"Multiple databases are available, exact id needs to be specified via parameter
database_id"Fix: Added
database_idconfiguration so Service Manager always targets the correct HANA instance:mta.yaml— AddedDATABASE_ID: REPLACE_WITH_YOUR_DATABASE_IDproperty onincidents-mtx-mtxmodule, injected at deploy time via GitHub Actions secretserver.js— Readsprocess.env.DATABASE_IDat bootstrap and programmatically sets it oncds.env.requires['cds.xt.DeploymentService'].hdi.create.database_id(CDS does not auto-resolve env vars in nestedhdi.createconfig)Workflows — Added
DATABASE_IDinjection viayqalongside existingREPOSITORY_IDinjection, sourced fromDATABASE_IDGitHub environment secretType of change
Please delete options that are not relevant.
Checklist before requesting a review
Upload Screenshots/lists of the scenarios tested
Multi-tenant Integration tests: https://github.com/cap-js/sdm/actions/runs/28581121590
Single-tenant Integration tests: https://github.com/cap-js/sdm/actions/runs/28590848029
Tested by deleting the existing subscription and subscribing the the multi-tenant app in both the tenants.