-
Notifications
You must be signed in to change notification settings - Fork 495
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
Migrate from zeebe-node
to @camunda8/sdk
#4817
base: develop
Are you sure you want to change the base?
Conversation
This Pull Request targets Consider targeting |
7d23799
to
ba2d1ff
Compare
759cbe7
to
6b5884a
Compare
6b5884a
to
d38d0fd
Compare
- urlWithoutProtocol added in testcases
todo: remove zeebe-node
- replace useTLS to CAMUNDA_SECURE_CONNECTION - adjusted test cases - replaced customSSL object to CAMUNDA_CUSTOM_ROOT_CERT_STRING
d38d0fd
to
0bb7d9c
Compare
zeebe-node
to @camunda8/sdk
@@ -2456,6 +2473,10 @@ function setupPlatformStub() { | |||
}); | |||
} | |||
|
|||
function extractUrlWithoutProtocol(url) { |
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.
Let's not duplicate this helper and maybe also make it a bit more forgiving:
function removeProtocol(url) {
const urlObject = new URL(url);
return urlObject.host + urlObject.pathname;
}
@@ -178,6 +178,9 @@ export default class DeploymentPluginOverlay extends React.PureComponent { | |||
if (endpoint.targetType === CAMUNDA_CLOUD && endpoint.camundaCloudClusterUrl) { | |||
endpoint.camundaCloudClusterId = extractClusterId(endpoint.camundaCloudClusterUrl); | |||
endpoint.camundaCloudClusterRegion = extractClusterRegion(endpoint.camundaCloudClusterUrl); | |||
|
|||
// required by camunda8/sdk | |||
endpoint.camundaZeebeAddress = extractUrlWithoutProtocol(endpoint.camundaCloudClusterUrl); |
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.
I'd say let's not add the URL minus the protocol everywhere. We have the full URL anyway and we can remove the protocol when creating the Zeebe GRPC client.
@@ -1401,12 +1402,10 @@ describe('ZeebeAPI', function() { | |||
|
|||
// given | |||
const zeebeAPI = mockCamundaClient({ | |||
ZBClient: function() { | |||
return { | |||
ZBClient: { |
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.
Let's rename this configuration for clarity to something like zeebeGrpcApiClient
which is what this configuration is for.
@@ -39,11 +39,13 @@ describe('<ZeebeAPI>', function() { | |||
const zeebeAPI = new ZeebeAPI(backend); | |||
|
|||
const contactPoint = 'contactPoint'; | |||
const contactPointWithoutProtocol = 'contactPointWithoutProtocol'; |
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.
Again, this commit changes tests only. It's much easier for the reviewer if changes and the respective tests are bundled together.
Closes #4109
Proposed Changes
Migrated client from zeebe-node (deprecated) to camunda8-sdk
How to test
Camnda 8 SaaS
Docs: https://docs.camunda.io/docs/components/modeler/desktop-modeler/connect-to-camunda-8/
Camunda 8 Self-Managed
Authentication: None
Checkout https://github.com/camunda/zeebe-connection-test. Here you can spin up the docker environment with environment variables and certificates to test the connection
Insecure Connection (without SSL)
Secure Connection (with SSL)
To test with the Camunda Modeler pass the custom SSL root certificate use the --zeebe-ssl-certificate flag:
Authentication: Basic
Checkout this branch #basic-auth (https://github.com/camunda/zeebe-connection-test/tree/basic-auth)
For this to test, create a secure connection via reverse proxy
creds:
demo:demo
port: 8181
source: https://github.com/camunda/zeebe-connection-test/blob/basic-auth/README.md
Authentication: OAuth
Same as Camunda SAAS, just select Camunda self managed with OAuth
Tip
TL;DR: You can use zeebe-connection-test to test the sdk.
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}