Skip to content

Commit

Permalink
Upgrade all components to cds8 (#345)
Browse files Browse the repository at this point in the history
This PR fixes test failures of the Bookshop ITests using CAP 3 and cds8.

* `authentication.normalize-provider-tenant: true` needs to be set in
the `application.yaml` because current itest logic requires the provider
tenant to be subscribed. The deployment shell script is setting this
value to `false` using a `sed` command which requires this property to
be available in the file
* `hdi-deploy` in version `5` does not bundle any hana db client, but
comes with a post install script that checks that one client has been
installed by an external party. As we don´t need db accesses in the
ìnstall-dependencies` goal in `pom.xml`, we just set `--ignore-scripts`

---------

Co-authored-by: Marc Becker <marc.becker@sap.com>
  • Loading branch information
StefanHenke and beckermarc authored Jul 19, 2024
1 parent 5db911f commit f0ecebd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
7 changes: 4 additions & 3 deletions db/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "deploy",
"dependencies": {
"@sap/hdi-deploy": "4.8.2"
"hdb": "^0",
"@sap/hdi-deploy": "^5"
},
"engines": {
"node": "^18"
"node": "^20"
},
"scripts": {
"start": "node node_modules/@sap/hdi-deploy/deploy.js",
"start": "node node_modules/@sap/hdi-deploy/deploy.js --use-hdb",
"build": "npm i && npx cds build .. --for hana --production"
}
}
3 changes: 3 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
</executions>
<configuration>
<executable>${cds.npm.executable}</executable>
<environmentVariables>
<PATH>${cds.node.directory}${path.separator}${env.PATH}</PATH>
</environmentVariables>
<skip>${skipTests}</skip>
<workingDirectory>${sidecar.dir}</workingDirectory>
<async>true</async>
Expand Down
16 changes: 7 additions & 9 deletions mtx/sidecar/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"dependencies": {
"@sap/cds": "^7",
"@sap/cds-mtxs": "^1",
"@sap/xssec": "^3",
"express": "^4",
"hdb": "^0",
"passport": "^0",
"@sap/hdi-deploy": "4.8.2"
"@cap-js/hana": "^1",
"@sap/cds": "^8",
"@sap/cds-mtxs": "^2",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"sqlite3": "^5"
"@cap-js/sqlite": "^1"
},
"engines": {
"node": "^18"
"node": "^20"
},
"cds": {
"profiles": ["mtx-sidecar", "java"],
Expand Down
2 changes: 1 addition & 1 deletion srv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<goal>npm</goal>
</goals>
<configuration>
<arguments>install @sap/cds-dk@${cds.install-cdsdk.version} @sap/cds-mtxs@^2 --no-save</arguments>
<arguments>install @sap/cds-dk@${cds.install-cdsdk.version} @sap/cds-mtxs@^2 --ignore-scripts --no-save</arguments>
</configuration>
</execution>

Expand Down
1 change: 1 addition & 0 deletions srv/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cds:
odata-v4:
endpoint.path: "/api"
security:
authentication.normalize-provider-tenant: true
mock.users:
admin:
password: admin
Expand Down

0 comments on commit f0ecebd

Please sign in to comment.