-
Notifications
You must be signed in to change notification settings - Fork 139
fix profile #2134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix profile #2134
Conversation
Thanks @Akatuoro , |
@renejeglinsky , good point, but it's just the documentation. $ cds init bookshop-mt --add java,multitenancy
...
$ cd bookshop-mt
$ cat mtx/sidecar/package.json
{
"name": "bookshop-mt-mtx",
"dependencies": {
"@cap-js/hana": "^2",
"@sap/cds": "^9",
"@sap/cds-mtxs": "^3",
"@sap/xssec": "^4",
"express": "^4"
},
"devDependencies": {
"@cap-js/sqlite": "^2"
},
"engines": {
"node": ">=20"
},
"scripts": {
"start": "cds-serve",
"build": "cds build ../.. --for mtx-sidecar --production && npm ci --prefix gen"
},
"cds": {
"profiles": [
"mtx-sidecar",
"java"
]
}
}
|
@swaldmann can you please explain when that has changed? I couldn't find anything relevant in the changelog and I assume the docs were right at one point in time, or? |
Hi @Akatuoro , I think we're looking at different things. You're checking the sidecar package.json. But the docs is about the .cdsrc.json of the root project. So at both places it is as described, I think. /bookshop-mt$ cat .cdsrc.json
{
"cdsc": {
"draftMessages": true
},
"profiles": [
"with-mtx-sidecar",
"java"
],
"requires": {
"[production]": {
"multitenancy": true
}
}
} |
This reverts commit 99a6f61.
You're right, this is the app config, not the sidecar... Both me and some colleagues missed that :D I've reverted the original change and instead updated the sidecar package.json with what is currently generated. That was missing the java profile. Future goal would be that we don't need to provide the java profile because it is automatically propagated, but currently there can be errors if the profile is not given. |
Could be a challenge to detect Java implicitly as the sidecar doesn't include the pom.xml or any other indication that it's running with a Java backend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This details box should only show what is actually added by cds add multitenancy. In addition people might miss it here. Therefore we add this outside the details box.
@swaldmann Is this configuration preset the If yes, I'd read it as 'this comes with the "with-mtx-sidecar" profile' and am wondering why it didn't work for @Akatuoro |
Thanks @Akatuoro , I then have misinterpreted your previous comment or wasn't aware of your scenario that you described now. |
This somehow found it's way in... the build does not work withwith-mtx-sidecar
, the correct profile here ismtx-sidecar
as also described in the node section.Updating the sidecar package.json to what is currently generated (incl java profile).