Add --with-heartbeat flag for heartbeat logging during long-running tasks by ay901246 · Pull Request #714 · cloudfoundry/bosh-cli
marked this pull request as ready for review
selzoc previously approved these changes Mar 12, 2026
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
…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
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