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

Commit a13d2cc

Browse files
authored
Merge pull request #142 from jwulf/activate-jobs
v0.23.0-alpha.1
2 parents e96b8f3 + 6a083c9 commit a13d2cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4320
-1319
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
test:
3434
docker:
3535
- image: circleci/node:11.10.1
36-
- image: camunda/zeebe:0.22.1
36+
- image: camunda/zeebe:0.23.0-alpha1
3737
working_directory: ~/zeebe-client-node-js
3838
steps:
3939
- checkout

.github/workflows/hourly-test.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Canary Test on Camunda Cloud (Hourly)"
2+
on:
3+
schedule:
4+
# * is a special character in YAML so you have to quote this string
5+
- cron: "*/15 * * * *"
6+
7+
jobs:
8+
test: # make sure build/ci work properly
9+
if: github.repository == 'jwulf/zeebe-client-node-js'
10+
timeout-minutes: 10
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- run: |
15+
npm install
16+
npm run build
17+
npm run test:integration
18+
env:
19+
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
20+
ZEEBE_CLIENT_ID: $ {{ secrets.ZEEBE_CLIENT_ID }}
21+
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
22+
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}

.github/workflows/test-nestjs.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Test NestJS integration"
2+
on: # rebuild any PRs and main branch changes
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
test: # make sure build/ci work properly
8+
if: github.repository == 'jwulf/zeebe-client-node-js'
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: |
14+
npm install
15+
npm run build
16+
npm run test
17+
- run: |
18+
# git clone https://github.com/pay-k/nestjs-zeebe.git
19+
git clone https://github.com/jwulf/nestjs-zeebe.git
20+
cd nestjs-zeebe
21+
git checkout patch-8
22+
npm i
23+
rm -rf node_modules/zeebe-node/dist
24+
cp -r ../dist node_modules/zeebe-node/dist
25+
npm run test
26+
env:
27+
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
28+
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
29+
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
30+
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}

.github/workflows/test-workit.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Test Workit integration"
2+
on: # rebuild any PRs and main branch changes
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
test: # make sure build/ci work properly
8+
if: github.repository == 'jwulf/zeebe-client-node-js'
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: |
14+
npm install
15+
npm run build
16+
npm run test
17+
- run: |
18+
git clone https://github.com/VilledeMontreal/workit.git
19+
cd workit/packages/workit-zeebe-client
20+
npm i
21+
rm -rf node_modules/zeebe-node/dist
22+
cp -r ../../../dist node_modules/zeebe-node/dist
23+
npm run test
24+
env:
25+
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
26+
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
27+
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
28+
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}

.github/workflows/test.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Test on Camunda Cloud"
2+
on: # rebuild any PRs and main branch changes
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
test: # make sure build/ci work properly
8+
if: github.repository == 'jwulf/zeebe-client-node-js'
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- uses: actions/checkout@v1
13+
- run: |
14+
npm install
15+
npm run build
16+
npm run test:integration
17+
env:
18+
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
19+
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
20+
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
21+
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
dist
33
docs
44
.DS_Store
5-
.vscode
5+
.vscode
6+
cctest.ts
7+
t.ts

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Version 0.23.0-alpha.1
2+
3+
## Breaking Changes
4+
5+
- The `job.variables` and `job.customHeaders` in the worker job handler are now typed as read-only structures. This will only be a breaking change if your code relies on mutating these data structures. See the section "Working with Workflow Variables and Custom Headers" in the README for an explanation on doing deep key updates on the job variables.
6+
- The library nows logs with the simplified `ZBSimpleLogger` by default, for friendly human-readable logs. This will only be a breaking change if you currently rely on the structured log output. To get the previous structured log behaviour, pass in `stdout: ZBJsonLogger` to the `ZBClient` constructor options, or set the environment variable `export ZEEBE_NODE_LOG_TYPE=JSON`. Refer to the "Logging" section in the README.
7+
8+
## New Features
9+
10+
- There is a new `ZBBatchWorker`. This allows you to batch jobs that are unrelated in a BPMN model, but are related with respect to some (for example: rate-limited) external system. See the README for details. Thanks to Jimmy Beaudoin ([@jbeaudoin11](https://github.com/jbeaudoin11)) for the suggestion, and helping with the design. Ref: [#134](https://github.com/creditsenseau/zeebe-client-node-js/issues/134).
11+
- `ZBClient.createWorker` has two new, additional, method signature. The first is a single object parameter signature. This is the preferred signature if you are passing in configuration options. The second signature is a version of the original that elides the `id` for the worker. With this, you can create a worker with just a task type and a job handler. A UUID is assigned as the worker id. This is the equivalent of passing in `null` as the first parameter to the original signature. The previous method signature still works, allowing you to specify an id if you want. See [this article for details](https://www.joshwulf.com/blog/2020/02/refining-method-signature/).
12+
- There is now a `ZBLogMessage` interface to help you implement a custom logger [#127](https://github.com/creditsenseau/zeebe-client-node-js/issues/127). For an example of a custom logger, see the [Zeebe GitHub Action implementation](https://github.com/jwulf/zeebe-action/blob/master/src/log/logger.ts).
13+
- There is new custom logger implementation `ZBSimpleLogger` that produces flat string output. If you are not interested in structured logs for analysis, this log is easier for humans to read.
14+
- `ZBClient` now contains an `activateJobs` method. This effectively exposes the entire Zeebe GRPC API, and allows you to write applications in the completely unmanaged style of the Java and Go libraries, if you have some radically different idea about application patterns.
15+
- The Grpc layer has been refactored to implement the idea of "connection characteristics". When connecting to Camunda Cloud, which uses TLS and OAuth, the library would emit errors every time. The refactor allows these connection errors to be correctly interpreted as expected behaviour of the "connection characteristics". See [this article](https://www.joshwulf.com/blog/2020/03/camunda-cloud-connection-2/) and [#133](https://github.com/creditsenseau/zeebe-client-node-js/issues/133) for more details.
16+
- I've started documenting the internal operation of the client in BPMN diagrams. These can be found in the `design` directory.
17+
- The README now contains a section "Writing Strongly-typed Job Workers", on writing typed workers in TypeScript.
18+
- The README also has a shiny TOC. It has grown in size such that one is needed.
19+
120
# Version 0.22.1
221

322
## Breaking Changes

0 commit comments

Comments
 (0)