Skip to content

Conversation

@andrew-anyscale
Copy link
Contributor

@andrew-anyscale andrew-anyscale commented Jan 8, 2026

The ray-cpp wheel contains only C++ headers, libraries, and executables
with no Python-specific code. Previously we built 4 identical wheels
(one per Python version: cp310, cp311, cp312, cp313), wasting CI time
and storage.

This change produces a single wheel tagged py3-none-manylinux2014_*
that works with any Python 3.x version.

Changes:

  • Add ray-cpp-core.wanda.yaml and Dockerfile for cpp core
  • Add ray-cpp-wheel.wanda.yaml for cpp wheel builds
  • Add ci/build/build-ray-cpp-wheel.sh for Python-agnostic wheel builds
  • Add RayCppBdistWheel class to setup.py that forces py3-none tags
    (necessary because BinaryDistribution.has_ext_modules() causes
    bdist_wheel to use interpreter-specific ABI tags by default)
  • Update ray-cpp-wheel.wanda.yaml to build single wheel per architecture
  • Update .buildkite/build.rayci.yml to remove Python version matrix
    for cpp wheel build/upload steps

Topic: ray-cpp-wheel
Relative: ray-wheel

Signed-off-by: andrew [email protected]

@andrew-anyscale
Copy link
Contributor Author

andrew-anyscale commented Jan 8, 2026

Reviews in this chain:
#59935 Migrate wheel builds to wanda (x86_64)
 └#59969 Add wanda cpp wheel builds (x86_64)
  └#59936 Add wanda ray image builds for Docker Hub
   └#59937 Add wanda anyscale image builds for release tests

@andrew-anyscale
Copy link
Contributor Author

andrew-anyscale commented Jan 8, 2026

# head base diff date summary
0 bf5b228f e93a821d diff Jan 8 8:27 AM 4 files changed, 160 insertions(+)
1 ed903b74 8a4bdf5b diff Jan 8 8:32 AM 1 file changed, 2 insertions(+), 2 deletions(-)
2 21500ccb a0b03e94 rebase Jan 8 12:01 PM 0 files changed
3 cf7cab60 32347fa5 diff Jan 8 12:51 PM 4 files changed, 129 insertions(+), 22 deletions(-)
4 8d1057a9 32347fa5 diff Jan 8 13:13 PM 1 file changed, 2 insertions(+)
5 d8901f73 9074421e diff Jan 8 13:33 PM 3 files changed, 19 insertions(+), 29 deletions(-)
6 9e438258 1b2c341f diff Jan 8 14:30 PM 1 file changed, 1 deletion(-)
7 6801f72f 05785cb4 diff Jan 9 8:45 AM 1 file changed, 12 insertions(+), 27 deletions(-)
8 9834ea38 37410f9a diff Jan 9 10:01 AM 1 file changed, 6 insertions(+), 3 deletions(-)
9 25e0d03c 37410f9a diff Jan 9 10:59 AM 4 files changed, 66 insertions(+), 28 deletions(-)
10 2a361721 37410f9a diff Jan 9 12:36 PM 4 files changed, 13 insertions(+), 22 deletions(-)
11 b81d4cb4 37410f9a diff Jan 9 13:32 PM 1 file changed, 54 insertions(+), 1 deletion(-)

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces Wanda-based builds for Ray C++ wheels on x86_64, adding new CI configurations and Dockerfiles. The changes are well-structured, but there are opportunities to improve maintainability and ensure correctness across different Python versions. My review includes suggestions to refactor the Buildkite configuration to reduce duplication and to address a potential issue with hardcoded Python dependency files in the Wanda configuration.

Comment on lines 78 to 126
- name: ray-cpp-core-build
label: "wanda: cpp core py{{matrix}} (x86_64)"
wanda: ci/docker/ray-cpp-core.wanda.yaml
matrix:
- "3.10"
- "3.11"
- "3.12"
env:
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"
tags:
- release_wheels
- oss

