Skip to content

feat(langsmith): align self-hosted sandbox values with main [v16-stable] - #894

Merged
Mukil Loganathan (langchain-infra) merged 2 commits into
v16-stablefrom
feat/self-hosted-sandboxes-v16
Jul 31, 2026
Merged

Mukil Loganathan (langchain-infra) merged 2 commits into
v16-stablefrom
feat/self-hosted-sandboxes-v16

Conversation

@langchain-infra

Copy link
Copy Markdown
Contributor

Backports the review cleanup from #784 to v16-stable, so the sandbox surface matches main and later sandbox changes cherry-pick without hand-translation.

v16-stable already carries sandbox support from #889, but in its pre-review shape. This reconciles the two.

⚠️ Breaking values changes

Sandbox values move out of config: to a top-level sandboxes: block, matching fleet:

Before (rc.24) After
config.sandboxes.* sandboxes.*
config.sandboxes.limits sandboxes.quotas
…limits.maxEphemeralStorageGb …quotas.maxEphemeralStorageGib
config.sandboxes.clusterName removed (unused)
…xServiceAuthJwtSecret / …Previous removed — service auth reuses config.apiKeySalt
…sandboxHost.allowPrivateIPCallbacks removed — always on for self-hosted
…sandboxHost.containerPort removed — fixed at 19190 (hostPort)

Helm ignores unknown keys, so a stale config.sandboxes block would silently disable sandboxes on upgrade. validate.yaml therefore fails on the legacy path and names the new one, with tests covering it.

Also fixed

images.juicefsMountImage.tag was empty, so it fell back to Chart.AppVersion and rendered docker.io/juicedata/mount:0.16.28rc1 — an image that does not exist. Now pinned to ce-v1.3.0, as on main. This is a live bug in the published 0.16.0-rc.24.

Brought over from #784

  • sandbox-host PDB and ServiceAccount templates (v16 had neither)
  • priorityClassName on sandbox-host
  • LANGSMITH_PUBLIC_API_ENDPOINT, derived from config.hostname; GO_ENDPOINT and the sandbox internal endpoint share one helper so they cannot drift
  • LANGCHAIN_PLATFORM_ENDPOINT no longer set in the shared ConfigMap
  • Validation for required images, autoscaling bounds, required nodeSelector, and privileged / readOnlyRootFilesystem being set wrongly

Verification

  • 283 helm-unittest tests pass; helm lint clean
  • Rendered sandbox-host Deployment is byte-identical to main's apart from chart/appVersion labels
  • Sandbox env var sets on platform-backend and ingest-queue match main exactly
  • v16-only validations (SmithDB, Engine, auth, mTLS) and Engine commonEnv vars verified intact

Chart 0.16.0-rc.24 → 0.16.0-rc.25.

Backports the review cleanup from #784 so the sandbox surface matches main and future
sandbox changes cherry-pick without hand-translation.

Breaking: sandbox values move from config.sandboxes to a top-level sandboxes: block,
limits becomes quotas, and maxEphemeralStorageGb becomes maxEphemeralStorageGib.
clusterName, xServiceAuthJwtSecret, xServiceAuthJwtSecretPrevious,
sandboxHost.allowPrivateIPCallbacks and sandboxHost.containerPort are gone; service auth
now reuses config.apiKeySalt and private-IP callbacks are always on for self-hosted.
validate.yaml fails on the legacy path rather than ignoring it, since Helm would
otherwise drop the old keys silently and disable sandboxes on upgrade.

Also pins images.juicefsMountImage.tag to ce-v1.3.0. It was empty, so it fell back to
Chart.AppVersion and rendered docker.io/juicedata/mount:0.16.28rc1, which does not exist.

@corridor-security corridor-security 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.

The self-hosted sandbox Helm chart unconditionally enables private-IP callbacks (SSRF_ALLOW_PRIVATE_IPS_CALLBACKS=true), removing the previous opt-in sandboxHost.allowPrivateIPCallbacks flag; this is an intentional architectural decision for self-hosted deployments where the sandbox host must reach internal cluster services, but it exposes internal network access if sandbox users can influence callback URLs.

Comment thread charts/langsmith/templates/sandboxes/sandbox-host-deployment.yaml
# Conflicts:
#	charts/langsmith/Chart.yaml
#	charts/langsmith/README.md

@corridor-security corridor-security 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.

This PR unconditionally sets SSRF_ALLOW_PRIVATE_IPS_CALLBACKS=true in the self-hosted sandbox-host Deployment, which is an intentional architectural decision for self-hosted deployments where the LangSmith backend lives on private infrastructure, but still warrants a Helm value override and explicit documentation given the hostNetwork/privileged context.

Comment thread charts/langsmith/templates/sandboxes/sandbox-host-deployment.yaml
@langchain-infra
Mukil Loganathan (langchain-infra) merged commit 8e718aa into v16-stable Jul 31, 2026
6 checks passed
@langchain-infra
Mukil Loganathan (langchain-infra) deleted the feat/self-hosted-sandboxes-v16 branch July 31, 2026 06:04
Bagatur (baskaryan) added a commit that referenced this pull request Jul 31, 2026
…#897)

#894 replaced LANGCHAIN_PLATFORM_ENDPOINT with LANGSMITH_PUBLIC_API_ENDPOINT
in the shared config map, leaving an empty sandboxes.enabled block behind.
smith-go still reads the old name, so it fell back to LANGCHAIN_ENDPOINT
("/api/v1") and built a relative Engine run webhook callback. langgraph-api
rejects relative webhooks, so every non-shadow Engine run failed:

  trigger run: status 422: Loopback webhooks (relative URLs and localhost)
  are disabled by default.

Observed on self-hosted-ci: run creation returned 200 until 06:10Z today and
422 from 06:48Z, the first sync after #894.

Restore the variable inside the existing guard, from the helper that already
backs LANGSMITH_PUBLIC_API_ENDPOINT. Both render the same public API base, so
this reinstates the previously working configuration rather than setting the
variable somewhere it was never set. It also backs signed download links,
SCIM $refs, and MCP resource URLs.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants