February 2023
Welcome to the release of CAP. Find the most noteworthy news and changes in the following sections.TIP
We're focussing already on our upcoming major release and therefore have fewer announcements than usual for you. Nevertheless we hope you enjoy the additions and fixes to our framework.
CDS Language & Compiler
Method-Style Syntax for Spatial Functions
CDS now supports the instance method call syntax and instantiation syntax for geospatial functions.
entity Geo as select from Foo {
geoColumn.ST_Area() as area : Decimal,
new ST_Point(2.25, 3.41).ST_X() as x : Decimal
};
Learn more about Native Database Functions. Learn more about expression notation of function calls. Learn more about the geospatial functions supported by SAP HANA.
Java
Streamlined Deployment Service
The former MtSubscriptionService has been deprecated in favour of the new DeploymentService. It covers all tenant lifecycle events such as subscriptions or upgrades in a lean way:
Event Name | Event Context | Use Case |
---|---|---|
DEPENDENCIES | DependenciesEventContext | MT Dependencies |
SUBSCRIBE | SubscribeEventContext | Add a tenant |
UNSUBSCRIBE | UnsubscribeEventContext | Remove a tenant |
UPGRADE | UpgradeEventContext | Upgrade tenant(s) |
By default, tenant-specific resources such as database containers are deleted during removal. Migration to the new API is recommended.
TIP
Event handlers on the MtSubscriptionService
API are continued to be triggered in a compatibility mode cds.multitenancy.compatibility.enabled
(activated by default).
Miscellaneous
The Maven archetype now has a new property
jdkVersion
, which can be used to determine the JDK version of the generated CAP Java project. Supported values are11
and17
(default).The built-in CDS actuator now contains a new section
dbpools
that shows database pool statistics (requiresregisterMbeans: true
in Hikari pool configuration).The new OData V4 serializer now supports a mode in which it buffers the response before streaming it to the client. This can be enabled in case serialization errors after streaming to the client has already started must be avoided. To enable it set
cds.odataV4.serializer.buffered
totrue
.
Tools
CAP Notebooks From The Docs
CAP Notebooks are now available directly through our documentation.
A new notebook button on the right-hand-side of the screen directly opens a CAP Notebook in a new workspace in the user's local VS Code application.
For this feature, the SAP CDS Language Support Visual Studio Code Extension version 6.6.0 or higher is required.
New CAP Notebook Samples
As CAP Notebooks are now available through our documentation, we make a different kind of CAP Notebook available to you from the CAP Notebooks Welcome page.
These are shorter notebooks which serve to describe and demonstrate the different code/language cell types (Native Shell, Native Terminal, CDS, etc.) as well as different commands available within a CAP Notebook providing you simple examples to help you get started.
AsyncAPI Export Tooling
AsyncAPI Export tooling is now available to document events in the CAP project in AsyncAPI format. You can provide additional configuration for AsyncAPI exports with presets and annotations.
cds compile srv --service all -o docs --to asyncapi
CAP on Kyma/K8s
Connectivity Service
Connectivity Service Instance is no longer created by cds add helm
. Only volumes are added to the srv
deployment. You need to create the service and bind it before deployment.
Learn more about Connectivity service.
Changes in the Helm Chart
- Renamed keys
- New way to specify parameters as JSON for service instances
- Two keys for
saas-registry
With this release the following keys have been renamed/moved:
Old | New |
---|---|
html5_apps_repo_host | html5-apps-repo-host |
service_manager | service-manager |
saas_registry | saas-registry |
event_mesh | event-mesh |
Learn more about configuring SAP BTP services.
The config
property of service instances is no longer supported. If you want to specify parameters using a JSON file then you need to use --set-file
flag during installation.
Learn more about configuration options for SAP BTP services.
The saas-registry
key has been split into 2 different keys. Key 1: saas-registry
is dedicated for the service instance properties. Key 2: saasRegistryParameters
is dedicated for the parameters and these parameters can be modified by the user if required.
Earlier the values.yaml content for saas-registry
was:
saas_registry:
serviceOfferingName: saas-registry
servicePlanName: application
parameters:
getDependencies: "/-/cds/saas-provisioning/dependencies"
onSubscription: "/-/cds/saas-provisioning/tenant/{tenantId}"
...
Now it's changed to:
...
saas-registry:
serviceOfferingName: saas-registry
servicePlanName: application
parametersFrom:
- secretKeyRef:
name: "RELEASE-NAME-saas-registry-secret"
key: parameters
saasRegistryParameters:
xsappname: bookshop
appName: bookshop
displayName: bookshop
description: A simple self-contained bookshop service.
category: "CAP Application"
appUrls:
getDependencies: "/-/cds/saas-provisioning/dependencies"
onSubscription: "/-/cds/saas-provisioning/tenant/{tenantId}"
onSubscriptionAsync: true
onUnSubscriptionAsync: true
onUpdateDependenciesAsync: true
callbackTimeoutMillis: 300000