Repository navigation
Conversation
davixcky
added a commit
that referenced
this pull request
Jul 21, 2026
## What Extends `signadot logs` with a **sandbox** log source, over the sandbox-scoped endpoint added in signadot/signadot#7229 (ENG-1110). Previously `logs` only served jobs. ``` signadot logs --sandbox <sb> --workload <fork> [-c <container>] [--since 10m | --since-time <rfc3339>] [-o json|yaml] signadot logs --sandbox <sb> --resource <name> [--step <step>] [...] ``` ## Flags - `--sandbox` — sandbox name (no short form; `-s` is `--stream`). - `--workload` — sandboxed workload (fork) name. Mutually exclusive with `--resource`. - `--resource` [`--step`] — sandbox resource; `--step` selects one plugin step (resource-only). - `-c/--container` — defaults to all containers. - `--since` (relative duration, converted client-side) / `--since-time` (RFC3339). - `-o json|yaml` — structured `[]ContainerLogs`; default prints raw lines, `[container]`-prefixed when there is more than one source. - `--job`/`--sandbox` mutually exclusive; `--stream` is job-only (both enforced). The job path is unchanged/backward-compatible. ## Dependency note Pins `go-sdk` to the pre-merge revision that carries `Sandboxes.GetSandboxLogs` (pushed branch `davido/eng-1111-sandbox-logs-client`). The go-sdk is auto-generated from the monorepo spec, so once #7229 merges and the SDK regenerates, re-pin to that official revision. (ENG-1112 is blocked-by ENG-1111.) ## Testing Built the binary and ran it against a local minikube control plane + operator with the endpoint deployed, over real fork and resource sandboxes: | # | Case | Result | |---|------|--------| | 1 | `--workload logger` | fork pod log lines | | 2 | `--since 6s` | only recent lines | | 3 | `--since-time <future>` | empty | | 4 | `-o yaml` / `-o json` | structured output | | 5 | `--resource prres` | all steps, `[main]`-prefixed | | 6 | `--resource prres --step step2` | only that step | | 7-9 | unknown workload / resource / step | `400` surfaced with the available list | | 10 | `--workload` + `--resource` | client-side error | | 11 | `--step` without `--resource` | client-side error | | 12 | neither `--workload` nor `--resource` | client-side error | | 13 | `--job` + `--sandbox` | mutually-exclusive error | | 14 | `--stream` + `--sandbox` | mutually-exclusive error | | 15 | `--job <missing>` (job path) | still routes (404 from API) | ## Examples (run against a local cluster) Point the CLI at your API (`SIGNADOT_API_URL` / `SIGNADOT_ORG` / `SIGNADOT_API_KEY`, or `~/.signadot/config.yaml`), then: ```console $ signadot logs --sandbox demo-fork --workload web web request handled #0 web request handled #1 web request handled #2 # only recent lines (relative duration, converted to sinceTime client-side) $ signadot logs --sandbox demo-fork --workload web --since 6s web request handled #358 web request handled #359 web request handled #360 # --since (relative duration) and --since-time (absolute RFC3339) select the # same window; they are mutually exclusive. $ signadot logs --sandbox demo-fork --workload web --since 10s web request handled #470 web request handled #471 web request handled #472 web request handled #473 web request handled #474 $ signadot logs --sandbox demo-fork --workload web --since-time 2026-07-14T22:58:59Z web request handled #470 web request handled #471 web request handled #472 web request handled #473 web request handled #474 $ signadot logs --sandbox demo-fork --workload web --since 10s --since-time 2026-07-14T22:58:59Z Error: --since and --since-time are mutually exclusive # structured output $ signadot logs --sandbox demo-fork --workload web -o json [ { "container": "busybox", "logs": [ { "message": "web request handled #0", "time": "2026-07-14T22:43:19.481195046Z" }, ... ] } ] # resource logs — all create steps (per-container prefix when >1 source) $ signadot logs --sandbox demo-res --resource db [main] provision: creating demo resource [signadot-execunit-output-manager] {"level":"INFO","msg":"storing output in ICS","output":"out","key":"out.provision"} [main] seed: loading fixtures [signadot-execunit-output-manager] {"level":"INFO","msg":"storing output in ICS","output":"out","key":"out.seed"} # a single resource step $ signadot logs --sandbox demo-res --resource db --step provision [main] provision: creating demo resource $ signadot logs --sandbox demo-res --resource db --step seed [main] seed: loading fixtures # a specific container $ signadot logs --sandbox demo-fork --workload web -c busybox # error / validation behavior $ signadot logs --sandbox demo-fork --workload nope Error: 400 Bad Request: workload "nope" not found in sandbox "demo-fork"; loggable workloads: web $ signadot logs --sandbox demo-res --resource db --step bogus Error: 400 Bad Request: step "bogus" not found in resource "db"; steps: provision, seed $ signadot logs --sandbox demo-fork --workload web --job x Error: if any flags in the group [job sandbox] are set none of the others can be; [job sandbox] were all set ``` The job path is unchanged: `signadot logs --job <job> [--stream stdout|stderr] [--tail N]`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
example use of sdk with list sandboxes.