deploy/k8s, control plane, relay: small robustness follow-ups from the slice 1 reviews

Open
#434 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bash, kubernetes, redis, typescript

Research direction

Start with the named sections in deploy/k8s/setup.sh, packages/control-plane/src/main.ts, handlers.ts, and packages/sandbox-relay/src/relay.ts. Read the existing control-plane tests and probe or relay test entry points before changing behavior. Done means each listed robustness follow-up is addressed and the reconnect backoff, readiness timeout, shutdown, teardown, and probe behavior are covered by tests.

Written by the indexing model from the issue text.

Description

enhancement

Robustness follow-ups from the task reviews of #427 (P6 on Kubernetes slice 1). None blocked the merge; each is a small, known edge.

deploy/k8s/setup.sh

  • wait_records: add --request-timeout=10s to the kubectl exec, use a wall-clock deadline (SECONDS), and stop hiding exec errors while polling.
  • image_entry: for repo:tag@sha256:…, strip :tag from newName in the digest branch.
  • The settings-hash JSON6902 add replaces the whole pod-template annotations map. That is fine today, because base has none, but it would silently drop future annotations. Use the …/annotations/moca.dev~1settings-hash path once a map exists.
  • The self-signed-TLS subshell's abort relies on ensure_tls never being called from a conditional context. Make that explicit, or restructure it.

Control plane (packages/control-plane/src/main.ts, handlers.ts)

  • Export the Redis reconnect strategy and unit-test the backoff, so it cannot regress to the default or to a strategy that gives up.
  • Bound index.get in /readyz with a timeout, so a Redis that is connected but wedged fails fast instead of at the probe timeout.
  • Call close() on SIGTERM.

Relay (packages/sandbox-relay/src/relay.ts)

  • teardown is registered for both 'end' and 'error'. If both fire, with a same-id reattach in between, the second call can cancel the new session's retry and delete it. This is pre-existing. Guard by session identity, or run it once.
  • Probes check only the attach listener (9443). Consider also checking the exec listener (9444).
Dominant language
TypeScript
Stars
5
Forks
12
Avg merge
9h 48m
Merged PRs (30d)
172

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rossoctl/moca

All issues in rossoctl/moca

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.