- name: ray-cpp-wheel-build
label: "wanda: cpp wheel py{{matrix}} (x86_64)"
wanda: ci/docker/ray-cpp-wheel.wanda.yaml
matrix:
- "3.10"
- "3.11"
- "3.12"
env:
PYTHON_VERSION: "{{matrix}}"
ARCH_SUFFIX: ""
HOSTTYPE: "x86_64"
MANYLINUX_VERSION: "260103.868e54c"
tags:
- release_wheels
- linux_wheels
- oss
depends_on:
- ray-core-build
- ray-cpp-core-build
- ray-java-build
- ray-dashboard-build

# Upload cpp wheels to S3
# Gating: only on releases/* OR (master AND nightly)
- label: ":s3: upload: cpp wheel py{{matrix}} (x86_64)"
key: linux_cpp_wheels_upload
instance_type: small
commands:
- ./ci/build/extract_wanda_wheels.sh ray-cpp-wheel-py{{matrix}} --upload
matrix:
- "3.10"
- "3.11"
- "3.12"
depends_on:
- ray-cpp-wheel-build
tags:
- release_wheels
- skip-on-premerge
- oss
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There's significant duplication in the newly added build steps. The matrix for Python versions and the env configuration are repeated. To improve maintainability and reduce redundancy, consider using YAML anchors and aliases.

For example, you could define:

x-python-versions: &python-versions
  - "3.10"
  - "3.11"
  - "3.12"

x-cpp-build-env: &cpp-build-env
  PYTHON_VERSION: "{{matrix}}"
  ARCH_SUFFIX: ""
  HOSTTYPE: "x86_64"
  MANYLINUX_VERSION: "260103.868e54c"

And then reference them in your build steps:

- name: ray-cpp-core-build
  ...
  matrix: *python-versions
  env: *cpp-build-env

- name: ray-cpp-wheel-build
  ...
  matrix: *python-versions
  env: *cpp-build-env

- label: ":s3: upload: cpp wheel py{{matrix}} (x86_64)"
  ...
  matrix: *python-versions

This would make the configuration cleaner and easier to update in the future.

- java/dependencies.bzl
- release/BUILD.bazel
- release/requirements.txt
- release/requirements_py310.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This configuration hardcodes release/requirements_py310.txt as a source file. However, the build matrix in .buildkite/build.rayci.yml includes Python 3.10, 3.11, and 3.12. Using Python 3.10-specific requirements for 3.11 and 3.12 builds might lead to dependency issues if there are version-specific packages.

If different Python versions require different dependencies, consider making this path dynamic based on the Python version. For example, if the build system supports it, you could use a variable like release/requirements_py$PYTHON_VERSION.txt and ensure corresponding files exist for each Python version.

@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch from bf5b228 to ed903b7 Compare January 8, 2026 16:32
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch 2 times, most recently from 8a4bdf5 to a0b03e9 Compare January 8, 2026 20:01
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch 2 times, most recently from 21500cc to cf7cab6 Compare January 8, 2026 20:52
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch from a0b03e9 to 32347fa Compare January 8, 2026 20:52
@andrew-anyscale andrew-anyscale added go add ONLY when ready to merge, run all tests and removed go add ONLY when ready to merge, run all tests labels Jan 8, 2026
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch 2 times, most recently from 8d1057a to d8901f7 Compare January 8, 2026 21:33
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch from 32347fa to 9074421 Compare January 8, 2026 21:33
@andrew-anyscale
Copy link
Contributor Author

Verifying cpp wheel found no diffs between the old and this method:

Remote URL : f6c2b5f

Local wheel: 029272617770.dkr.ecr.us-west-2.amazonaws.com/rayproject/citemp@sha256:922a6d572dc2508d00cf247487facb2cbe918d3c924bc00ff53fd99726af5eb3

https://github.com/ray-project/ray/pull/59971/files

@andrew-anyscale andrew-anyscale marked this pull request as ready for review January 8, 2026 22:30
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch from d8901f7 to 9e43825 Compare January 8, 2026 22:30
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch from 9074421 to 1b2c341 Compare January 8, 2026 22:30
@andrew-anyscale andrew-anyscale requested a review from a team as a code owner January 8, 2026 22:30
@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core devprod labels Jan 9, 2026
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch from 9e43825 to 6801f72 Compare January 9, 2026 16:45
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch from 1b2c341 to 05785cb Compare January 9, 2026 16:45
The ray-cpp wheel contains only C++ headers, libraries, and executables
with no Python-specific code. Previously we built 4 identical wheels
(one per Python version: cp310, cp311, cp312, cp313), wasting CI time
and storage.

