Skip to content

feat(sdk/go): add curated workspace service discovery snapshots and watches #4955

Done

Description

@TaylorMutch

Related: #4667 (workspace discovery API), #4310 (service exposure). Dependency: #4941.

User Story

I use OpenShell sandbox services with an independently deployed Kubernetes ingress controller. I need a supported Go SDK discovery client so that the example controller can consume the same service discovery API as the sandbox proxy.

Problem Statement

Generated RPC bindings alone do not offer a curated Go snapshot/watch interface with domain types and documented stream lifecycle behavior.

Impact / Why This Matters

Each Go discovery consumer otherwise duplicates conversion, validation, and cancellation handling, making external infrastructure integrations harder to review and maintain.

Proposed Design

Expose explicit-workspace snapshots and watches through client.ServiceRoutes(), with domain types independent of protobuf packages, deep-copying converters, and explicit receive/close/error semantics. Keep reconnect policy in the consumer. The example Kubernetes HTTPRoute controller remains a separate proof of concept.

Suggested UX

snapshot, err := client.ServiceRoutes().Snapshot(ctx, workspace)
watch, err := client.ServiceRoutes().Watch(ctx, workspace)
// Receive complete replacement snapshots with watch.Recv(); close with watch.Close().

Acceptance Criteria

  • Snapshot and watch are available through a narrow supported SDK interface.
  • Requests require an explicit workspace and propagate caller cancellation.
  • Domain types do not import generated protobuf packages.
  • Converters deep-copy and validate complete responses.
  • EOF, server errors, cancellation, and Close behavior are tested with bufconn.
  • SDK API documentation and the Go CI pipeline cover the new interface.

Alternatives Considered

Consumers can use generated RPCs, but duplicating lifecycle/conversion behavior weakens the supported SDK boundary. A gateway compute driver would couple infrastructure reconciliation to the control plane; middleware and providers do not provide a discovery client API.

Activity

  1. added 6 commits that reference this issue on Oct 27, 2026
    a12adf6
    e01a394
    6678680
    69ca4b5
    b83f71c
    c8225a7
  2. added
    state:accepted
    on Oct 28, 2026
  3. added 9 commits that reference this issue on Oct 28, 2026
    e847dfd
    f294b2e
    e61baf7
    b5cfc8e
    0edce63
    66cd349
    9e85e14
    03783bd
    1a3e3b8
  4. added
    area:platform
    topic:api
    topic:extensions
    topic:sdk:go
    on Nov 15, 2026
  5. TaylorMutch commented on Nov 30, 2026

    @TaylorMutch
    ContributorAuthor

    Completed and available in Go SDK v0.1.10.

    All acceptance criteria are satisfied:

    • client.ServiceRoutes().Snapshot(ctx, workspace) and Watch(ctx, workspace) provide a narrow supported interface.
    • Requests require an explicit workspace and propagate caller cancellation.
    • Domain types are independent of generated protobuf packages.
    • Converters validate and deep-copy complete responses.
    • Bufconn tests cover replacement snapshots, renewal/withdrawal, EOF, server errors, malformed responses, and Close/cancellation.
    • API documentation and the Go CI pipeline cover the interface.

    Finite/all-workspace SDK support remains separate follow-up work associated with #4964 and is outside this issue's explicit-workspace scope. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:platformstate:acceptedtopic:apitopic:extensionstopic:sdk:go

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions