Skip to content

[docs] Style pass on the Ray Sandboxes networking section - #65627

Merged
dstrodtman merged 1 commit into
masterfrom
doc-style-sandboxes-networking
Aug 20, 2026
Merged

[docs] Style pass on the Ray Sandboxes networking section#65627
dstrodtman merged 1 commit into
masterfrom
doc-style-sandboxes-networking

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

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.

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 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. 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 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.

@dstrodtman
dstrodtman requested review from a team as code owners August 20, 2026 20:59

@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 improves the readability and structure of the Ray Core Sandboxes documentation, specifically refining the explanations for OCI specification transform functions, network modes, and DNS configuration in locked-down networks. The feedback suggests a minor improvement to the network modes table to clarify that the sandbox mode has no egress by default.

| `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. |
| `sandbox` | gVisor netstack | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. |

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

To answer your question: yes, network="sandbox" runs gVisor's internal user-space network stack (Netstack). Since Ray Sandboxes do not configure external network interfaces for this mode by default, it has no egress/external connectivity (only loopback). It is isolated like none, but with a full network stack running inside the sandbox. We can clarify this in the table by updating the 'Network access' column to specify that there is no egress by default.

Suggested change
| `sandbox` | gVisor netstack | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. |
| `sandbox` | gVisor netstack (no egress by default) | untouched | Requires `rootless=False`. runsc doesn't support the sandbox netstack in rootless mode. |

@dstrodtman dstrodtman added go add ONLY when ready to merge, run all tests docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. labels Aug 20, 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.

ignorable nits otherwise, pow


* **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container.
* **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.

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.

Suggested change
* **Namespace and mount details**: Configure namespace or mount behavior that the first-class options don't cover.
* **Namespace and mount details:** Configure namespace or mount behavior that the first-class options don't cover.

@@ -193,7 +193,9 @@ For advanced workloads, you might need to configure low-level runtime options su
The `_oci_spec_transform_fn` callable receives the fully generated OCI specification dictionary. It can mutate the dictionary in place or return a modified one. Common use cases include the following:

* **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container.

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.

Suggested change
* **Host mounts**: Mount host directories, read-only datasets, or model weights into the sandbox container.
* **Host mounts:** Mount host directories, read-only datasets, or model weights into the sandbox container.

I have a feeling this list is longer than I see here and these suggestions are wrong for consistency, but here we are.

Follow-up polish on the "Networking and DNS" section added in #65570.
Content is unchanged; every edit is a style-guide fix:

- Soft-wrap the new prose, which was hard-wrapped at ~72 columns while
  the rest of the page uses one source line per paragraph.
- Split clauses joined by em dashes, semicolons, and a mid-sentence
  colon into sentences.
- Drop bold used for emphasis in a table cell, and promote the
  "DNS in locked-down networks" bold lead-in to an H3 so it gets a TOC
  entry and a linkable anchor.
- Restore parallel structure in the _oci_spec_transform_fn list, and
  move the multi-sentence migration guidance out of the bullet into
  prose after the list.
- Recast the noun-phrase lead-in above the network="public" example as
  a complete sentence.
- Replace hedged "Prefer public" with direct advice, and the passive
  "Anything beyond that can be configured" with an imperative.

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
@dstrodtman
dstrodtman force-pushed the doc-style-sandboxes-networking branch from 5041fd0 to a216a29 Compare August 20, 2026 21:52
@dstrodtman

Copy link
Copy Markdown
Contributor Author

The Read the Docs check on this PR is red for a builder-side reason, not for anything in the diff.

The build dies with a bare EOFError from multiprocessing/connection.py. doc/Makefile passes -j auto, so Sphinx forks one write worker per CPU, and when a worker dies the parent reports only that. Three things say it isn't this change:

  • The failure point moves between builds. 92% of the write phase on build 4343129, 58% on build 4343286. A bad document would fail in the same place each time.
  • The same signature hit master on build 4339216, and hit another PR that had passed an hour earlier on the same base.
  • This diff is prose in a single Markdown file, which can't kill a subprocess.

I rebased onto current master to retrigger, and the fresh build failed the same way at a different document, which is what confirmed the read.

Measuring the builder's CPU count, cgroup memory ceiling, peak memory, and OOM counters is up in #65631 so the real cause can be pinned down. As the comments in .readthedocs.yaml note, the RtD PR check isn't a required merge gate, so this PR isn't blocked on that landing.

@dstrodtman
dstrodtman merged commit d483d12 into master Aug 20, 2026
5 of 6 checks passed
@dstrodtman
dstrodtman deleted the doc-style-sandboxes-networking branch August 20, 2026 22:29
xyuzh added a commit to xyuzh/ray that referenced this pull request Aug 27, 2026
Match the style established in ray-project#65627 for the networking section:
soft-wrapped prose, em-dash and semicolon clauses split into separate
sentences, and bold list leads. Also document the new append flag on
PUT /files and the 409 unschedulable error code.

Signed-off-by: xyuzh <xinyzng@gmail.com>
xyuzh added a commit to xyuzh/ray that referenced this pull request Sep 1, 2026
Match the style established in ray-project#65627 for the networking section:
soft-wrapped prose, em-dash and semicolon clauses split into separate
sentences, and bold list leads. Also document the new append flag on
PUT /files and the 409 unschedulable error code.

Signed-off-by: xyuzh <xinyzng@gmail.com>
xyuzh added a commit to xyuzh/ray that referenced this pull request Sep 1, 2026
Match the style established in ray-project#65627 for the networking section:
soft-wrapped prose, em-dash and semicolon clauses split into separate
sentences, and bold list leads. Also document the new append flag on
PUT /files and the 409 unschedulable error code.

Signed-off-by: xyuzh <xinyzng@gmail.com>
xyuzh added a commit to xyuzh/ray that referenced this pull request Sep 1, 2026
Match the style established in ray-project#65627 for the networking section:
soft-wrapped prose, em-dash and semicolon clauses split into separate
sentences, and bold list leads. Also document the new append flag on
PUT /files and the 409 unschedulable error code.

Signed-off-by: xyuzh <xinyzng@gmail.com>
dstrodtman added a commit that referenced this pull request Sep 2, 2026
…g section (#65627) (#65734)

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.

---------

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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 <douglas@anyscale.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants