Skip to content

feat(supervisor): stage gateway configuration snapshot delivery - #3244

Open
pimlock wants to merge 14 commits into
mainfrom
1731-config-update-stage-1/pimlock
Open

pimlock wants to merge 14 commits into
mainfrom
1731-config-update-stage-1/pimlock

Conversation

@pimlock

@pimlock pimlock commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add Stage 1 of gateway-pushed configuration over ConnectSupervisor. The gateway sends complete sandbox configuration and provider-environment snapshots; supervisors receive them while polling remains authoritative.

Configuration delivery flow

flowchart TD
    A[Configuration mutation] --> B[Commit authoritative state]
    B --> C[Notify scheduler of affected scope and component]
    C --> D[Coalesce notifications and build latest full snapshot]
    D --> E[Push snapshot over ConnectSupervisor]
    E --> F[Supervisor receives but ignores snapshot in Stage 1]
    B --> G[Existing polling path]
    G --> H[Supervisor applies configuration]
Loading

Related Issue

Part of #1731. Replaces #2967. Stage 2 will apply snapshots and acknowledge revisions; Stage 3 will add durable completion semantics and remove polling.

Changes

  • Add bootstrap, snapshot, and acknowledgement contracts with gateway/supervisor protocol revision checks.
  • Share read-only snapshot builders between polling and push delivery.
  • Route committed updates through an async interface with ordered, coalesced delivery, bounded fanout, and payload limits. Remote-owner routing follows in feat(kubernetes): support HA gateway rebalancing #1868.
  • Initialize policy history atomically without overwriting existing apply results.
  • Update architecture, compatibility documentation, and generated bindings.

Testing

  • Pre-commit and full local CI
  • Go and TypeScript SDK CI
  • Docker conformance and all four live-policy-update E2E tests

Postgres-specific concurrency coverage requires OPENSHELL_TEST_POSTGRES_URL and was not run.

Checklist

  • Conventional Commits and DCO sign-off
  • Architecture docs updated

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@pimlock

This comment has been minimized.

pimlock

This comment was marked as outdated.

@pimlock pimlock added gator:in-review Gator is reviewing or awaiting PR review feedback gator:blocked Gator is blocked by process or repository gates and removed gator:in-review Gator is reviewing or awaiting PR review feedback labels Sep 10, 2026
@pimlock

This comment has been minimized.

@pimlock pimlock added the test:e2e Requires end-to-end coverage label Sep 10, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for e7729ec. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

pimlock

This comment was marked as outdated.

@pimlock
pimlock added this pull request to stack #3266 September 10, 2026 23:38
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
The startup repair that creates version-one policy history for legacy
sandboxes propagated validation failures, so a single stored policy that
no longer passes current validation rules prevented the gateway from
starting. Skip such sandboxes with a warning and a completion summary so
they keep the pre-repair behavior where only their own configuration reads
report the failure. Store errors remain fatal.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Fleet-wide configuration changes spawned one snapshot build per connected
sandbox and component with no concurrency limit, so a global setting or
provider change issued every store query and credential-driver call at
once. Gate builds behind a semaphore sized from the database pool and
start the build deadline only once a permit is held.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Sandboxes keep their supervisor binary until they are recreated, so a
gateway upgrade meets supervisors that predate the handshake and report
revision zero. Rejecting them severs every running sandbox with no
automatic recovery. Accept revision zero for one release, log a warning
per session, and count them in
openshell_supervisor_protocol_legacy_sessions_total. The supervisor
mirrors the allowance for gateways that predate the handshake.

Add a shared ConnectSupervisor test harness and handler-level tests for
legacy acceptance and unknown-revision rejection. Move the skill
troubleshooting paragraph out of the numbered deployment list so the
list renders.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock
pimlock force-pushed the 1731-config-update-stage-1/pimlock branch from e7729ec to 70773d3 Compare September 11, 2026 02:08
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>

@pimlock pimlock left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

gator-agent

PR Review Status

I reconciled the current head against the full Gator feedback ledger and reviewed the author-only delta since e7729ecc. The earlier fanout-bounding obligation remains resolved, and this follow-up found no blocking findings. Required checks, including the dispatched E2E suite, are green.

Action required: a maintainer must review and approve the PR.

Blocking findings:

  • No blocking findings remain

Carried findings:

  • None
Gator metadata
  • Validation: Project-valid Stage 1 of #1731; the current implementation remains within the reviewed gateway/supervisor configuration-delivery scope.
  • Docs: Architecture, gateway reference, and troubleshooting guidance are updated for the current behavior.
  • Checks: OpenShell Branch Checks, Helm Lint, Trivy Changes, and E2E are green for the current head.
  • E2E: test:e2e is applied; Branch E2E Checks run 34994317434 completed successfully.
  • Head SHA: 8bf93eadd823357a2adaed5621b63dca63e6dc91
  • Base SHA: c195e23267dc14becf817693252e0749a2021878
  • Merge base SHA: c195e23267dc14becf817693252e0749a2021878
  • Patch ID: eb11bcc278607383beef1a0a1417534b6fa6645e
  • Gator payload: 8
  • Review mode: follow_up
  • Previous reviewed SHA: e7729ecca7d22751fa759e737bce2b53e33aedb8
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:approval-needed

@pimlock pimlock added gator:approval-needed Gator completed review; maintainer approval needed and removed gator:blocked Gator is blocked by process or repository gates labels Sep 15, 2026
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@pimlock
pimlock force-pushed the 1731-config-update-stage-1/pimlock branch from 7f704dd to 43d7b28 Compare September 16, 2026 18:27
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gator:approval-needed Gator completed review; maintainer approval needed test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant