Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f29bc15
Add topic configuration and fix config types
milindl Nov 28, 2023
1b20ce6
Add errors for promisified API
milindl Nov 27, 2023
446dee1
Convert delivery report error from string to code for richer error
milindl Nov 29, 2023
15755c1
Add error types to producer, and fix some errors
milindl Nov 30, 2023
9f5c734
Add consumer errors and clean up consumer code
milindl Dec 1, 2023
6a3f5ce
Exhaustive config compability
milindl Dec 3, 2023
7837ac4
Add experimental admin client and example
milindl Dec 4, 2023
8d2daeb
Allow topic config properties to be set with the global config [c++]
milindl Dec 9, 2023
d1c30f4
Add first test for promisified API: consumer.
milindl Dec 9, 2023
85b1341
Add tests for consumer.seek()
milindl Dec 11, 2023
818ce7b
Add tests for consumer.pause() and consumer.resume()
milindl Dec 12, 2023
184e124
Add test for consumer.run().
milindl Dec 12, 2023
daa572b
Make subscriptions replaceable with flag
milindl Dec 12, 2023
11aa5e4
Add producer tests and changes
milindl Dec 12, 2023
0b43e52
Add semaphore block to project (#5)
milindl Nov 30, 2023
4493422
chore: update repo by service bot (#6)
ConfluentJenkins Nov 30, 2023
5470c70
Set up basic semaphore
milindl Nov 30, 2023
9b3bdd5
macOS - basic changes
milindl Nov 30, 2023
af6e124
Try adding packaging flow
milindl Dec 1, 2023
256cea7
Everything, all at once
milindl Dec 5, 2023
de06e49
Merge branch 'master' into dev_producer_testing_and_fixes
milindl Dec 13, 2023
10c63e2
Merge branch 'dev_producer_testing_and_fixes' into feature/add-basic-…
milindl Dec 13, 2023
96add1b
Bump version
milindl Dec 13, 2023
a92ae58
Remove -j flag
milindl Dec 14, 2023
625f3b1
Revert module name changes
milindl Dec 14, 2023
9d91a32
Change gypfiles
milindl Dec 14, 2023
a5f1f4a
Just remove rpath
milindl Dec 14, 2023
fd2b46d
Change path, temporarily
milindl Dec 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
}
}
203 changes: 175 additions & 28 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,38 +25,185 @@ global_job_config:
prologue:
commands:
- checkout
- make show-args
- . vault-setup
- . vault-sem-get-secret cpd_gcloud
- . vault-sem-get-secret ci-reporting
- . vault-sem-get-secret v1/ci/kv/service-foundations/cc-mk-include
- make init-ci
epilogue:
always:
commands:
- make epilogue-ci
- git submodule update --init --recursive
- cd deps/librdkafka
- git fetch origin
- git checkout dev_libdir_fix_for_zstd_zlib
- cd ../../
- export MKL_DEBUG=1



blocks:
- name: "Build, Test, Release"
run:
# don't run the build or unit tests on non-functional changes...
when: "change_in('/', {exclude: ['/.deployed-versions/', '.github/']})"
- name: "Linux arm64: Build and test"
dependencies: [ ]
task:
# You can customize your CI job here
# env_vars:
# # custom env_vars
# prologue:
# commands:
# # custom vault secrets
# # custom prologue commands
agent:
machine:
type: s1-prod-ubuntu20-04-arm64-1
jobs:
- name: "Build, Test, Release"
- name: "Build from source and test"
commands:
- make build
- npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
- make test
- make release-ci
epilogue:
always:

- name: 'macOS arm64/m1: Build and test'
dependencies: []
task:
agent:
machine:
type: s1-prod-macos-arm64
jobs:
- name: 'Build from source and test'
commands:
- npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
- make test

- name: "Linux amd64: Build, test, lint"
dependencies: [ ]
task:
agent:
machine:
type: s1-prod-ubuntu20-04-amd64-2
prologue:
commands:
- npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
jobs:
- name: "Test"
commands:
- make test
- name: "ESLint"
commands:
- npx eslint lib/kafkajs


- name: "Linux amd64: Release"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
task:
agent:
machine:
type: s1-prod-ubuntu20-04-amd64-2
env_vars:
- name: ARCHITECTURE
value: "x64"
- name: PLATFORM
value: "linux"
- name: LIBC
value: "glibc"
jobs:
- name: "Release: LTS:18"
commands:
- sem-version node 18.19.0
- export NODE_ABI=108
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: LTS:20"
commands:
- sem-version node 20.10.0
- export NODE_ABI=115
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: latest: 21"
commands:
- sem-version node 21.4.0
- export NODE_ABI=120
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"

- name: "Linux arm64: Release"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
task:
agent:
machine:
type: s1-prod-ubuntu20-04-arm64-1
env_vars:
- name: ARCHITECTURE
value: "arm64"
- name: PLATFORM
value: "linux"
- name: LIBC
value: "glibc"
jobs:
- name: "Release: LTS:18"
commands:
- sem-version node 18.19.0
- export NODE_ABI=108
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: LTS:20"
commands:
- sem-version node 20.10.0
- export NODE_ABI=115
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: latest: 21"
commands:
- sem-version node 21.4.0
- export NODE_ABI=120
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "macOS arm64/m1: Release"
dependencies: [ ]
run:
when: "tag =~ '^v[0-9]\\.'"
task:
agent:
machine:
type: s1-prod-macos-arm64
env_vars:
- name: ARCHITECTURE
value: "arm64"
- name: PLATFORM
value: "darwin"
- name: LIBC
value: "unknown"
jobs:
- name: "Release: LTS:18"
commands:
- sem-version node 18.19.0
- export NODE_ABI=108
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: LTS:20"
commands:
- sem-version node 20.10.0
- export NODE_ABI=115
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
- name: "Release: latest: 21"
commands:
- make epilogue-ci
- make testbreak-after
- sem-version node 21.4.0
- export NODE_ABI=120
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-${PLATFORM}-${LIBC}-${ARCHITECTURE}.tar.gz"
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
- npx node-pre-gyp package
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ You can add breakpoints and so on after that.

## Updating librdkafka version

The librdkafka should be periodically updated to the latest release in https://github.com/edenhill/librdkafka/releases
The librdkafka should be periodically updated to the latest release in https://github.com/confluentinc/librdkafka/releases

Steps to update:
1. Update the `librdkafka` property in [`package.json`](https://github.com/confluentinc/confluent-kafka-js/blob/master/package.json) to the desired version.
Expand Down
1 change: 1 addition & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
The MIT License (MIT)
Copyright (c) 2016-2023 Blizzard Entertainment
2023 Confluent, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading