Skip to content

Add s390x architecture support for CI, packaging, and binary validation#5391

Draft
Devarsh Patel (Devarsh010) wants to merge 1 commit intomasterfrom
dev_dpatel_s390x_v2.14.1
Draft

Add s390x architecture support for CI, packaging, and binary validation#5391
Devarsh Patel (Devarsh010) wants to merge 1 commit intomasterfrom
dev_dpatel_s390x_v2.14.1

Conversation

@Devarsh010
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 7, 2026 12:08
@confluent-cla-assistant
Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds s390x (IBM Z) support to the release artifact build and packaging pipeline, including CI builds via QEMU and NuGet/static package inclusion, plus binary type validation for the new architecture.

Changes:

  • Extend release artifact build tooling to support docker run --platform ... and add dependencies needed for s390x builds.
  • Add s390x mappings to NuGet and static bundle packaging so s390x binaries are included in produced packages.
  • Add CI jobs to build s390x manylinux artifacts under emulation and validate s390x ELF binaries.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packaging/tools/build-release-artifacts.sh Adds --platform support for cross-arch docker runs and updates CentOS build deps.
packaging/nuget/staticpackage.py Includes s390x static library + pkg-config mappings for the static bundle.
packaging/nuget/packaging.py Adds file-magic validation pattern for s390x ELF shared objects.
packaging/nuget/nugetpackage.py Includes s390x runtime .so mapping in the NuGet package.
.semaphore/semaphore.yml Adds a tagged-release CI block to build s390x artifacts using QEMU binfmt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +50
docker_platform=""
if [ "$1" = "--platform" ]; then
docker_platform="--platform=$2"
shift 2
fi
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --platform option is parsed without validating that a value is provided. If the script is invoked as ... --platform (missing the platform argument), $2 will be empty and shift 2 will fail under set -e, producing a confusing error. Add an explicit argument-count check (and a clear usage message) before reading $2/shifting.

Copilot uses AI. Check for mistakes.
prologue:
commands:
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
- docker run --privileged --rm tonistiigi/binfmt --install s390x
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binfmt helper container is referenced without a tag or digest (tonistiigi/binfmt). This makes the CI setup non-reproducible and increases supply-chain risk if the upstream image changes. Pin this image to a specific version tag (or, ideally, an immutable digest).

Suggested change
- docker run --privileged --rm tonistiigi/binfmt --install s390x
- docker run --privileged --rm tonistiigi/binfmt:qemu-v8.1.5 --install s390x

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do couple of checks as commented below

'./usr/local/lib/librdkafka.so.1',
'runtimes/linux-arm64/native/alpine-librdkafka.so'),

# Linux glibc centos8 s390x without GSSAPI (no external deps)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check with Emanuele Sabellico (@emasab) on whether we need similar one for with GSSAPI

('win', 'x86', '.lib'): re.compile('current ar archive'),
('linux', 'x64', '.so'): re.compile('ELF 64.* x86-64'),
('linux', 'arm64', '.so'): re.compile('ELF 64.* ARM aarch64'),
('linux', 's390x', '.so'): re.compile('ELF 64.* IBM S/390'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we run file librdkafka.so then it does print the below string
artifacts-s390x-qemu/usr/local/lib/librdkafka.so.1: ELF 64-bit MSB shared object, IBM S/390, version 1 (SYSV), dynamically linked, BuildID[sha1]=

The format looks correct but lets reconfirm once if we need this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants