Skip to content

feat(worker): Add opt-in wait for child exit during recycling - #734

Merged
jamieQ merged 1 commit into
mainfrom
feat/worker-wait-for-child-exit
Nov 13, 2026
Merged

jamieQ merged 1 commit into
mainfrom
feat/worker-wait-for-child-exit

Conversation

@jamieQ

@jamieQ jamieQ commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Update taskbroker-client lib to version 0.20.35. This version contains two additions that should be helpful for launchpad (and really any services with long-running tasks):

  1. Support for an opt-in way to more strictly enforce a maximum number of concurrent child worker processes.
  2. Changes pod-lifecycle shutdown to give child workers a longer grace period to finish their tasks before being killed (now ~60s, was ~5s).

1. should mean fewer OOMs due to more concurrent worker process than we've provisioned for, and 2. should make deploys a bit slower (but configurable) in exchange for reduced termination of in-flight tasks. The max children stuff will need a config to be enabled before it takes effect, but the grace period changes will go into effect as this deploys.

🤖 AI context

Add LAUNCHPAD_WORKER_WAIT_FOR_CHILD_EXIT for both push and pull workers, backed by taskbroker-client 0.20.35. Setting it to "true" keeps exiting children counted toward concurrency until they exit, preventing recycling from temporarily increasing the number of task children and their combined memory demand. It defaults to false; enabling it trades overlapping replacement for a gap while the old child exits and its replacement starts.

Deploy the updated image first, then enable the variable through ops for the intended worker deployments. Keep current memory allocations initially and monitor memory, throughput, backlog, and oldest exiting child age. Disabling the variable and rolling workers restores overlapping recycling.

The dependency release also changes whole-worker shutdown to wait for running tasks while draining results, independently of this flag. The current 60-second pod termination grace period can still interrupt long tasks; adjusting that budget is a separate rollout follow-up.

Uses the recycling option from getsentry/taskbroker#855.

@sentry

sentry Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Size Analysis

1 component analyzed, 1 component processing

iOS Builds

Name Configuration Version Download Size Install Size
--
--
Release Unknown Processing... (-) Processing... (-)
HackerNews (iOS)
com.emergetools.hackernews
Release 3.8 (1) 6.5 MB (N/A) 9.7 MB (N/A)

Configure launchpad-test-ios status check rules

@sentry

sentry Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

📲 Install Builds

iOS

🔗 App Name App ID Version Configuration
HackerNews com.emergetools.hackernews 3.8 (1) Release

Android

🔗 App Name App ID Version Configuration
Hacker News com.emergetools.hackernews 1.0.2 (13) Release

⚙️ launchpad-test-android Build Distribution Settings

@jamieQ
jamieQ marked this pull request as ready for review November 13, 2026 11:17

@chromy chromy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@jamieQ
jamieQ merged commit b4099c5 into main Nov 13, 2026
27 checks passed
@jamieQ
jamieQ deleted the feat/worker-wait-for-child-exit branch November 13, 2026 11:59
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.

2 participants