This change produces a single wheel tagged py3-none-manylinux2014_*
that works with any Python 3.x version.

Changes:
- Add ray-cpp-core.wanda.yaml and Dockerfile for cpp core
- Add ray-cpp-wheel.wanda.yaml for cpp wheel builds
- Add ci/build/build-ray-cpp-wheel.sh for Python-agnostic wheel builds
- Add RayCppBdistWheel class to setup.py that forces py3-none tags
  (necessary because BinaryDistribution.has_ext_modules() causes
  bdist_wheel to use interpreter-specific ABI tags by default)
- Update ray-cpp-wheel.wanda.yaml to build single wheel per architecture
- Update .buildkite/build.rayci.yml to remove Python version matrix
  for cpp wheel build/upload steps

Topic: ray-cpp-wheel
Relative: ray-wheel

Signed-off-by: andrew <[email protected]>
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch from 6801f72 to 9834ea3 Compare January 9, 2026 18:01
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-wheel branch from 05785cb to 37410f9 Compare January 9, 2026 18:02
@andrew-anyscale andrew-anyscale force-pushed the andrew/revup/master/ray-cpp-wheel branch 3 times, most recently from 2a36172 to b81d4cb Compare January 9, 2026 21:33
@andrew-anyscale andrew-anyscale changed the title Add wanda cpp wheel builds (x86_64) wanda python-agnostic ray-cpp wheel (py3-none tag)(x86_64) Jan 9, 2026
@andrew-anyscale
Copy link
Contributor Author

Converting to draft. Apologies for the new Codeowner pings

@andrew-anyscale andrew-anyscale marked this pull request as draft January 9, 2026 21:35
@andrew-anyscale
Copy link
Contributor Author

Validation of commit f6c2b5f for this diff for this looked great!

== Wheels selected ==
Remote URL : https://s3-us-west-2.amazonaws.com/ray-wheels/master/f6c2b5f7c48f295e1f73ca73ba7541f86bbeb5ef/ray_cpp-3.0.0.dev0-cp312-cp312-manylinux2014_x86_64.whl
Wanda wheel: .whl/ray_cpp-3.0.0.dev0-py3-none-manylinux2014_x86_64.whl

== Downloading remote wheel ==
-> /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/remote.whl
== File list differences ==
-- Only in remote (downloaded) wheel:

-- Only in local (wanda) wheel:

== Directory diff overview (diff -ruN) ==
diff -ruN /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/remote/ray_cpp-3.0.0.dev0.dist-info/RECORD /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/local/ray_cpp-3.0.0.dev0.dist-info/RECORD
--- /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/remote/ray_cpp-3.0.0.dev0.dist-info/RECORD	2026-01-07 16:41:30
+++ /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/local/ray_cpp-3.0.0.dev0.dist-info/RECORD	2026-01-09 21:50:44
@@ -3462,7 +3462,7 @@
 ray/cpp/lib/libray_api.so,sha256=TuZ4Bh4pAC3G3oPQiMbmic6A4dYr-wOWLF4YTQ1Jn4E,41107848
 ray_cpp-3.0.0.dev0.dist-info/licenses/LICENSE.txt,sha256=mi3SSpAzq8GMV7hSirMCbh32tf3hWFEru9rP-QFV0Yg,11
 ray_cpp-3.0.0.dev0.dist-info/METADATA,sha256=OrC7H-a82cIKz2gct0xXn2RhNshILJEcRiXCQOqNHb8,7325
-ray_cpp-3.0.0.dev0.dist-info/WHEEL,sha256=6TsICjgOR7isz_jYr-ssV7RSRmh1_0Z7_b5ESlzfzVY,104
+ray_cpp-3.0.0.dev0.dist-info/WHEEL,sha256=cX6tzU6mqudTikwsDGWhfNWl6mEeHLXf9Ous3BJbSTo,109
 ray_cpp-3.0.0.dev0.dist-info/entry_points.txt,sha256=HzQIZGspUzWojBmR9Xvb28m4bPhi-yJjV1U1pdlRkyY,111
 ray_cpp-3.0.0.dev0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
 ray_cpp-3.0.0.dev0.dist-info/RECORD,,
