Development conventions.
Please create a new branch for each feature or fix, and branch from master
.
There is a precommit hook that runs the disconnection test, which requires Docker to be installed and for no Zeebe container to be running.
We use AngularJS's commit message conventions, enforced by commitizen. This is used by semantic-release to automate releases to NPM when PRs are merged into master.
Run git commit
without the -m
flag to get a wizard that will guide you through creating an appropriate commit message.
Please squash and rebase commits on master.
Pull Requests must be labelled before they are merged to master. This is used by Release Drafter to automate Release Notes on GitHub.
The npm package publishing is handled by a GitHub Workflow using semantic-release.
A new package will be released whenever a PR is merged into master.
There is a test that checks that the client can reconnect to a rescheduled broker, or a broker that starts after the client application.
It can be run with npm run test:disconnection
and it is run automatically when committing changes. It requires Docker to be running on your machine.
Try this for the insane level of trace logging:
DEBUG=grpc,worker GRPC_TRACE=all GRPC_VERBOSITY=DEBUG jest Worker-LongPoll --detectOpenHandles
To log from the Node engine itself (useful in tracking down grpc issues in grpc-js):
NODE_DEBUG=http2 GRPC_TRACE=channel,call_stream GRPC_VERBOSITY=DEBUG ZEEBE_NODE_LOGLEVEL=debug ZEEBE_NODE_PUREJS=true npm run test:integration
To get extended stack traces:
NODE_DEBUG=http2 GRPC_TRACE=channel,call_stream ZEEBE_NODE_PUREJS=true node --expose-internals --expose-gc node_modules/.bin/jest --runInBand --testPathIgnorePatterns disconnection --detectOpenHandles --verbose true Worker-Failure
valgrind node --expose-internals --expose-gc node_modules/.bin/jest --runInBand --testPathIgnorePatterns disconnection --detectOpenHandles Worker-Failure
sudo apt install -y build-essential curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash source ~/.bashrc nvm install 14 git clone https://github.com/camunda-community-hub/zeebe-client-node-js.git cd zeebe-client-node-js npm i
ZEEBE_NODE_PUREJS=true node_modules/.bin/jest Worker-Failure