Skip to content

feat: Introduce MTX ORD provider service#398

Open
mlakov wants to merge 3 commits intomainfrom
feat/implement-mtx-ord-provider-service
Open

feat: Introduce MTX ORD provider service#398
mlakov wants to merge 3 commits intomainfrom
feat/implement-mtx-ord-provider-service

Conversation

@mlakov
Copy link
Copy Markdown
Contributor

@mlakov mlakov commented Mar 16, 2026

Introduce MTX ORD Provider Service

New Feature

✨ Adds a new MTX (Multi-Tenancy Extension) ORD (Open Resource Discovery) provider service that exposes endpoints for retrieving ORD documents and resources in a multi-tenant context.

Changes

  • lib/services/mtx-ord-provider-service.cds: Defines the cds.xt.ord.MtxOrdProviderService as a REST service protected by internal-user authentication, mounted at /-/cds/ord-provider-service. Exposes two actions:

    • getOrdDocument — retrieves a full ORD document for a given tenant, feature toggles, and runtime (nodejs/java).
    • getOrdResourceDefinition — retrieves a specific ORD resource definition (as LargeString) with the same tenant/toggle/runtime parameters.
  • lib/services/mtx-ord-provider-service.js: Implements the service logic by extending cds.ApplicationService. Both action handlers delegate to cds.xt.ModelProviderService.getCsn() to resolve the tenant-specific CSN model and then call the ord / getMetadata utilities to generate the appropriate response, including setting the correct Content-Type header.

  • package.json: Registers the new MTX ORD provider service under the [mtx-sidecar] profile, mapping the SAP ORD Service model to @cap-js/ord/lib/services/mtx-ord-provider-service so it is activated automatically in sidecar deployments.

  • 🔄 Regenerate and Update Summary

📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

PR Bot Information

Version: 1.19.9 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Output Template: Default Template
  • Summary Prompt: Default Prompt
  • Event Trigger: pull_request.edited
  • File Content Strategy: Full file content
  • Correlation ID: 6a8ca730-2c4e-11f1-8789-14023244cff6
  • LLM: anthropic--claude-4.6-sonnet

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

The PR introduces a new MTX ORD provider service with two substantive bugs: req.document (always undefined) is passed instead of req.data.resource to getMetadata, which will silently break the getOrdResource action; and inconsistent optional chaining on req._ between the two handlers means getOrdResource can throw a TypeError in non-HTTP contexts. Both issues should be addressed before merging.

PR Bot Information

Version: 1.18.5 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: 7aabcd70-213c-11f1-8fd3-42704edda460
  • Event Trigger: pull_request.opened
  • LLM: anthropic--claude-4.6-sonnet
  • Agent Instructions:

@mlakov mlakov force-pushed the feat/implement-mtx-ord-provider-service branch 3 times, most recently from ce63a52 to f3f800c Compare March 16, 2026 16:13
@cap-js cap-js deleted a comment from hyperspace-insights bot Mar 16, 2026
@cap-js cap-js deleted a comment from hyperspace-insights bot Mar 16, 2026
@mlakov mlakov force-pushed the feat/implement-mtx-ord-provider-service branch from f3f800c to 2f81e27 Compare March 16, 2026 16:30
Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

The PR introduces a useful MTX ORD provider service, but has several correctness issues that need attention: the MtxOrdProviderService needs to be blocklisted to prevent it from appearing as a spurious ORD API resource; both action handlers lack error handling; and cds.services["cds.xt.ModelProviderService"] should use the idiomatic cds.connect.to() pattern to avoid crashes when the service is not yet available.

PR Bot Information

Version: 1.18.5 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: d0ab9ac0-2155-11f1-978d-6e6a2209012e
  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: issue_comment.created
  • Agent Instructions:

@hyperspace-insights hyperspace-insights bot deleted a comment from mlakov Mar 16, 2026
@mlakov mlakov added the run-e2e Trigger e2e test pipeline label Mar 30, 2026
@mlakov mlakov force-pushed the feat/implement-mtx-ord-provider-service branch from 6829b14 to 99641c2 Compare March 30, 2026 15:35
@mlakov mlakov marked this pull request as ready for review March 30, 2026 15:37
@hyperspace-insights
Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Introduce MTX ORD Provider Service

New Feature

✨ Adds a new MTX (Multi-Tenancy Extension) ORD (Open Resource Discovery) provider service that exposes endpoints for retrieving ORD documents and resources in a multi-tenant context.

Changes

  • lib/services/mtx-ord-provider-service.cds: Defines the cds.xt.ord.MtxOrdProviderService as a REST service protected by internal-user authentication, mounted at /-/cds/ord-provider-service. Exposes two actions:

    • getOrdDocument — retrieves a full ORD document for a given tenant, feature toggles, and runtime (nodejs/java).
    • getOrdResourceDefinition — retrieves a specific ORD resource definition (as LargeString) with the same tenant/toggle/runtime parameters.
  • lib/services/mtx-ord-provider-service.js: Implements the service logic by extending cds.ApplicationService. Both action handlers delegate to cds.xt.ModelProviderService.getCsn() to resolve the tenant-specific CSN model and then call the ord / getMetadata utilities to generate the appropriate response, including setting the correct Content-Type header.

  • package.json: Registers the new MTX ORD provider service under the [mtx-sidecar] profile, mapping the SAP ORD Service model to @cap-js/ord/lib/services/mtx-ord-provider-service so it is activated automatically in sidecar deployments.


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.19.9 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Summary Prompt: Default Prompt
  • Correlation ID: 613105f0-2c4e-11f1-9bae-d82726b783da
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.ready_for_review
  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

@mlakov mlakov requested a review from pavelkornev March 30, 2026 15:38
Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

The PR introduces a useful MTX sidecar ORD provider service, but has three substantive issues: cds.connect.to is invoked on every request instead of once during init(), error handling is absent in both action handlers (unlike the pattern established in ord-service.js), and MtxOrdProviderService is not blocked in the ORD generation pipeline which will cause it to generate a self-referential API resource in the output document.

PR Bot Information

Version: 1.19.9 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: 613105f0-2c4e-11f1-9bae-d82726b783da
  • Agent Instructions:
  • File Content Strategy: Full file content
  • Event Trigger: pull_request.ready_for_review
  • LLM: anthropic--claude-4.6-sonnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-e2e Trigger e2e test pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant