pulsar-client 1.13.2 → 1.14.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/aws.xml +18 -0
- package/.idea/codeStyles/Project.xml +7 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +7 -0
- package/.idea/modules.xml +9 -0
- package/.idea/pulsar-client-node.iml +46 -0
- package/.idea/pulsar_client_node.iml +8 -0
- package/.idea/vcs.xml +6 -0
- package/index.d.ts +17 -0
- package/package.json +1 -1
- package/src/Client.cc +2 -1
- package/src/Client.h +1 -0
- package/src/ConsumerConfig.cc +66 -0
- package/src/cert.pem +3278 -0
- package/.clang-format +0 -26
- package/.eslintignore +0 -21
- package/.eslintrc.json +0 -22
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -85
- package/.github/workflows/ci-build-release-napi.yml +0 -211
- package/.github/workflows/ci-pr-validation.yml +0 -334
- package/build-support/download-release-artifacts.py +0 -77
- package/build-support/generate-source-archive.sh +0 -28
- package/build-support/pulsar-test-container-start.sh +0 -43
- package/build-support/pulsar-test-service-start.sh +0 -39
- package/build-support/pulsar-test-service-stop.sh +0 -32
- package/build-support/sign-files.sh +0 -32
- package/build-support/stage-release.sh +0 -44
- package/docs/release-process.md +0 -291
- package/examples/certificate/private-key.client-rsa.pem +0 -27
- package/examples/certificate/public-key.client-rsa.pem +0 -9
- package/examples/consumer-schema.js +0 -66
- package/examples/consumer.js +0 -46
- package/examples/consumer_listener.js +0 -44
- package/examples/consumer_tls_auth.js +0 -51
- package/examples/consummer_token_auth.js +0 -50
- package/examples/consummer_token_auth_supplier.js +0 -56
- package/examples/custom_logger.js +0 -60
- package/examples/encryption-consumer.js +0 -47
- package/examples/encryption-producer.js +0 -50
- package/examples/encryption-reader.js +0 -44
- package/examples/producer-schema.js +0 -76
- package/examples/producer.js +0 -48
- package/examples/producer_tls_auth.js +0 -52
- package/examples/producer_token_auth.js +0 -48
- package/examples/producer_token_auth_supplier.js +0 -53
- package/examples/reader.js +0 -43
- package/examples/reader_listener.js +0 -37
- package/license-checker-config.json +0 -43
- package/license-header.txt +0 -16
- package/perf/perf_consumer.js +0 -103
- package/perf/perf_producer.js +0 -118
- package/pkg/linux/Dockerfile_linux_glibc +0 -31
- package/pkg/linux/Dockerfile_linux_musl +0 -32
- package/pkg/linux/build-napi-inside-docker.sh +0 -31
- package/pkg/linux/download-cpp-client.sh +0 -65
- package/pkg/load_test.js +0 -34
- package/pkg/mac/download-cpp-client.sh +0 -36
- package/pkg/windows/download-cpp-client.bat +0 -12
- package/tests/certificate/private-key.client-rsa.pem +0 -27
- package/tests/certificate/public-key.client-rsa.pem +0 -9
- package/tests/certificate/server.crt +0 -20
- package/tests/certificate/server.key +0 -28
- package/tests/client.test.js +0 -122
- package/tests/conf/standalone.conf +0 -308
- package/tests/consumer.test.js +0 -434
- package/tests/docker-load-test.sh +0 -35
- package/tests/end_to_end.test.js +0 -1447
- package/tests/http_utils.js +0 -45
- package/tests/load-test.sh +0 -43
- package/tests/producer.test.js +0 -160
- package/tests/reader.test.js +0 -175
- package/tests/run-unit-tests.sh +0 -35
- package/tsconfig.json +0 -22
- package/tslint.json +0 -9
- package/tstest.ts +0 -408
- package/typedoc.json +0 -15
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
import sys
|
|
21
|
-
import requests
|
|
22
|
-
import os
|
|
23
|
-
import shutil
|
|
24
|
-
import zipfile
|
|
25
|
-
import tempfile
|
|
26
|
-
from pathlib import Path
|
|
27
|
-
|
|
28
|
-
if len(sys.argv) != 3:
|
|
29
|
-
print("Usage: ")
|
|
30
|
-
print(" %s $WORKFLOW_RUN_ID $DEST_PATH" % sys.argv[0])
|
|
31
|
-
sys.exit(-1)
|
|
32
|
-
|
|
33
|
-
if 'GITHUB_TOKEN' not in os.environ:
|
|
34
|
-
print('You should have a GITHUB_TOKEN environment variable')
|
|
35
|
-
sys.exit(-1)
|
|
36
|
-
|
|
37
|
-
GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
|
|
38
|
-
|
|
39
|
-
ACCEPT_HEADER = 'application/vnd.github+json'
|
|
40
|
-
LIST_URL = 'https://api.github.com/repos/apache/pulsar-client-node/actions/runs/%d/artifacts'
|
|
41
|
-
|
|
42
|
-
workflow_run_id = int(sys.argv[1])
|
|
43
|
-
dest_path = sys.argv[2]
|
|
44
|
-
|
|
45
|
-
workflow_run_url = LIST_URL % workflow_run_id
|
|
46
|
-
headers = {'Accept': ACCEPT_HEADER, 'Authorization': f'Bearer {GITHUB_TOKEN}'}
|
|
47
|
-
|
|
48
|
-
response = requests.get(workflow_run_url, headers=headers)
|
|
49
|
-
response.raise_for_status()
|
|
50
|
-
|
|
51
|
-
data = response.json()
|
|
52
|
-
for artifact in data['artifacts']:
|
|
53
|
-
name = artifact['name']
|
|
54
|
-
url = artifact['archive_download_url']
|
|
55
|
-
|
|
56
|
-
print(f'Downloading {name} from {url}')
|
|
57
|
-
artifact_response = requests.get(url, headers=headers, stream=True)
|
|
58
|
-
artifact_response.raise_for_status()
|
|
59
|
-
|
|
60
|
-
with tempfile.NamedTemporaryFile(delete=False) as tmp_zip:
|
|
61
|
-
for chunk in artifact_response.iter_content(chunk_size=8192):
|
|
62
|
-
tmp_zip.write(chunk)
|
|
63
|
-
tmp_zip_path = tmp_zip.name
|
|
64
|
-
|
|
65
|
-
try:
|
|
66
|
-
dest_dir = os.path.join(dest_path, name)
|
|
67
|
-
Path(dest_dir).mkdir(parents=True, exist_ok=True)
|
|
68
|
-
with zipfile.ZipFile(tmp_zip_path, 'r') as z:
|
|
69
|
-
z.extractall(dest_dir)
|
|
70
|
-
finally:
|
|
71
|
-
os.unlink(tmp_zip_path)
|
|
72
|
-
|
|
73
|
-
for root, dirs, files in os.walk(dest_path, topdown=False):
|
|
74
|
-
for name in files:
|
|
75
|
-
shutil.move(os.path.join(root, name), dest_path)
|
|
76
|
-
if not os.listdir(root):
|
|
77
|
-
os.rmdir(root)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
ROOT_DIR=$(git rev-parse --show-toplevel)
|
|
21
|
-
|
|
22
|
-
VERSION=$(npm version | grep pulsar-client | awk -F ':' '{print $2}' | sed "s?'??g" | sed "s?,??g" | sed "s? ??g")
|
|
23
|
-
|
|
24
|
-
NAME=apache-pulsar-client-node-$VERSION
|
|
25
|
-
|
|
26
|
-
OUT_DIR=${1:-.}
|
|
27
|
-
|
|
28
|
-
git archive --format=tar.gz --prefix ${NAME}/ -o ${OUT_DIR}/${NAME}.tar.gz HEAD
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
set -e -x
|
|
22
|
-
|
|
23
|
-
export PULSAR_STANDALONE_CONF=test-conf/standalone.conf
|
|
24
|
-
# There is an issue when starting the pulsar standalone with other metadata store: https://github.com/apache/pulsar/issues/17984
|
|
25
|
-
# We need to use Zookeeper here. Otherwise the `Message Chunking` test will not pass.
|
|
26
|
-
# We can remove this line after the pulsar release a new version contains this fix: https://github.com/apache/pulsar/pull/18126
|
|
27
|
-
export PULSAR_STANDALONE_USE_ZOOKEEPER=1
|
|
28
|
-
bin/pulsar-daemon start standalone \
|
|
29
|
-
--no-functions-worker --no-stream-storage \
|
|
30
|
-
--bookkeeper-dir data/bookkeeper
|
|
31
|
-
|
|
32
|
-
echo "-- Wait for Pulsar service to be ready"
|
|
33
|
-
for i in $(seq 30); do
|
|
34
|
-
curl http://localhost:8080/metrics > /dev/null 2>&1 && break
|
|
35
|
-
if [ $i -lt 30 ]; then
|
|
36
|
-
sleep 1
|
|
37
|
-
else
|
|
38
|
-
echo '-- Pulsar standalone server startup timed out'
|
|
39
|
-
exit 1
|
|
40
|
-
fi
|
|
41
|
-
done
|
|
42
|
-
|
|
43
|
-
echo "-- Ready to start tests"
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
set -e
|
|
22
|
-
|
|
23
|
-
SRC_DIR=$(git rev-parse --show-toplevel)
|
|
24
|
-
cd $SRC_DIR
|
|
25
|
-
|
|
26
|
-
build-support/pulsar-test-service-stop.sh
|
|
27
|
-
|
|
28
|
-
CONTAINER_ID=$(docker run -i -p 8080:8080 -p 6650:6650 -p 8443:8443 -p 6651:6651 --rm --detach apachepulsar/pulsar:latest sleep 3600)
|
|
29
|
-
|
|
30
|
-
echo $CONTAINER_ID >.tests-container-id.txt
|
|
31
|
-
|
|
32
|
-
docker cp $SRC_DIR/tests/conf $CONTAINER_ID:/pulsar/test-conf
|
|
33
|
-
docker cp $SRC_DIR/tests/certificate/server.crt $CONTAINER_ID:/pulsar/test-conf
|
|
34
|
-
docker cp $SRC_DIR/tests/certificate/server.key $CONTAINER_ID:/pulsar/test-conf
|
|
35
|
-
docker cp $SRC_DIR/build-support/pulsar-test-container-start.sh $CONTAINER_ID:pulsar-test-container-start.sh
|
|
36
|
-
|
|
37
|
-
docker exec -i $CONTAINER_ID /pulsar-test-container-start.sh
|
|
38
|
-
|
|
39
|
-
echo "-- Ready to start tests"
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
set -e
|
|
22
|
-
|
|
23
|
-
SRC_DIR=$(git rev-parse --show-toplevel)
|
|
24
|
-
cd $SRC_DIR
|
|
25
|
-
|
|
26
|
-
CONTAINER_ID_PATH=".tests-container-id.txt"
|
|
27
|
-
|
|
28
|
-
if [ -f ${CONTAINER_ID_PATH} ]; then
|
|
29
|
-
CONTAINER_ID=$(cat $CONTAINER_ID_PATH)
|
|
30
|
-
docker kill $CONTAINER_ID || true
|
|
31
|
-
rm .tests-container-id.txt
|
|
32
|
-
fi
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
set -e
|
|
22
|
-
|
|
23
|
-
FILES=$*
|
|
24
|
-
|
|
25
|
-
for FILE in $FILES
|
|
26
|
-
do
|
|
27
|
-
echo "Signing $FILE"
|
|
28
|
-
gpg --armor --output $FILE.asc --detach-sig $FILE
|
|
29
|
-
|
|
30
|
-
# SHA-512 signature
|
|
31
|
-
shasum -a 512 $FILE > $FILE.sha512
|
|
32
|
-
done
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
# or more contributor license agreements. See the NOTICE file
|
|
5
|
-
# distributed with this work for additional information
|
|
6
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
# to you under the Apache License, Version 2.0 (the
|
|
8
|
-
# "License"); you may not use this file except in compliance
|
|
9
|
-
# with the License. You may obtain a copy of the License at
|
|
10
|
-
#
|
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
#
|
|
13
|
-
# Unless required by applicable law or agreed to in writing,
|
|
14
|
-
# software distributed under the License is distributed on an
|
|
15
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
# KIND, either express or implied. See the License for the
|
|
17
|
-
# specific language governing permissions and limitations
|
|
18
|
-
# under the License.
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
set -e -x
|
|
22
|
-
|
|
23
|
-
if [ "$#" -ne 2 ]; then
|
|
24
|
-
echo "Usage: $0 \$DEST_PATH \$WORKFLOW_ID"
|
|
25
|
-
exit 1
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
DEST_PATH=$(readlink -f $1)
|
|
29
|
-
WORKFLOW_ID=$2
|
|
30
|
-
|
|
31
|
-
pushd $(dirname "$0")
|
|
32
|
-
PULSAR_NODE_PATH=$(git rev-parse --show-toplevel)
|
|
33
|
-
popd
|
|
34
|
-
|
|
35
|
-
mkdir -p $DEST_PATH
|
|
36
|
-
|
|
37
|
-
cd $PULSAR_NODE_PATH
|
|
38
|
-
|
|
39
|
-
build-support/download-release-artifacts.py $WORKFLOW_ID $DEST_PATH
|
|
40
|
-
build-support/generate-source-archive.sh $DEST_PATH
|
|
41
|
-
|
|
42
|
-
# Sign all files
|
|
43
|
-
cd $DEST_PATH
|
|
44
|
-
find . -type f | xargs $PULSAR_NODE_PATH/build-support/sign-files.sh
|
package/docs/release-process.md
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
or more contributor license agreements. See the NOTICE file
|
|
5
|
-
distributed with this work for additional information
|
|
6
|
-
regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
to you under the Apache License, Version 2.0 (the
|
|
8
|
-
"License"); you may not use this file except in compliance
|
|
9
|
-
with the License. You may obtain a copy of the License at
|
|
10
|
-
|
|
11
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
|
|
13
|
-
Unless required by applicable law or agreed to in writing,
|
|
14
|
-
software distributed under the License is distributed on an
|
|
15
|
-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
KIND, either express or implied. See the License for the
|
|
17
|
-
specific language governing permissions and limitations
|
|
18
|
-
under the License.
|
|
19
|
-
|
|
20
|
-
-->
|
|
21
|
-
This page contains instructions for Pulsar committers on how to perform a release.
|
|
22
|
-
|
|
23
|
-
## Making the release
|
|
24
|
-
|
|
25
|
-
The steps for releasing are as follows:
|
|
26
|
-
1. Check and Add TypeScript Types
|
|
27
|
-
2. Create the release branch
|
|
28
|
-
3. Update package version and tag
|
|
29
|
-
4. Sign and stage the artifacts
|
|
30
|
-
5. Move master branch to next version
|
|
31
|
-
6. Publish the release candidate to the npm
|
|
32
|
-
7. Run the vote
|
|
33
|
-
8. Promote the release
|
|
34
|
-
9. Add release notes
|
|
35
|
-
10. Announce the release
|
|
36
|
-
|
|
37
|
-
## Versioning
|
|
38
|
-
Bump up the version number as follows.
|
|
39
|
-
|
|
40
|
-
* Major version (e.g. 1.8.0 => 2.0.0)
|
|
41
|
-
* Changes that break backward compatibility
|
|
42
|
-
* Minor version (e.g. 1.8.0 => 1.9.0)
|
|
43
|
-
* Backward compatible new features
|
|
44
|
-
* Patch version (e.g. 1.8.0 => 1.8.1)
|
|
45
|
-
* Backward compatible bug fixes
|
|
46
|
-
* C++ Client upgrade (even though there are no new commits in the Nodejs client)
|
|
47
|
-
|
|
48
|
-
## Requirements
|
|
49
|
-
If you haven't already done it, [create and publish the GPG key](https://pulsar.apache.org/contribute/releasing/create-gpg-keys) to sign the release artifacts.
|
|
50
|
-
|
|
51
|
-
## Steps in detail
|
|
52
|
-
|
|
53
|
-
#### 1. Check and Add TypeScript Types
|
|
54
|
-
|
|
55
|
-
In order to use added features and options in TypeScript code, we need to add their type definitions.
|
|
56
|
-
|
|
57
|
-
Check if there are any Pull Requests with the `types-required` label or not.
|
|
58
|
-
If yes, add their type definitions (e.g. https://github.com/apache/pulsar-client-node/pull/157).
|
|
59
|
-
If no, we can then proceed to next step.
|
|
60
|
-
|
|
61
|
-
#### 2. Create the release branch
|
|
62
|
-
|
|
63
|
-
We are going to create a branch from `master` to `branch-1.X` where the tag will be generated
|
|
64
|
-
and where new fixes will be applied as part of the maintenance for the release.
|
|
65
|
-
|
|
66
|
-
The branch needs only to be created when creating minor releases, and not for patch releases.
|
|
67
|
-
|
|
68
|
-
Eg: When creating `v1.1.0` release, will be creating the branch `branch-1.1`,
|
|
69
|
-
but for `v1.1.1` we would keep using the old `branch-1.1`.
|
|
70
|
-
|
|
71
|
-
In these instructions, I'm referring to an fictitious release `1.X.0`.
|
|
72
|
-
Change the release version in the examples accordingly with the real version.
|
|
73
|
-
|
|
74
|
-
It is recommended to create a fresh clone of the repository to avoid any local files to interfere
|
|
75
|
-
in the process:
|
|
76
|
-
|
|
77
|
-
```sh
|
|
78
|
-
$ git clone git@github.com:apache/pulsar-client-node.git
|
|
79
|
-
$ cd pulsar-client-node
|
|
80
|
-
$ git checkout -b branch-1.X origin/master
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
#### 3. Update package version and tag
|
|
84
|
-
|
|
85
|
-
During the release process, we are going to initially create "candidate" tags:
|
|
86
|
-
```sh
|
|
87
|
-
# Bump to the release version (the suffix "-rc.0" is removed)
|
|
88
|
-
$ npm version patch --no-git-tag-version
|
|
89
|
-
$ git add .
|
|
90
|
-
$ git commit -m 'Release v1.x.0'
|
|
91
|
-
|
|
92
|
-
# Create a "candidate" tag
|
|
93
|
-
$ export GPG_TTY=$(tty)
|
|
94
|
-
$ git tag -u $USER@apache.org v1.X.0-rc.1 -m 'Release v1.X.0-rc.1'
|
|
95
|
-
|
|
96
|
-
# Push both the branch and the tag to GitHub repo
|
|
97
|
-
$ git push origin branch-1.X
|
|
98
|
-
$ git push origin v1.X.0-rc.1
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
#### 4. Sign and stage the artifacts
|
|
102
|
-
The src artifact need to be signed and uploaded to the dist SVN repository for staging. See [here](https://github.com/apache/pulsar/wiki/Create-GPG-keys-to-sign-release-artifacts) for how to setup gpg.
|
|
103
|
-
|
|
104
|
-
When the build is pushed to the Apache repo, a Github action job will run and build all the binary artifacts.
|
|
105
|
-
|
|
106
|
-
The build will be available at `https://github.com/apache/pulsar-client-node/actions`
|
|
107
|
-
|
|
108
|
-
Once the workflow is completed (ETA ~20 min), the artifacts will be available for download.
|
|
109
|
-
|
|
110
|
-
Record the id of the workflow as `WORKFLOW_ID`.
|
|
111
|
-
|
|
112
|
-
All the artifacts need to be signed and uploaded to the dist SVN repository for staging.
|
|
113
|
-
|
|
114
|
-
Before running the script, make sure that the `user@apache.org` code signing key is the default gpg signing key. One way to ensure this is to create/edit file `~/.gnupg/gpg.conf` and add a line
|
|
115
|
-
|
|
116
|
-
```sh
|
|
117
|
-
default-key <key fingerprint>
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
where` <key fingerprint>` should be replaced with the private key fingerprint for the `user@apache.org` key. The key fingerprint can be found in `gpg -K` output.
|
|
121
|
-
|
|
122
|
-
```sh
|
|
123
|
-
$ svn co https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-node pulsar-dist-dev
|
|
124
|
-
$ cd pulsar-dist-dev
|
|
125
|
-
|
|
126
|
-
# '-rc.1' needs to be incremented in case of multiple iterations in getting
|
|
127
|
-
# to the final release)
|
|
128
|
-
$ svn mkdir pulsar-client-node-1.X.0-rc.1
|
|
129
|
-
$ cd pulsar-client-node-1.X.0-rc.1
|
|
130
|
-
|
|
131
|
-
# Generate token from here: https://github.com/settings/tokens
|
|
132
|
-
$ export GITHUB_TOKEN=${Your github token}
|
|
133
|
-
$ $PULSAR_PATH/build-support/stage-release.sh . $WORKFLOW_ID
|
|
134
|
-
|
|
135
|
-
$ svn add *
|
|
136
|
-
$ svn ci -m 'Staging artifacts and signature for Pulsar Node.js client release 1.X.0-rc.1'
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
#### 5. Move master branch to next version
|
|
140
|
-
|
|
141
|
-
We need to move master version to next iteration `X + 1`.
|
|
142
|
-
|
|
143
|
-
```sh
|
|
144
|
-
$ git checkout master
|
|
145
|
-
$ npm version preminor --preid=rc
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Since this needs to be merged in `master`, we need to follow the regular process
|
|
149
|
-
and create a Pull Request on GitHub.
|
|
150
|
-
|
|
151
|
-
#### 6. Publish the release candidate to the npm
|
|
152
|
-
|
|
153
|
-
If you don't have permission to publish `pulsar-client` to the npm registry, ask other committers to grant that permission.
|
|
154
|
-
|
|
155
|
-
```sh
|
|
156
|
-
# Set the npm version for the release candidate
|
|
157
|
-
npm version 1.x.0-rc.1 --no-git-tag-version
|
|
158
|
-
|
|
159
|
-
# Create or verify a user account in the npm registry
|
|
160
|
-
$ npm adduser
|
|
161
|
-
|
|
162
|
-
Username: foobar
|
|
163
|
-
Password: ********
|
|
164
|
-
Email: (this IS public) foobar@apache.org
|
|
165
|
-
|
|
166
|
-
# Publish the rc version package to the npm registry
|
|
167
|
-
# We use the `rc` tag to distinguish the release candidate from the official release.
|
|
168
|
-
$ npm publish --tag rc
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
#### 7. Run the vote
|
|
172
|
-
|
|
173
|
-
Send an email on the Pulsar Dev mailing list:
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
To: dev@pulsar.apache.org
|
|
177
|
-
Subject: [VOTE] Pulsar Node.js Client Release 1.X.0 Candidate 1
|
|
178
|
-
|
|
179
|
-
Hi everyone,
|
|
180
|
-
|
|
181
|
-
This is the first release candidate for Apache Pulsar Node.js client, version 1.X.0.
|
|
182
|
-
|
|
183
|
-
It fixes the following issues:
|
|
184
|
-
https://github.com/apache/pulsar-client-node/milestone/1?closed=1
|
|
185
|
-
|
|
186
|
-
Please download the source files and review this release candidate:
|
|
187
|
-
- Download the source package, verify shasum and asc
|
|
188
|
-
- Follow the README.md to build and run the Pulsar Node.js client.
|
|
189
|
-
|
|
190
|
-
The release candidate package has been published to the npm registry:
|
|
191
|
-
https://www.npmjs.com/package/pulsar-client/v/1.X.0-rc.1
|
|
192
|
-
You can install it by `npm i pulsar-client@1.X.0-rc.1 --pulsar_binary_host_mirror=https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-node/` and verify the package.
|
|
193
|
-
|
|
194
|
-
The vote will be open for at least 72 hours. It is adopted by majority approval, with at least 3 PMC affirmative votes.
|
|
195
|
-
|
|
196
|
-
Source files:
|
|
197
|
-
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-node/pulsar-client-node-1.X.0-rc.1/
|
|
198
|
-
|
|
199
|
-
Pulsar's KEYS file containing PGP keys we use to sign the release:
|
|
200
|
-
https://downloads.apache.org/pulsar/KEYS
|
|
201
|
-
|
|
202
|
-
SHA-512 checksum:
|
|
203
|
-
5f6c7e1a096a3ae66eee71c552af89532ed86bf94da3f3d49836c080426ee5dcaabeda440a989d51772d2e67e2dca953eeee9ea83cfbc7c2a0847a0ec04b310f apache-pulsar-client-node-1.X.0.tar.gz
|
|
204
|
-
|
|
205
|
-
The tag to be voted upon:
|
|
206
|
-
v1.X.0-rc.1
|
|
207
|
-
https://github.com/apache/pulsar-client-node/releases/tag/v1.X.0-rc.1
|
|
208
|
-
|
|
209
|
-
Please review and vote on the release candidate #1 for the version 1.X.0, as follows:
|
|
210
|
-
[ ] +1, Approve the release
|
|
211
|
-
[ ] -1, Do not approve the release (please provide specific comments)
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
The vote should be open for at least 72 hours (3 days). Votes from Pulsar PMC members
|
|
215
|
-
will be considered binding, while anyone else is encouraged to verify the release and
|
|
216
|
-
vote as well.
|
|
217
|
-
|
|
218
|
-
If the release is approved here, we can then proceed to next step.
|
|
219
|
-
|
|
220
|
-
#### 8. Promote the release
|
|
221
|
-
|
|
222
|
-
Create the final git tag:
|
|
223
|
-
```sh
|
|
224
|
-
$ git checkout branch-1.X
|
|
225
|
-
$ export GPG_TTY=$(tty)
|
|
226
|
-
$ git tag -u $USER@apache.org v1.X.0 -m 'Release v1.X.0'
|
|
227
|
-
$ git push origin v1.X.0
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
Publish the release package:
|
|
231
|
-
```sh
|
|
232
|
-
# You can use `npm pack` and test the package before publishing.
|
|
233
|
-
# If there are no problems, then use `npm publish` to publish to the npm.
|
|
234
|
-
$ npm publish
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
Promote the artifacts on the release location (need PMC permissions):
|
|
238
|
-
```sh
|
|
239
|
-
$ svn mv -m 'Release Pulsar Node.js client 1.X.0' \
|
|
240
|
-
https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-node/pulsar-client-node-1.X.0-rc.1 \
|
|
241
|
-
https://dist.apache.org/repos/dist/release/pulsar/pulsar-client-node/pulsar-client-node-1.X.0
|
|
242
|
-
|
|
243
|
-
# Remove the old releases (if any)
|
|
244
|
-
# We only need the latest release there, older releases are available through the Apache archive
|
|
245
|
-
$ svn rm -m 'Remove the old release' \
|
|
246
|
-
https://dist.apache.org/repos/dist/release/pulsar/pulsar-client-node/pulsar-client-node-1.Y.0
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
#### 9. Add release notes
|
|
250
|
-
|
|
251
|
-
Create a PR to add release notes to the pulsar site. Here is the example: https://github.com/apache/pulsar-site/pull/360
|
|
252
|
-
If there are any new contributors for this release, please add a `New Contributors` section in the release note.
|
|
253
|
-
|
|
254
|
-
Once the PR has been approved, add release notes to the Github release page (https://github.com/apache/pulsar-client-node/releases)
|
|
255
|
-
|
|
256
|
-
#### 10. Add api docs
|
|
257
|
-
Create a PR to add api docs to the pulsar site. Here is the example: https://github.com/apache/pulsar-site/pull/784
|
|
258
|
-
|
|
259
|
-
```shell
|
|
260
|
-
cd pulsar-site/tools/pytools
|
|
261
|
-
poetry run bin/js-apidoc-generator.py 1.X.0
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
#### 11. Announce the release
|
|
265
|
-
|
|
266
|
-
Once the release artifact is available in the npm registry, we need to announce the release.
|
|
267
|
-
|
|
268
|
-
Send an email on these lines:
|
|
269
|
-
```
|
|
270
|
-
To: dev@pulsar.apache.org, users@pulsar.apache.org, announce@apache.org
|
|
271
|
-
Subject: [ANNOUNCE] Apache Pulsar Node.js client 1.X.0 released
|
|
272
|
-
|
|
273
|
-
The Apache Pulsar team is proud to announce Apache Pulsar Node.js client version 1.X.0.
|
|
274
|
-
|
|
275
|
-
Pulsar is a highly scalable, low latency messaging platform running on
|
|
276
|
-
commodity hardware. It provides simple pub-sub semantics over topics,
|
|
277
|
-
guaranteed at-least-once delivery of messages, automatic cursor management for
|
|
278
|
-
subscribers, and cross-datacenter replication.
|
|
279
|
-
|
|
280
|
-
For Pulsar Node.js client release details and downloads, visit:
|
|
281
|
-
https://www.npmjs.com/package/pulsar-client
|
|
282
|
-
|
|
283
|
-
Release Notes are at:
|
|
284
|
-
https://github.com/apache/pulsar-client-node/releases
|
|
285
|
-
|
|
286
|
-
We would like to thank the contributors that made the release possible.
|
|
287
|
-
|
|
288
|
-
Regards,
|
|
289
|
-
|
|
290
|
-
The Pulsar Team
|
|
291
|
-
```
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
-----BEGIN RSA PRIVATE KEY-----
|
|
2
|
-
MIIEowIBAAKCAQEAtKWwgqdnTYrOCv+j1MkTWfSH0wCsHZZca9wAW3qP4uuhlBvn
|
|
3
|
-
b10JcFf5ZjzP9BSXK+tHmI8uoN368vEv6yhURHM4yuXqzCxzuAwkQSo39r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