Skip to content

feat(array): add 'spawn array logs --index N' (Refs #389) - #401

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/389-array-logs
Jul 19, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/389-array-logs

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Summary

First of two stacked PRs finishing the spawn array command group (#389). Adds spawn array logs <name> --index N — tail one job-array member's log by its (possibly sparse) job-array index.

  • --which command (default, /var/log/spawn-command.log) or --which spored (/var/log/spored.log)
  • --lines N (default 200), --region
  • Reuses the status.go SSH-key-or-SSM exec branch, so it works on keyless (lagotto/cohort-launched) members over SSM
  • A missing index errors with a pointer to spawn array status

Why

PR #395 shipped array status/collect/cancel and deliberately deferred logs and retry. This lands logs; retry (which needs a persisted launch record) follows in a stacked PR that will Closes #389.

Testing

  • New unit tests: TestMemberByIndex, TestArrayLogPath (pure, no AWS)
  • TestFlagConventions / TestTier0_CommandCoverageGate pass (no --json, array already classified)
  • docs-gen/array.md regenerated (drift gate clean)
  • No billable EC2 launched

Refs #389

Tail one job-array member's command or spored log, selected by its (possibly
sparse) job-array index. Reuses the status path's SSH-key-or-SSM exec branch so
it works on keyless (lagotto/cohort-launched) members over SSM; a missing index
errors with a pointer to 'spawn array status'.

Refs #389
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.66667% with 55 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/arraygroup.go 26.66% 55 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 26e3c97 into main Jul 19, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant