Skip to content

[DO NOT MERGE] Debug Proxy#63506

Draft
Kunchd wants to merge 1 commit into
ray-project:masterfrom
Kunchd:debug
Draft

[DO NOT MERGE] Debug Proxy#63506
Kunchd wants to merge 1 commit into
ray-project:masterfrom
Kunchd:debug

Conversation

@Kunchd
Copy link
Copy Markdown
Contributor

@Kunchd Kunchd commented May 19, 2026

Description

Related issues

Additional information

… URIs (ray-project#62813)"

This reverts commit c6e7001.

Signed-off-by: davik <davik@anyscale.com>
@Kunchd Kunchd added the go add ONLY when ready to merge, run all tests label May 19, 2026
Copy link
Copy Markdown
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 removes support for .tar.gz, .tgz, and .tar.bz2 archive formats within Ray's runtime_env, standardizing on .zip and .whl files. The changes include removing the tarfile dependency, simplifying packaging and URI parsing logic, and updating documentation and tests to reflect the new restrictions. Feedback focused on correcting documentation typos and incomplete command examples, as well as improving code readability in the delete_package function by avoiding variable shadowing and leveraging existing helper functions.


- ``working_dir`` (str): Specifies the working directory for the Ray workers. This must either be (1) a local existing directory with total size at most 500 MiB, (2) a local existing archive file (``.zip``, ``.tar.gz``, or ``.tgz``) with total uncompressed size at most 500 MiB (Note: ``excludes`` has no effect), or (3) a URI to a remotely-stored archive (``.zip``, ``.tar.gz``, or ``.tgz``) containing the working directory for your job (no file size limit is enforced by Ray). See :ref:`remote-uris` for details.
The specified directory is downloaded to each node on the cluster, and Ray workers start in their node's copy of this directory.
- ``working_dir`` (str): Specifies the working directory for the Ray workers. This must either be (1) an local existing directory with total size at most 500 MiB, (2) a local existing zipped file with total unzipped size at most 500 MiB (Note: ``excludes`` has no effect), or (3) a URI to a remotely-stored zip file containing the working directory for your job (no file size limit is enforced by Ray). See :ref:`remote-uris` for details.
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

Typo: "an local" should be "a local".

Suggested change
- ``working_dir`` (str): Specifies the working directory for the Ray workers. This must either be (1) an local existing directory with total size at most 500 MiB, (2) a local existing zipped file with total unzipped size at most 500 MiB (Note: ``excludes`` has no effect), or (3) a URI to a remotely-stored zip file containing the working directory for your job (no file size limit is enforced by Ray). See :ref:`remote-uris` for details.
- ``working_dir`` (str): Specifies the working directory for the Ray workers. This must either be (1) a local existing directory with total size at most 500 MiB, (2) a local existing zipped file with total unzipped size at most 500 MiB (Note: ``excludes`` has no effect), or (3) a URI to a remotely-stored zip file containing the working directory for your job (no file size limit is enforced by Ray). See :ref:`remote-uris` for details.

Check for hidden files and metadata directories in zipped dependencies.
You can inspect a zip file's contents by running the ``zipinfo -1 zip_file_name.zip`` command in the Terminal.
Some zipping methods can cause hidden files or metadata directories to appear in the zip file at the top level.
To avoid this, use the ``zip -r`` command directly on the directory you want to compress from its parent's directory. For example, if you have a directory structure such as: ``a/b`` and you want to compress ``b``, issue the ``zip -r b`` command from the directory ``a.``
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

The command zip -r b is incomplete; it requires an output filename (e.g., zip -r b.zip b). Additionally, there is a typo in the directory name reference where the period is included inside the backticks (a.).

Suggested change
To avoid this, use the ``zip -r`` command directly on the directory you want to compress from its parent's directory. For example, if you have a directory structure such as: ``a/b`` and you want to compress ``b``, issue the ``zip -r b`` command from the directory ``a.``
To avoid this, use the ``zip -r`` command directly on the directory you want to compress from its parent's directory. For example, if you have a directory structure such as: ``a/b`` and you want to compress ``b``, issue the ``zip -r b.zip b`` command from the directory ``a``.

Comment on lines +1162 to 1170
path = Path(_get_local_path(base_directory, pkg_uri))
with FileLock(str(path) + ".lock"):
path = path.with_suffix("")
if path.exists():
if path.is_dir() and not path.is_symlink():
shutil.rmtree(str(path))
else:
local_dir.unlink()
path.unlink()
deleted = True
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

The variable path is reassigned from the package file path to the directory path, which reduces code clarity. It is better to use distinct variable names and leverage the existing get_local_dir_from_uri helper function for consistency and maintainability.

Suggested change
path = Path(_get_local_path(base_directory, pkg_uri))
with FileLock(str(path) + ".lock"):
path = path.with_suffix("")
if path.exists():
if path.is_dir() and not path.is_symlink():
shutil.rmtree(str(path))
else:
local_dir.unlink()
path.unlink()
deleted = True
pkg_path = Path(_get_local_path(base_directory, pkg_uri))
with FileLock(str(pkg_path) + ".lock"):
local_dir = get_local_dir_from_uri(pkg_uri, base_directory)
if local_dir.exists():
if local_dir.is_dir() and not local_dir.is_symlink():
shutil.rmtree(str(local_dir))
else:
local_dir.unlink()
deleted = True

@Kunchd Kunchd changed the title [DO NOT MERGE] Revert "[runtime_env] Support .tar.gz archives for remote working_dir URIs (#62813) Debug Proxy May 19, 2026
@Kunchd Kunchd changed the title Debug Proxy [DO NOT MERGE] Debug Proxy May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant