Skip to content

v0.19.0

Choose a tag to compare

@cw-python-release-helper cw-python-release-helper released this 21 Apr 16:52
· 62 commits to main since this release

v0.19.0 (2026-04-21)

This release is published under the Apache-2.0 License.

Features

  • Add ErrorInfo parser and carry structured fields on CWSandboxError (ecde028)

Parse google.rpc.Status details from gRPC trailing metadata per AIP-193 and surface ErrorInfo.reason / ErrorInfo.metadata / RetryInfo.retry_delay on CWSandboxError. The parser is defensive and never raises, so callers can still fall back to status-code-only handling when details are absent or malformed.

RetryInfo.retry_delay converts via protobuf's Duration.ToTimedelta() and returns None when the value would overflow Python's timedelta. Default-constructed empty RetryInfo{} entries are skipped so consumers can distinguish "retry advisory present" from "no hint".

  • Consume ErrorInfo in shared gRPC error translators (55f006a)

Wire the AIP-193 parser into the shared transport translator and the discovery domain translator so every CWSandbox exception that originates from a gRPC error carries the parsed reason / metadata / retry_delay alongside the existing message. Discovery NOT_FOUND paths now thread structured fields into RunnerNotFoundError / ProfileNotFoundError consistently with the sandbox translator.

Callers that have already parsed trailing metadata can pass the parsed result to the translator; otherwise it parses internally.

  • Map CWSANDBOX_* reasons to specific sandbox exceptions (5fc2151)

Translate CWSANDBOX_FILE_, CWSANDBOX_SANDBOX_NOT_FOUND, CWSANDBOX_COMMAND_TIMEOUT, and CWSANDBOX_UNAVAILABLE reasons to SandboxFileError / SandboxNotFoundError / SandboxTimeoutError / SandboxNotRunningError when the ErrorInfo carries the CoreWeave domain. The domain gate namespaces reason-based mapping so third-party gRPC intermediaries can't accidentally collide with CWSANDBOX* strings.

CWSANDBOX_RUNNER_NOT_FOUND is intentionally not mapped - it represents internal state inconsistency rather than a user-facing missing sandbox, so it falls through to the status-code path and keeps the reason attribute for introspection.

SandboxFileError.filepath falls back to ErrorInfo.metadata["filepath"] when the caller doesn't supply one, so file-op exceptions from the backend can still name the offending path.


Detailed Changes: v0.18.0...v0.19.0