Skip to content

Conversation

@TBonnin
Copy link
Collaborator

@TBonnin TBonnin commented Nov 19, 2025

Runner idling logic depends on keeping track of ongoing task executions.
We used to not keep track of actions, relying on the fact that actions are usually short running and runner idling time was 24h
We recently dropped the idling time to 30mins which made it possible for runners doing only actions to always idle after 30mins, requiring a cold start.

This commit modifies the tasks tracking logic on runner, tracking all pending tasks (including actions). It is gonna increase the memory consumption of actions heavy runners but will make the idling logic less brittle and timing dependent


Track all pending tasks in runner to fix premature idle

The PR updates the runner’s task-tracking logic so that every task (including short-lived actions) is stored in the RunnerMonitor’s map. Earlier, only sync jobs were tracked via syncJobId; as a result, a runner processing only actions could appear idle and be shut down after the new 30-minute idle threshold. The change switches the map key to taskId, updates the related track/untrack methods, and adjusts all call sites.

Key Changes

• Changed RunnerMonitor.tracked map key type from number (syncJobId) to string (taskId)
• Replaced methods untrackByTaskId() and untrack(nangoProps) with unified untrack(taskId)
• Updated call sites in abort.ts and server.ts to use new usage.untrack(taskId) API
• Added TODO comment in monitor.ts about Render-specific memory monitoring
• Removed dead code related to untrackByTaskId and simplified tracking logic

Affected Areas

packages/runner/lib/monitor.ts
packages/runner/lib/abort.ts
packages/runner/lib/server.ts


This summary was automatically generated by @propel-code-bot

Idling logic depends on keeping track of ongoing task execution
We used to not keep track of actions, relying on the fact that actions
are usually short running and runner idling time was 24h
We recently dropped the idling time to 30mins which made it possible for
runners doing only actions to always idle after 30mins, requiring a cold
start.
This commit modifies the tasks tracking logic on runner, tracking all
pending tasks (including actions). It is gonna increase the memory
consumption of actions heavy runner but will make the idling logic less
brittle and timing dependent
@TBonnin TBonnin requested review from a team and rossmcewan November 19, 2025 14:28
}
}

// TODO: revisit memory monitoring since runners are not running in Render anymore
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unrelated. I just bumped into this Render related code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants