This is an automated email from the ASF dual-hosted git repository.
baodi pushed a commit to branch branch-1.17
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.git
The following commit(s) were added to refs/heads/branch-1.17 by this push:
new b052ba7 [fix][release] Skip docker build record artifacts when
staging release
b052ba7 is described below
commit b052ba74de92f9911a91ba3743d3c50272c04b19
Author: Baodi Shi <[email protected]>
AuthorDate: Tue Mar 31 17:28:09 2026 +0800
[fix][release] Skip docker build record artifacts when staging release
Recent release workflow runs include auxiliary *.dockerbuild artifacts
uploaded by docker/build-push-action. Our staging script downloaded every
artifact from the workflow run and tried to unzip them as release packages,
which caused stage-release.sh to fail with BadZipFile before the actual napi
tarballs were processed.\n\nSkip *.dockerbuild artifacts in
download-release-artifacts.py and keep the error message explicit for
unexpected non-zip artifacts so release managers can stage 1. [...]
---
build-support/download-release-artifacts.py | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/build-support/download-release-artifacts.py
b/build-support/download-release-artifacts.py
index 0fcbcbb..b3f62a5 100755
--- a/build-support/download-release-artifacts.py
+++ b/build-support/download-release-artifacts.py
@@ -53,6 +53,13 @@ for artifact in data['artifacts']:
name = artifact['name']
url = artifact['archive_download_url']
+ # docker/build-push-action uploads build records as auxiliary artifacts.
+ # They are not release packages and break the staging flow if we try to
+ # unpack them alongside the platform tarballs.
+ if name.endswith('.dockerbuild'):
+ print(f'Skipping auxiliary artifact {name}')
+ continue
+
print(f'Downloading {name} from {url}')
artifact_response = requests.get(url, headers=headers, stream=True)
artifact_response.raise_for_status()
@@ -65,8 +72,15 @@ for artifact in data['artifacts']:
try:
dest_dir = os.path.join(dest_path, name)
Path(dest_dir).mkdir(parents=True, exist_ok=True)
- with zipfile.ZipFile(tmp_zip_path, 'r') as z:
- z.extractall(dest_dir)
+ try:
+ with zipfile.ZipFile(tmp_zip_path, 'r') as z:
+ z.extractall(dest_dir)
+ except zipfile.BadZipFile as exc:
+ raise RuntimeError(
+ f'Artifact {name} is not a ZIP archive. '
+ 'This usually means the workflow uploaded a non-release '
+ 'auxiliary artifact that should be filtered out.'
+ ) from exc
finally:
os.unlink(tmp_zip_path)
@@ -74,4 +88,4 @@ for root, dirs, files in os.walk(dest_path, topdown=False):
for name in files:
shutil.move(os.path.join(root, name), dest_path)
if not os.listdir(root):
- os.rmdir(root)
\ No newline at end of file
+ os.rmdir(root)