Add --with-heartbeat flag for heartbeat logging during long-running tasks by ay901246 · Pull Request #714 · cloudfoundry/bosh-cli

@ay901246 marked this pull request as ready for review

March 11, 2026 16:53

KauzClay

abg

KauzClay

selzoc

selzoc

selzoc previously approved these changes Mar 12, 2026

@ay901246 ay901246 changed the title Add --poll-state flag for heartbeat logging during long-running tasks Add --with-heartbeat flag for heartbeat logging during long-running tasks

Mar 13, 2026

@ay901246

…rrands

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

Alphasite

Alphasite

Alphasite