[CI/Build] Enable KV events in release wheels - #4039
Conversation
Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>
|
Once CI passed, this PR can be merged. |
|
The wheel jobs fail during CMake configuration with This patch keeps KV events enabled and makes two changes:
git apply <<'PATCH'
diff --git a/.github/workflows/_build-wheel.yaml b/.github/workflows/_build-wheel.yaml
index c1ca0533..b53f332f 100644
--- a/.github/workflows/_build-wheel.yaml
+++ b/.github/workflows/_build-wheel.yaml
@@ -221,10 +221,10 @@ jobs:
python -m venv "$smoke_venv"
"$smoke_venv/bin/python" -m pip install --no-deps \
mooncake-wheel/dist-py${{ steps.pytag.outputs.tag }}/*.whl
+ site_packages=$("$smoke_venv/bin/python" -c \
+ 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
if [ "${VARIANT_FLAG:-}" = "NON_CUDA_BUILD" ]; then
- site_packages=$("$smoke_venv/bin/python" -c \
- 'import sysconfig; print(sysconfig.get_paths()["purelib"])')
cuda_dependency_found=false
for package_path in "$site_packages"/mooncake*; do
[ -e "$package_path" ] || continue
@@ -269,6 +269,20 @@ jobs:
fi
fi
+ # KV events must link to the libzmq bundled by auditwheel, even when
+ # the builder has a system copy that could hide a packaging error.
+ zmq_library=$(ldd "$site_packages/mooncake/mooncake_master" | \
+ awk '$1 ~ /^libzmq[.-]/ && $2 == "=>" {print $3}')
+ case "$(readlink -f "$zmq_library")" in
+ "$site_packages"/*)
+ echo "Wheel uses bundled ZeroMQ: $zmq_library"
+ ;;
+ *)
+ echo "::error::Wheel master must resolve libzmq inside site-packages; got: $zmq_library"
+ exit 1
+ ;;
+ esac
+
"$smoke_venv/bin/mooncake_master" --version
- name: Upload Python wheel artifact
diff --git a/dependencies.sh b/dependencies.sh
index 1d63009b..e8a11deb 100755
--- a/dependencies.sh
+++ b/dependencies.sh
@@ -208,6 +208,7 @@ elif [ "$OS" = "centos" ] || [ "$OS" = "rhel" ] || [ "$OS" = "rocky" ] || [ "$OS
liburing-devel \
jemalloc-devel \
msgpack-devel \
+ zeromq-devel \
libzstd-devel \
pkgconf-pkg-config \
elfutils-libelf-devel \
PATCHValidation: the patch applies cleanly to the exact PR head and reproduces the checked local files. PR-scoped pre-commit, Shell/YAML syntax checks, all six build-profile configurations, and seven smoke-gate cases passed. The gate cases used mocked AI assistance: patch and local checks prepared with Codex. |
stmatengss
left a comment
There was a problem hiding this comment.
Two directly applicable suggestions keep KV events enabled, install the missing ZeroMQ development package before CMake, and verify that the repaired wheel loads its bundled libzmq. Apply both suggestions as a batch. This workflow-local dependency fix replaces the earlier conversation patch. Shell/YAML validation passed; the loader gate passed mocked checks on macOS. Linux wheel build/runtime validation remains pending. AI assistance: Codex.
| if [ -n "$SUDO" ] && command -v apt-get >/dev/null 2>&1; then | ||
| $SUDO apt-get update -y || true | ||
| fi | ||
| $SUDO bash -x dependencies.sh -y |
There was a problem hiding this comment.
Keep ENABLE_KV_EVENTS=ON and install the missing native ZeroMQ development package after dependencies.sh has configured the RPM repositories, before CMake runs. This is the workflow-local equivalent of adding zeromq-devel to the RPM dependency list; use these inline suggestions instead of the earlier conversation patch. Debian/Ubuntu already receive libzmq3-dev from dependencies.sh.
| $SUDO bash -x dependencies.sh -y | |
| # dependencies.sh configures EPEL/PowerTools before installing packages. | |
| if command -v yum >/dev/null 2>&1; then | |
| $SUDO yum install -y zeromq-devel | |
| fi |
| fi | ||
| fi | ||
|
|
||
| "$smoke_venv/bin/mooncake_master" --version |
There was a problem hiding this comment.
Check that the repaired wheel master resolves libzmq from its installed package directory. This rejects a system-library fallback that could hide a missing bundled dependency. auditwheel repair already handles bundling, and the existing --version check is preserved.
| site_packages=$("$smoke_venv/bin/python" -c \ | |
| 'import sysconfig; print(sysconfig.get_paths()["purelib"])') | |
| # KV events must link to the libzmq bundled by auditwheel, even when | |
| # the builder has a system copy that could hide a packaging error. | |
| zmq_library=$(ldd "$site_packages/mooncake/mooncake_master" | \ | |
| awk '$1 ~ /^libzmq[.-]/ && $2 == "=>" {print $3}') | |
| case "$(readlink -f "$zmq_library")" in | |
| "$site_packages"/*) | |
| echo "Wheel uses bundled ZeroMQ: $zmq_library" | |
| ;; | |
| *) | |
| echo "::error::Wheel master must resolve libzmq inside site-packages; got: $zmq_library" | |
| exit 1 | |
| ;; | |
| esac | |
| "$smoke_venv/bin/mooncake_master" --version |
Description
Module
mooncake-transfer-engine)mooncake-store)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Test commands:
# Example: bash scripts/run_ci_test.shTest results:
Checklist
./scripts/code_format.shAI Assistance Disclosure
Opus