Skip to content

Commit 754fb4c

Browse files
milindlweyert
andauthored
Add prebuilt binaries for node v24 and update for v1.4.0-rc0 (#337)
* feat: add support for Node v24 Updated `semaphore.yml ` to add support for Node.js v24. Used the ABI version as listed in the JSON file located at: https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json * Update post-install and README for v24 * Add CHANGELOG, update SR tests to pass * Revert testing only changes * Update changelog * Revert more testing-only changes * Update 1.4.0 release candidate (#341) * Bump version to 1.4.0-rc0 * Use publicly documented API to download librdkafka NuGet package * Fix librdkafka version * Conform to nuget API * Update so that changes are not -dev * Update to RC4 of librdkafka * Add testing changes * Revert testing changes --------- Co-authored-by: Weyert de Boer <[email protected]>
1 parent a30b761 commit 754fb4c

File tree

14 files changed

+205
-37
lines changed

14 files changed

+205
-37
lines changed

.semaphore/post_install.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ blocks:
3636
- env_var: DOCKER_IMAGE
3737
values: ["debian:bullseye", "debian:bookworm", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
3838
- env_var: NODE_VERSION
39-
values: ["18", "20", "21", "22", "23"]
39+
values: ["18", "20", "21", "22", "23", "24"]
4040
commands:
4141
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-debian.sh "$NODE_VERSION" "$LIBRARY_VERSION"
4242

@@ -55,7 +55,7 @@ blocks:
5555
- env_var: DOCKER_IMAGE
5656
values: ["debian:bullseye", "debian:bookworm", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
5757
- env_var: NODE_VERSION
58-
values: ["18", "20", "21", "22", "23"]
58+
values: ["18", "20", "21", "22", "23", "24"]
5959
commands:
6060
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-debian.sh "$NODE_VERSION" "$LIBRARY_VERSION"
6161

@@ -72,7 +72,7 @@ blocks:
7272
- name: "Install"
7373
matrix:
7474
- env_var: NODE_VERSION
75-
values: ["18", "20", "21", "22", "23"]
75+
values: ["18", "20", "21", "22", "23", "24"]
7676
commands:
7777
- docker run -v "$(pwd):/v" "node:${NODE_VERSION}-alpine" /v/ci/post-install/install-alpine.sh "$NODE_VERSION" "$LIBRARY_VERSION"
7878

@@ -89,7 +89,7 @@ blocks:
8989
- name: "Install"
9090
matrix:
9191
- env_var: NODE_VERSION
92-
values: ["18", "20", "21", "22", "23"]
92+
values: ["18", "20", "21", "22", "23", "24"]
9393
commands:
9494
- docker run -v "$(pwd):/v" "node:${NODE_VERSION}-alpine" /v/ci/post-install/install-alpine.sh "$NODE_VERSION" "$LIBRARY_VERSION"
9595

@@ -108,7 +108,7 @@ blocks:
108108
- env_var: DOCKER_IMAGE
109109
values: ["quay.io/centos/centos:stream9", "almalinux:9", "rockylinux:9"]
110110
- env_var: NODE_VERSION
111-
values: ["18", "20", "21", "22", "23"]
111+
values: ["18", "20", "21", "22", "23", "24"]
112112
commands:
113113
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-rhel.sh "$NODE_VERSION" "$LIBRARY_VERSION"
114114

@@ -127,7 +127,7 @@ blocks:
127127
- env_var: DOCKER_IMAGE
128128
values: ["quay.io/centos/centos:stream9", "almalinux:9", "rockylinux:9"]
129129
- env_var: NODE_VERSION
130-
values: ["18", "20", "21", "22", "23"]
130+
values: ["18", "20", "21", "22", "23", "24"]
131131
commands:
132132
- docker run -v "$(pwd):/v" "$DOCKER_IMAGE" /v/ci/post-install/install-rhel.sh "$NODE_VERSION" "$LIBRARY_VERSION"
133133

@@ -141,7 +141,7 @@ blocks:
141141
- name: "Install"
142142
matrix:
143143
- env_var: NODE_VERSION
144-
values: ["18", "20", "21", "22", "23"]
144+
values: ["18", "20", "21", "22", "23", "24"]
145145
commands:
146146
- sem-version node $NODE_VERSION
147147
- bash ci/post-install/install-mac.sh "$NODE_VERSION" "$LIBRARY_VERSION"
@@ -156,7 +156,7 @@ blocks:
156156
- name: "Install"
157157
matrix:
158158
- env_var: NODE_VERSION
159-
values: ["18", "20", "21", "22", "23"]
159+
values: ["18", "20", "21", "22", "23", "24"]
160160
commands:
161161
- sem-version node $NODE_VERSION
162162
- bash ci/post-install/install-mac.sh "$NODE_VERSION" "$LIBRARY_VERSION"
@@ -187,7 +187,7 @@ blocks:
187187
- name: "Install"
188188
matrix:
189189
- env_var: NODE_VERSION
190-
values: ["18.19.0", "20.11.0", "21.6.1", "22.2.0", "23.2.0"]
190+
values: ["18.19.0", "20.11.0", "21.6.1", "22.2.0", "23.2.0", "24.3.0"]
191191
commands:
192192
- Invoke-WebRequest "https://nodejs.org/download/release/v${env:NODE_VERSION}/node-v${env:NODE_VERSION}-x64.msi" -OutFile node.msi
193193
- msiexec /qn /l* node-log.txt /i node.msi

.semaphore/semaphore.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ global_job_config:
2828
- git submodule update --init --recursive
2929
- cd deps/librdkafka
3030
- git fetch origin
31-
- git checkout v2.10.1
31+
- git checkout v2.11.0-RC4
3232
- cd ../../
3333
- cache clear
3434

@@ -209,6 +209,7 @@ blocks:
209209
- 21,120
210210
- 22,127
211211
- 23,131
212+
- 24,137
212213
commands:
213214
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
214215
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -245,6 +246,7 @@ blocks:
245246
- 21,120
246247
- 22,127
247248
- 23,131
249+
- 24,137
248250
commands:
249251
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
250252
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -281,6 +283,7 @@ blocks:
281283
- 21,120
282284
- 22,127
283285
- 23,131
286+
- 24,137
284287
commands:
285288
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
286289
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -317,6 +320,7 @@ blocks:
317320
- 21,120
318321
- 22,127
319322
- 23,131
323+
- 24,137
320324
commands:
321325
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
322326
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -350,6 +354,7 @@ blocks:
350354
- 21,120
351355
- 22,127
352356
- 23,131
357+
- 24,137
353358
commands:
354359
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
355360
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -385,6 +390,7 @@ blocks:
385390
- 21,120
386391
- 22,127
387392
- 23,131
393+
- 24,137
388394
commands:
389395
- export NODE_VERSION=$(echo $NODE_VERSION_ABI | cut -d, -f1)
390396
- export NODE_ABI=$(echo $NODE_VERSION_ABI | cut -d, -f2)
@@ -439,6 +445,7 @@ blocks:
439445
- 21.6.1,120
440446
- 22.2.0,127
441447
- 23.2.0,131
448+
- 24.3.0,137
442449
commands:
443450
- $env:NODE_VERSION = $env:NODE_VERSION_ABI.Split(',')[0]
444451
- $env:NODE_ABI = $env:NODE_VERSION_ABI.Split(',')[1]
@@ -449,6 +456,7 @@ blocks:
449456
- pip install setuptools
450457
- $env:ARTIFACT_KEY = "confluent-kafka-javascript-${env:SEMAPHORE_GIT_TAG_NAME}-node-v${env:NODE_ABI}-${env:PLATFORM}-${env:LIBC}-${env:ARCHITECTURE}.tar.gz"
451458
- echo "$env:ARTIFACT_KEY"
459+
- npm config delete registry # we have no requirement for internal packages.
452460
- npm ci # node-pre-gyp will fallback to build here, because new tag implies no release yet.
453461
- npx node-pre-gyp package
454462
- ls "build/stage/${env:SEMAPHORE_GIT_TAG_NAME}/${env:ARTIFACT_KEY}"

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ v1.4.0 is a feature release. It is supported for all usage.
55
## Enhancements
66

77
1. References librdkafka v2.11.0. Refer to the [librdkafka v2.11.0 release notes](https://github.com/confluentinc/librdkafka/releases/tag/v2.11.0) for more information.
8-
2. [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and its defaults to being undefined (#329)
9-
3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328)
8+
2. [KIP-848] `describeGroups()` now supports KIP-848 introduced `consumer` groups. Two new fields for consumer group type and target assignment have also been added. Type defines whether this group is a `classic` or `consumer` group. Target assignment is only valid for the `consumer` protocol and it defaults to being undefined (#329).
9+
3. [KIP-848] Admin API for listing consumer groups now has an optional filter to return only groups of given types (#328).
10+
4. Add support for Node v24 pre-built binaries (@weyert, #307, #337).
11+
1012

1113
# confluent-kafka-javascript v1.3.2
1214

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ The following configurations are supported:
3333

3434
| Distribution | Supported Node Versions |
3535
| ----------------------------------------- | ----------------------- |
36-
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22, 23 |
37-
| Debian Bookworm/Ubuntu 22.04 | 18, 20, 21, 22, 23 |
38-
| Alpine Linux 3.20+ | 18, 20, 21, 22, 23 |
39-
| AlmaLinux 9/Rocky Linux 9/CentOS Stream 9 | 18, 20, 21, 22, 23 |
36+
| Debian Bullseye/Ubuntu 20.04 | 18, 20, 21, 22, 23, 24 |
37+
| Debian Bookworm/Ubuntu 22.04 | 18, 20, 21, 22, 23, 24 |
38+
| Alpine Linux 3.20+ | 18, 20, 21, 22, 23, 24 |
39+
| AlmaLinux 9/Rocky Linux 9/CentOS Stream 9 | 18, 20, 21, 22, 23, 24 |
4040

4141
Other distributions will probably work given a modern version of gcc/glibc, but we don't test the pre-built binaries with them.
4242

43-
* macOS - arm64/m1. macOS (Intel) is supported on a best-effort basis. Node versions 18, 20, 21, 22, and 23 are supported.
44-
* Windows - x64. Node versions 18, 20, 21, 22, and 23 are supported.
43+
* macOS - arm64/m1. macOS (Intel) is supported on a best-effort basis. Node versions 18, 20, 21, 22, 23 and 24 are supported.
44+
* Windows - x64. Node versions 18, 20, 21, 22, 23 and 24 are supported.
4545

4646
> [!WARNING]
4747
> Pre-built binary support will be dropped after the EOL of the node version or the OS.
@@ -115,6 +115,7 @@ For guidelines on contributing please see [CONTRIBUTING.md](CONTRIBUTING.md)
115115
| 1.3.0 | 2.10.0 |
116116
| 1.3.1 | 2.10.0 |
117117
| 1.3.2 | 2.10.1 |
118+
| 1.4.0 | 2.11.0 |
118119

119120
This mapping is applicable if you're using a pre-built binary. Otherwise, you can check the librdkafka version with the following command:
120121

deps/windows-install.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
depsIncludeDir = '../deps/include'
1717
buildReleaseDir = 'Release'
1818

19-
# alternative: 'https://api.nuget.org/v3-flatcontainer/librdkafka.redist/{}/librdkafka.redist.{}.nupkg'.format(librdkafkaVersion, librdkafkaVersion)
19+
# Use publicly documented API to download librdkafka NuGet package.
20+
# https://api.nuget.org/v3-flatcontainer/{package}/{version}/{package}.{version}.nupkg
21+
# See https://learn.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-content-nupkg
2022
env_dist = os.environ
21-
downloadBaseUrl = env_dist['NODE_RDKAFKA_NUGET_BASE_URL'] if 'NODE_RDKAFKA_NUGET_BASE_URL' in env_dist else 'https://globalcdn.nuget.org/packages/'
22-
librdkafkaNugetUrl = downloadBaseUrl + 'librdkafka.redist.{}.nupkg'.format(librdkafkaVersion)
23+
downloadBaseUrl = env_dist['NODE_RDKAFKA_NUGET_BASE_URL'] if 'NODE_RDKAFKA_NUGET_BASE_URL' in env_dist else 'https://api.nuget.org/v3-flatcontainer/librdkafka.redist/{version}/'
24+
librdkafkaNugetUrl = downloadBaseUrl + 'librdkafka.redist.{version}.nupkg'
25+
librdkafkaNugetUrl = librdkafkaNugetUrl.format(version=librdkafkaVersion.lower())
2326
print('download librdkafka form ' + librdkafkaNugetUrl)
2427
outputDir = 'librdkafka.redist'
2528
outputFile = outputDir + '.zip'

lib/error.js

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LibrdKafkaError.wrap = errorWrap;
2828
* @constant
2929
* @memberof RdKafka
3030
*/
31-
// ====== Generated from librdkafka 2.10.1 file src-cpp/rdkafkacpp.h ======
31+
// ====== Generated from librdkafka 2.11.0-RC4 file src-cpp/rdkafkacpp.h ======
3232
LibrdKafkaError.codes = {
3333

3434
/* Internal errors to rdkafka: */
@@ -159,6 +159,11 @@ LibrdKafkaError.codes = {
159159
ERR__AUTO_OFFSET_RESET: -140,
160160
/** Partition log truncation detected */
161161
ERR__LOG_TRUNCATION: -139,
162+
/** A different record in the batch was invalid
163+
* and this message failed persisting. */
164+
ERR__INVALID_DIFFERENT_RECORD: -138,
165+
/** Broker is going away but client isn't terminating */
166+
ERR__DESTROY_BROKER: -137,
162167
/** End internal error codes */
163168
ERR__END: -100,
164169
/* Kafka broker errors: */
@@ -374,7 +379,28 @@ LibrdKafkaError.codes = {
374379
/** Unable to update finalized features due to server error */
375380
ERR_FEATURE_UPDATE_FAILED: 96,
376381
/** Request principal deserialization failed during forwarding */
377-
ERR_PRINCIPAL_DESERIALIZATION_FAILURE: 97
382+
ERR_PRINCIPAL_DESERIALIZATION_FAILURE: 97,
383+
/** Unknown Topic Id */
384+
ERR_UNKNOWN_TOPIC_ID: 100,
385+
/** The member epoch is fenced by the group coordinator */
386+
ERR_FENCED_MEMBER_EPOCH: 110,
387+
/** The instance ID is still used by another member in the
388+
* consumer group */
389+
ERR_UNRELEASED_INSTANCE_ID: 111,
390+
/** The assignor or its version range is not supported by the consumer
391+
* group */
392+
ERR_UNSUPPORTED_ASSIGNOR: 112,
393+
/** The member epoch is stale */
394+
ERR_STALE_MEMBER_EPOCH: 113,
395+
/** Client sent a push telemetry request with an invalid or outdated
396+
* subscription ID. */
397+
ERR_UNKNOWN_SUBSCRIPTION_ID: 117,
398+
/** Client sent a push telemetry request larger than the maximum size
399+
* the broker will accept. */
400+
ERR_TELEMETRY_TOO_LARGE: 118,
401+
/** Client metadata is stale,
402+
* client should rebootstrap to obtain new metadata. */
403+
ERR_REBOOTSTRAP_REQUIRED: 129
378404
};
379405

380406
/**

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ util.dictToStringList = function (mapOrObject) {
5252
return list;
5353
};
5454

55-
util.bindingVersion = '1.3.2';
55+
util.bindingVersion = '1.4.0-rc0';

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@confluentinc/kafka-javascript",
3-
"version": "1.3.2",
3+
"version": "1.4.0-rc0",
44
"description": "Node.js bindings for librdkafka",
5-
"librdkafka": "2.10.1",
6-
"librdkafka_win": "2.10.1",
5+
"librdkafka": "2.11.0-RC4",
6+
"librdkafka_win": "2.11.0-RC4",
77
"main": "lib/index.js",
88
"types": "types/index.d.ts",
99
"scripts": {
@@ -65,4 +65,4 @@
6565
"schemaregistry",
6666
"schemaregistry-examples"
6767
]
68-
}
68+
}

0 commit comments

Comments
 (0)