Skip to content

Fix multi-tenant subscription failure due to outdated cds-mtxs version and missing HANA database_id configuration#296

Merged
yashmeet29 merged 17 commits into
developfrom
SDMEXT-subscriptionfix-feature
Jul 3, 2026
Merged

Fix multi-tenant subscription failure due to outdated cds-mtxs version and missing HANA database_id configuration#296
yashmeet29 merged 17 commits into
developfrom
SDMEXT-subscriptionfix-feature

Conversation

@yashmeet29

@yashmeet29 yashmeet29 commented Jul 1, 2026

Copy link
Copy Markdown
Member

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 both central-space and personal-space sidecars:

  • @sap/cds: ^8^9
  • @sap/cds-mtxs: ^2^3
  • @sap/cds-hana: ^2@cap-js/hana: ^2
  • @sap/xssec: ^3^4

Issue 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_id configuration so Service Manager always targets the correct HANA instance:

mta.yaml — Added DATABASE_ID: REPLACE_WITH_YOUR_DATABASE_ID property on incidents-mtx-mtx module, injected at deploy time via GitHub Actions secret
server.js — Reads process.env.DATABASE_ID at bootstrap and programmatically sets it on cds.env.requires['cds.xt.DeploymentService'].hdi.create.database_id (CDS does not auto-resolve env vars in nested hdi.create config)
Workflows — Added DATABASE_ID injection via yq alongside existing REPOSITORY_ID injection, sourced from DATABASE_ID GitHub environment secret

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have tested the functionality on my cloud environment.
  • I have provided sufficient automated/ unit tests for the code.
  • I have increased or maintained the test coverage.
  • I have ran integration tests on my cloud environment.
  • I have validated blackduck portal for any vulnerability after my commit.

Upload Screenshots/lists of the scenarios tested

  • I have Uploaded Screenshots or added lists of the scenarios tested in description

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.

@yashmeet29 yashmeet29 changed the title Updated outdated package version which was causing subscription failure due to a known bug in @sap/cds-mtxs Fix multi-tenant subscription failure due to outdated cds-mtxs version and missing HANA database_id configuration Jul 3, 2026

@deepikaSingh2711 deepikaSingh2711 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

PujaDeshmukh17
PujaDeshmukh17 previously approved these changes Jul 3, 2026
@yashmeet29 yashmeet29 requested a review from PujaDeshmukh17 July 3, 2026 11:36
@yashmeet29 yashmeet29 merged commit d2c3894 into develop Jul 3, 2026
10 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