Skip to content

chore(stack): make logs --follow tail through deploy completion #76

@omattsson

Description

@omattsson

Summary

stack logs --follow already exists (closed #51). Ensure it:

  • Tails through deploy completion (closes stream cleanly when server signals end, not on first idle).
  • Respects Ctrl-C without leaking goroutines.
  • Reuses the WS auth chain from 7.1 if it migrates from polling to WS.

Files to touch

  • cli/cmd/stack.gologsCmd follow path.

Tests (all three layers required)

  • Unit: cli/cmd/stack_test.go + (if migrated to WS) cli/pkg/client/websocket_test.go — terminal-status close path, Ctrl-C path, goleak.VerifyNone(t).
  • Integration: extend cli/test/integration/stack_integration_test.go — Cobra in-process logs --follow completes when stub signals end.
  • E2E: cli/test/e2e/cli_e2e_test.gostackctl stack logs <id> --follow against stub returns 0 within timeout.

Acceptance

  • Stream closes cleanly when deploy reaches terminal status.
  • goleak.VerifyNone(t) passes for the follow command test.
  • No behavioural regression for --follow=false path.

Tracks #59

Metadata

Metadata

Assignees

Labels

coreCore stack lifecycle commandsphase-7Phase 7: Real-time eventsrealtimeRealtime / websocket

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions