Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Latest commit

 

History

History
73 lines (44 loc) · 2.85 KB

DEVELOP.md

File metadata and controls

73 lines (44 loc) · 2.85 KB

Development

Development conventions.

Creating a new branch

Please create a new branch for each feature or fix, and branch from master.

Precommit hooks

There is a precommit hook that runs the disconnection test, which requires Docker to be installed and for no Zeebe container to be running.

Commit messages

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.

Pull Requests

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.

Publishing a new npm package

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.

Disconnection test

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.

Debug logging

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

Scaffold a Ubuntu machine for dev

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

Set Camunda Cloud env variables

ZEEBE_NODE_PUREJS=true node_modules/.bin/jest Worker-Failure