Skip to content

[cherry-pick][2.58.0][docs] Style pass on the Ray Sandboxes networking section (#65627) - #65734

Merged
dstrodtman merged 2 commits into
releases/2.58.0from
cherry-pick-2.58.0-sandbox-networking-docs
Sep 2, 2026
Merged

dstrodtman merged 2 commits into
releases/2.58.0from
cherry-pick-2.58.0-sandbox-networking-docs

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Cherry-picks the Ray Sandboxes networking-section style pass onto releases/2.58.0.

Ray Sandboxing (gVisor) ships in 2.58.0 (#64964, #65570, and the initial docs #65503, all already on the release branch). This editorial pass on the networking and DNS section landed on master after the branch cut, so the versioned 2.58.0 docs are missing it. The change is prose-only: it tightens the network-mode table, splits the DNS guidance into its own subsection, and removes recommendation hedging. No behavior or API content changes.

Cherry-pick of #65627.

…g section (#65627)

## Description

Style-only follow-up on the "Networking and DNS" section added in
#65570. No technical claim changes, and the section's structure and
content are the author's; this is polish against the [Ray documentation
style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html).

I was asked for a docs review on #65570 but it merged before I finished,
so the feedback is landing here instead of as suggestions on a merged
PR.

### What changed

The one pattern worth naming, because it repeats: the new prose was
hard-wrapped at roughly 72 columns while the rest of the page uses one
source line per paragraph. The guide asks for [soft-wrapped
prose](https://docs.ray.io/en/master/ray-contribute/writing-style.html#soft-wrap-prose)
so diffs stay legible.

Beyond that:

* **Sentence splits** where an em dash, a semicolon, or a mid-sentence
colon was joining clauses. The guide asks us to [restructure rather than
punctuate](https://docs.ray.io/en/master/ray-contribute/writing-style.html#sentence-structure).
After this the whole page is free of Unicode dashes.
* **`### DNS in locked-down networks`** instead of a bold paragraph
lead-in. The guide reserves
[bold](https://docs.ray.io/en/master/ray-contribute/writing-style.html#bold-and-italics)
for UI elements, admonition lead-ins, and definition lists. As a real
heading it also picks up a TOC entry and a linkable anchor. A `note`
admonition would work too if you'd rather it read as an aside.
* **Dropped `— **recommended for internet access**`** from the `public`
row's first cell. That's bold for emphasis, and the prose above the
table already makes the recommendation.
* **Parallel structure in the `_oci_spec_transform_fn` list.** The
second bullet had lost the `**Term**: explanation` shape of the first
and grown to four sentences, so the migration guidance moves into prose
after the list. This also drops "no longer need this hook," which
orients a reader who knew the previous behavior rather than one arriving
fresh.
* **A complete lead-in** above the `network="public"` example, which was
a noun phrase with a colon on the end.
* **Direct advice and active voice**: "Prefer `public` for untrusted
code" to "Use `public`", and "Anything beyond that can be configured" to
"Configure anything beyond that."

### One question I couldn't answer myself

The `sandbox` row's "Network access" cell reads "gVisor netstack," which
says how the mode is implemented but not what the reader gets. Does
`network="sandbox"` provide egress, or is it isolated like `none`?
That's what someone scanning the table to pick a mode is asking, and
it's the one cell that doesn't answer it. I left the cell alone rather
than guess. Happy to add a few words here if you tell me which it is.

## Related issues

Follows #65570. Related to #64964.

## Additional information

`DOCKER_DEFAULT_CAPABILITIES` is in the sandbox package's `__all__`, so
naming it in the prose above the example is safe. `myst_heading_anchors
= 4`, so the new H3 and the existing
`#pass-custom-oci-configurations-to-gvisor` link both resolve.

Note that no pre-commit hook covers Markdown under `doc/source/`, and
Vale is scoped to the Ray Data docs and the example gallery, so nothing
lints this file automatically. Verified by hand: heading depth tops out
at H3, no stacked headings, and both in-page anchors match real
headings.

Signed-off-by: Douglas Strodtman <[email protected]>
(cherry picked from commit d483d12)
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested review from a team as code owners August 25, 2026 21:22

@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 refactors and improves the readability of the Ray Core Sandboxes documentation, specifically around host mounts, networking modes, and DNS configurations. The review feedback focuses on polishing the text further by removing non-standard trailing equal signs from parameter references and improving grammatical clarity in a few sentences.

Comment thread doc/source/ray-core/sandboxes.md Outdated
* **Namespace or mount details** that the first-class options don't cover. Internet access, DNS, and Linux capabilities no longer need this hook — use `network=`, `dns=`, and `capabilities=` (including `capabilities=[]` to run with none at all; see [Networking and DNS](#networking-and-dns)). The hook remains for advanced network or capability configurations beyond those options.
* **Namespace and mount details**: Configure namespace or mount behavior that the first-class options don't cover.

Internet access, DNS, and Linux capabilities each have a first-class option: `network=`, `dns=`, and `capabilities=`. Pass `capabilities=[]` to run with no capabilities at all. Reserve the hook for network or capability configurations those options don't reach. See [Networking and DNS](#networking-and-dns).

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 trailing equal signs like network=, dns=, and capabilities= to refer to parameters is non-standard. It is cleaner and more idiomatic to refer to them simply as network, dns, and capabilities.

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.

agree

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — dropped the trailing equal signs; network, dns, and capabilities now read as plain parameter names. Applied the same to the dns reference in the table and the DNS phrasing on line 267.

Comment thread doc/source/ray-core/sandboxes.md Outdated
| `host` | Full host network identity | Host's own file, mounted read-only (`dns=` overrides it) | Strictly more permissive than `public`: the sandbox can reach anything the node can reach, including internal networks and node-local services. Prefer `public` for untrusted code. |
| `sandbox` | gVisor netstack | untouched | Requires `rootless=False`; runsc doesn't support the sandbox netstack in rootless mode. |
| `public` | Host egress | Generated from `dns` (default `8.8.8.8`, `1.1.1.1`), mounted read-only | Egress works, but the sandbox inherits nothing from the host's resolver configuration. No internal search domains, resolver addresses, or `ndots` options leak in, and the sandbox config stays portable across clusters. |
| `host` | Full host network identity | Host's own file, mounted read-only (`dns=` overrides it) | Strictly more permissive than `public`. The sandbox can reach anything the node can reach, including internal networks and node-local services. Use `public` for untrusted code. |

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 phrasing (dns= overrides it) uses a trailing equal sign. It would be clearer and more standard to write (overridden by dns) or (the dns parameter overrides it).

Comment thread doc/source/ray-core/sandboxes.md Outdated
(see [Pass custom OCI configurations to gVisor](#pass-custom-oci-configurations-to-gvisor)).
### DNS in locked-down networks

Some VPCs block outbound port 53 to public resolvers, where the `public` defaults can't resolve. Pass your internal resolver instead with `network="public", dns=["10.0.0.2"]`. If that isn't an option, fall back to `network="host"`, which uses the host's `/etc/resolv.conf`, at the cost of full host network identity. Configure anything beyond that through the OCI spec. See [Pass custom OCI configurations to gVisor](#pass-custom-oci-configurations-to-gvisor).

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 phrase 'where the public defaults can't resolve' is grammatically awkward. Consider rephrasing it to 'preventing the default public DNS settings from resolving queries' or 'so the default public DNS settings cannot resolve queries' for better clarity.

@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Aug 25, 2026
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Aug 26, 2026

@ronny-anyscale ronny-anyscale 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.

pop

Comment thread doc/source/ray-core/sandboxes.md Outdated
(see [Pass custom OCI configurations to gVisor](#pass-custom-oci-configurations-to-gvisor)).
### DNS in locked-down networks

Some VPCs block outbound port 53 to public resolvers, where the `public` defaults can't resolve. Pass your internal resolver instead with `network="public", dns=["10.0.0.2"]`. If that isn't an option, fall back to `network="host"`, which uses the host's `/etc/resolv.conf`, at the cost of full host network identity. Configure anything beyond that through the OCI spec. See [Pass custom OCI configurations to gVisor](#pass-custom-oci-configurations-to-gvisor).

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.

I don't think vpc is used in this doc except here. I'd suggest to spell it out (sio) because it's done with 'virtual machines (VMs)', but then OCI is used multiple times without ever defining.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call. Spelled out virtual private clouds (VPCs) on first use to match the VMs treatment, and defined Open Container Initiative (OCI) at its first prose use too so the acronym isn't left dangling. Also reworded the sentence for grammar per the bot's note on this line.

Drop non-standard trailing equal signs from parameter references
(network, dns, capabilities), fix awkward DNS phrasing, and spell out
VPC and OCI on first use.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman merged commit 424545b into releases/2.58.0 Sep 2, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the cherry-pick-2.58.0-sandbox-networking-docs branch September 2, 2026 15:23
dstrodtman added a commit that referenced this pull request Sep 2, 2026
Applies the review feedback from the 2.58.0 cherry-pick (#65734) back to
master, so the two don't diverge. The original style pass (#65627)
landed on master before that feedback came in.

Prose-only, no behavior or API changes:

- Drop non-standard trailing equal signs from parameter references:
`network=`, `dns=`, and `capabilities=` become `network`, `dns`, and
`capabilities`. The real `capabilities=[]` code call is left as-is.
- Reword the awkward "where the `public` defaults can't resolve" into
"so the default `public` DNS settings can't resolve queries."
- Spell out virtual private clouds (VPCs) on first use, matching the
existing "virtual machines (VMs)" treatment, and define Open Container
Initiative (OCI) at its first prose use. OCI is defined in prose rather
than the heading to preserve the
`#pass-custom-oci-configurations-to-gvisor` anchor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
Applies the review feedback from the 2.58.0 cherry-pick (ray-project#65734) back to
master, so the two don't diverge. The original style pass (ray-project#65627)
landed on master before that feedback came in.

Prose-only, no behavior or API changes:

- Drop non-standard trailing equal signs from parameter references:
`network=`, `dns=`, and `capabilities=` become `network`, `dns`, and
`capabilities`. The real `capabilities=[]` code call is left as-is.
- Reword the awkward "where the `public` defaults can't resolve" into
"so the default `public` DNS settings can't resolve queries."
- Spell out virtual private clouds (VPCs) on first use, matching the
existing "virtual machines (VMs)" treatment, and define Open Container
Initiative (OCI) at its first prose use. OCI is defined in prose rather
than the heading to preserve the
`#pass-custom-oci-configurations-to-gvisor` anchor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
pawelbeza pushed a commit to pawelbeza/ray that referenced this pull request Oct 23, 2026
Applies the review feedback from the 2.58.0 cherry-pick (ray-project#65734) back to
master, so the two don't diverge. The original style pass (ray-project#65627)
landed on master before that feedback came in.

Prose-only, no behavior or API changes:

- Drop non-standard trailing equal signs from parameter references:
`network=`, `dns=`, and `capabilities=` become `network`, `dns`, and
`capabilities`. The real `capabilities=[]` code call is left as-is.
- Reword the awkward "where the `public` defaults can't resolve" into
"so the default `public` DNS settings can't resolve queries."
- Spell out virtual private clouds (VPCs) on first use, matching the
existing "virtual machines (VMs)" treatment, and define Open Container
Initiative (OCI) at its first prose use. OCI is defined in prose rather
than the heading to preserve the
`#pass-custom-oci-configurations-to-gvisor` anchor.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
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 docs An issue or change related to documentation go add ONLY when ready to merge, run all tests sandbox

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants