Skip to content

build(deps): update bundled log4j, aiohttp, and idna versions - #64056

Merged
edoakes merged 15 commits into
ray-project:masterfrom
nh-atuan:issue-64050
Jul 30, 2026
Merged

build(deps): update bundled log4j, aiohttp, and idna versions#64056
edoakes merged 15 commits into
ray-project:masterfrom
nh-atuan:issue-64050

Conversation

@nh-atuan

Copy link
Copy Markdown
Contributor

Description

Updates bundled dependency versions in the Ray Python wheel to address scanner-visible vulnerable artifacts reported in installed site-packages/ray/... contents.

This PR updates:

  • log4j-api, log4j-core, and log4j-slf4j-impl from 2.25.3 to 2.25.4 for ray/jars/ray_dist.jar.
  • Runtime env agent vendored packages to pin aiohttp==3.14.0 and idna==3.15, so generated wheels include fixed *.dist-info artifacts.
  • Python requirement constraints for aiohttp>=3.14.0 and idna>=3.15.

It also adds a small CI test to guard the bundled dependency versions used by the wheel packaging path.

Related issues

Fixes #64050

Additional information

Validated locally with:

python -m pytest ci/raydepsets/tests/test_bundled_dependency_versions.py -q
bazel test //ci/raydepsets:test_bundled_dependency_versions

Also verified that installing the runtime env agent package set produces:

aiohttp-3.14.0.dist-info
idna-3.15.dist-info

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

Copy link
Copy Markdown
Contributor

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 upgrades several dependencies, including updating aiohttp to 3.14.0, idna to 3.15, and log4j to 2.25.4. It also introduces a new Bazel test to verify that these bundled dependency versions remain fixed. Feedback is provided to replace .resolve() with .absolute() on __file__ in the test to prevent escaping the Bazel runfiles directory, which can cause failures in sandboxed or remote execution environments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

from pathlib import Path


REPO_ROOT = Path(__file__).resolve().parents[3]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using .resolve() on __file__ in a Bazel test resolves symlinks, which escapes the Bazel runfiles directory and points to the absolute path of the source file on the host machine. This can break in strict sandboxing or Remote Build Execution (RBE) environments where the host source directory is not present or accessible on the worker.

Using .absolute() instead of .resolve() keeps the path within the runfiles directory structure, which is correctly populated by Bazel and works reliably across all execution environments.

Suggested change
REPO_ROOT = Path(__file__).resolve().parents[3]
REPO_ROOT = Path(__file__).absolute().parents[3]

Comment thread ci/raydepsets/tests/test_bundled_dependency_versions.py Outdated
Comment thread ci/raydepsets/tests/test_bundled_dependency_versions.py Outdated
Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jun 12, 2026

@elliot-barn elliot-barn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you do the following please:

  • move the test_bundled_dependency_versions.py -> ci/build/bundled_dependency_versions_test.py (rename as well please)
  • Add the py_test to ci/build/BUILD.bazel instead of ci/raydepsets/BUILD.bazel, keeping the data = ["//:python/setup.py",
    "//java:dependencies.bzl"] deps and team:ci/ci_unit tags.
  • The REPO_ROOT = Path(file).absolute().parents[3] needs to become parents[2] (file moves from ci/raydepsets/tests/ to
    ci/build/, one level shallower)

@nh-atuan

Copy link
Copy Markdown
Contributor Author

Thanks @elliot-barn, I addressed your requested changes.

  • Moved and renamed the test to ci/build/bundled_dependency_versions_test.py.
  • Moved the py_test target from ci/raydepsets/BUILD.bazel to ci/build/BUILD.bazel.
  • Kept the requested data deps and team:ci / ci_unit tags.
  • Updated REPO_ROOT from parents[3] to parents[2] for the new file location.

Verified locally with:

python -m pytest ci/build/bundled_dependency_versions_test.py -q
bazel test //ci/build:bundled_dependency_versions_test

Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
Comment thread ci/build/bundled_dependency_versions_test.py
@elliot-barn

Copy link
Copy Markdown
Collaborator

just a minor formatting issue is left and we should be good to run the full test suite and merge

Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
@nh-atuan

Copy link
Copy Markdown
Contributor Author

Thanks @elliot-barn. I addressed the formatting issue and pushed a follow-up commit. CI is running again.

nh-atuan added 2 commits June 17, 2026 20:42
Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
Signed-off-by: nh-atuan <anhtuan21347@gmail.com>

# Conflicts:
#	ci/env/install-dependencies.sh
@elliot-barn elliot-barn added the go add ONLY when ready to merge, run all tests label Jun 18, 2026
@elliot-barn
elliot-barn enabled auto-merge (squash) June 18, 2026 16:10
@github-actions
github-actions Bot disabled auto-merge June 18, 2026 16:10
@nh-atuan

Copy link
Copy Markdown
Contributor Author

Hi @elliot-barn,

All requested updates have been completed and all checks are passing. It looks like the PR is now only waiting for a code owner review.

Could you please help take a look or point me to the appropriate code owner if any additional review is needed?

Thanks again for all your help!

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jul 6, 2026
@nh-atuan

nh-atuan commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Friendly ping. Just keeping this PR active. All requested changes have been completed and all checks are passing.

The PR is currently waiting for a code owner review. Please let me know if there is anything else I should update.

Thank you!

@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Jul 7, 2026
@metasyn

metasyn commented Jul 16, 2026

Copy link
Copy Markdown

Hello, we're actively patching around this, it would be great to get merged into the next release.

@edoakes edoakes assigned edoakes and elliot-barn and unassigned edoakes Jul 23, 2026
@edoakes

edoakes commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

apologies, we'll ensure it gets picked up

@nh-atuan

Copy link
Copy Markdown
Contributor Author

Hi @edoakes, thanks for taking a look. I noticed the PR currently has merge conflicts in the generated dependency lock files. Should I resolve the conflicts and regenerate the lock files on my branch now, or would you prefer to handle this during the review/merge process?

@edoakes

edoakes commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Hi @edoakes, thanks for taking a look. I noticed the PR currently has merge conflicts in the generated dependency lock files. Should I resolve the conflicts and regenerate the lock files on my branch now, or would you prefer to handle this during the review/merge process?

It would be great if you could resolve them

Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
Copilot AI review requested due to automatic review settings July 26, 2026 13:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@edoakes

edoakes commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

@nh-atuan

Copy link
Copy Markdown
Contributor Author

Thanks for pointing this out, @edoakes. I’ll investigate the pip compile resolution errors and push a fix as soon as possible.

Signed-off-by: nh-atuan <anhtuan21347@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit a0f6b89. Configure here.

Comment thread python/setup.py
Signed-off-by: nh-atuan <anhtuan21347@gmail.com>
@edoakes
edoakes merged commit 1a39d47 into ray-project:master Jul 30, 2026
6 checks passed
@nh-atuan
nh-atuan deleted the issue-64050 branch July 30, 2026 08:28
@ManasaMalleshappa

Copy link
Copy Markdown

@edoakes Hi, we are waiting to adopt these changes to mitigate the vulnerabilities. Do you have an estimated release date for the version that includes this change? Thank you!

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

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update bundled vulnerable dependencies in Ray Python wheel: log4j-core, idna, aiohttp

6 participants