diff -ruN /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/remote/ray_cpp-3.0.0.dev0.dist-info/WHEEL /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/local/ray_cpp-3.0.0.dev0.dist-info/WHEEL
--- /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/remote/ray_cpp-3.0.0.dev0.dist-info/WHEEL	2026-01-07 16:41:28
+++ /var/folders/dg/jkv044t9525bdy3bq2ksxwjh0000gp/T/tmp.GSaBi1NWHS/local/ray_cpp-3.0.0.dev0.dist-info/WHEEL	2026-01-09 21:50:42
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
 Generator: setuptools (80.9.0)
 Root-Is-Purelib: false
-Tag: cp312-cp312-linux_x86_64
+Tag: py3-none-manylinux2014_x86_64
 

== Per-file diffs (unified; binaries reported as binary diffs) ==

---- ray_cpp-3.0.0.dev0.dist-info/RECORD ----
sha256(remote): e61118e985e82ecdb4faa58f27a1931faa0fb7500b4bafc7a34d0c7398fd2bc8
sha256(local):  b9d6f85183ae7c96f704db3a8a3c9a78c3ea6dec88dc76da706bc8d9b32012bb
--- remote:ray_cpp-3.0.0.dev0.dist-info/RECORD
+++ local:ray_cpp-3.0.0.dev0.dist-info/RECORD
@@ -3462,7 +3462,7 @@
 ray/cpp/lib/libray_api.so,sha256=TuZ4Bh4pAC3G3oPQiMbmic6A4dYr-wOWLF4YTQ1Jn4E,41107848
 ray_cpp-3.0.0.dev0.dist-info/licenses/LICENSE.txt,sha256=mi3SSpAzq8GMV7hSirMCbh32tf3hWFEru9rP-QFV0Yg,11
 ray_cpp-3.0.0.dev0.dist-info/METADATA,sha256=OrC7H-a82cIKz2gct0xXn2RhNshILJEcRiXCQOqNHb8,7325
-ray_cpp-3.0.0.dev0.dist-info/WHEEL,sha256=6TsICjgOR7isz_jYr-ssV7RSRmh1_0Z7_b5ESlzfzVY,104
+ray_cpp-3.0.0.dev0.dist-info/WHEEL,sha256=cX6tzU6mqudTikwsDGWhfNWl6mEeHLXf9Ous3BJbSTo,109
 ray_cpp-3.0.0.dev0.dist-info/entry_points.txt,sha256=HzQIZGspUzWojBmR9Xvb28m4bPhi-yJjV1U1pdlRkyY,111
 ray_cpp-3.0.0.dev0.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
 ray_cpp-3.0.0.dev0.dist-info/RECORD,,

---- ray_cpp-3.0.0.dev0.dist-info/WHEEL ----
sha256(remote): e93b080a380e47b8accff8d8afeb2c57b452466875ff467bfdbe444a5cdfcd56
sha256(local):  717eadcd4ea6aae7538a4c2c0c65a17cd5a5ea611e1cb5dff4ebacdc125b493a
--- remote:ray_cpp-3.0.0.dev0.dist-info/WHEEL
+++ local:ray_cpp-3.0.0.dev0.dist-info/WHEEL
@@ -1,5 +1,5 @@
 Wheel-Version: 1.0
 Generator: setuptools (80.9.0)
 Root-Is-Purelib: false
-Tag: cp312-cp312-linux_x86_64
+Tag: py3-none-manylinux2014_x86_64
 

== Binary analysis for .so files ==
---- ray/cpp/lib/libray_api.so: identical ----

== RESULT: Wheels differ ==
== Finished (exit 1): 2026-01-09T22:27:12Z ==
== Log: wheel_diff_20260109T222658Z.log ==

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

Labels

core Issues that should be addressed in Ray Core devprod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants