Skip to content

feat(w-m): Should worker terminate implementation#8282

Merged
lotas merged 2 commits intomainfrom
feat/should-worker-terminate
Feb 18, 2026
Merged

feat(w-m): Should worker terminate implementation#8282
lotas merged 2 commits intomainfrom
feat/should-worker-terminate

Conversation

@lotas
Copy link
Contributor

@lotas lotas commented Feb 16, 2026

This uses worker scanner loop to collect information about all running workers and at the end of the pass run the logic to dermine which workers to keep, and which should go
This is stored in the worker.providerData, that api call is reading from.
Decision can be updated with each worker scanner loop, so based on when worker makes the call, results might be different

New worker_manager_workers_to_terminate metric captures this decision at the end of each scanner loop

Fixes #7147

@lotas lotas requested a review from a team as a code owner February 16, 2026 16:14
@lotas lotas requested review from matt-boris and petemoore and removed request for a team February 16, 2026 16:14
@lotas lotas force-pushed the feat/should-worker-terminate branch from 077c8c6 to 9180e4d Compare February 16, 2026 16:39
petemoore
petemoore previously approved these changes Feb 17, 2026
Copy link
Member

@petemoore petemoore left a comment

Choose a reason for hiding this comment

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

Looks fine to me, but maybe Boris should review it too (maybe Heitor / Dustin might also be interested)

Copy link
Contributor

@matt-boris matt-boris left a comment

Choose a reason for hiding this comment

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

Changes LGTM, thanks! Just noted that we should probably mention the API that we're adding this implementation to.

This uses worker scanner loop to collect information about all running
workers and at the end of the pass run the logic to dermine which
workers to keep, and which should go
This is stored in the worker.providerData, that api call is reading
from.
Decision can be updated with each worker scanner loop, so based on when
worker makes the call, results might be different
worker_manager_workers_to_terminate with additional reason label shows
how many workers were decided to be let go at the end of each scan
@lotas lotas force-pushed the feat/should-worker-terminate branch from b2a5e3a to 61fdbdb Compare February 18, 2026 14:24
Copy link
Contributor

@matt-boris matt-boris left a comment

Choose a reason for hiding this comment

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

Thank you! 🎉🚀

@lotas lotas merged commit 3708741 into main Feb 18, 2026
73 checks passed
@lotas lotas deleted the feat/should-worker-terminate branch February 18, 2026 14:54
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.

RFC191: worker should fetch launch config status to know if it should shutdown/restart

3 participants