You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --with-heartbeat flag for heartbeat logging during long-running errands
Errands produce no CLI output while the Agent executes the script.
This silence causes CI/CD systems to kill the process due to inactivity
timeouts and leaves operators unsure whether the task is still running.
Add an opt-in --with-heartbeat flag to `bosh run-errand` that prints
periodic heartbeat status lines while a task is processing or queued.
bosh run-errand smoke_tests --with-heartbeat
bosh run-errand smoke_tests --with-heartbeat=10
Output:
Task 185528 | 16:16:23 | Task state: processing (5s elapsed)
No Director changes required — uses existing task API fields (state,
started_at). TaskHeartbeat is part of the TaskReporter interface with
a no-op default on NoopTaskReporter; withHeartbeatInterval gates
whether output is actually emitted. Throttling is handled in the
reporter via timestamp comparison.
Made-with: Cursor
Copy file name to clipboardExpand all lines: cmd/opts/opts.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -713,6 +713,8 @@ type RunErrandOpts struct {
713
713
KeepAlivebool`long:"keep-alive" description:"Use existing VM to run an errand and keep it after completion"`
714
714
WhenChangedbool`long:"when-changed" description:"Run errand only if errand configuration has changed or if the previous run was unsuccessful"`
715
715
716
+
WithHeartbeat*int`long:"with-heartbeat" description:"Print task state every N seconds while waiting. Use '=' to specify interval" optional:"true" optional-value:"30"`
0 commit comments