Skip to content

Conversation

@gianm
Copy link
Contributor

@gianm gianm commented Nov 21, 2025

Previously, "emitTaskCompletionLogsAndMetrics" would emit the metrics task/run/time, task/success/count, and task/failed/count only for tasks that complete due to an attached runner callback (from attachCallbacks). This patch causes metrics to be emitted whenever notifyStatus successfully marks a task as completed, which covers a wider variety of scenarios.

The prior behavior missed scenarios where the shutdown API is used on a task that the runner is aware of but has not yet been added to the queue. It could happen during Overlord startup, while the queue is initializing.

Previously, "emitTaskCompletionLogsAndMetrics" would emit the metrics
task/run/time, task/success/count, and task/failed/count only for tasks
that complete due to an attached runner callback (from attachCallbacks).
This patch causes metrics to be emitted whenever notifyStatus successfully
marks a task as completed.

The prior behavior missed scenarios where the shutdown API is used on a
task that the runner is aware of but has not yet been added to the queue.
It could happen during Overlord startup, while the queue is initializing.
Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the test failures seem genuine though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants