enhancement(core): add helpers for spawning dynamic workers under component supervisors - #2326
Conversation
There was a problem hiding this comment.
More details
The new component-scoped spawner and supervisor shutdown budget are consistent with the existing supervision lifecycle: dynamic children inherit component ownership, ordered and concurrent drains remain bounded as documented, and nested supervisors retain control of their own shutdown. Static review found no concrete production regression in the changed paths.
🤖 Datadog Autotest · Commit 266a316 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 266a31624d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| /// A child task that has been described but not yet spawned. | ||
| /// | ||
| /// Created by [`ComponentSpawner::noninterruptible` or [`ComponentSpawner::interruptible`], and consumed by |
There was a problem hiding this comment.
Fix the malformed rustdoc link
This malformed intra-doc link is parsed as one link target that includes the or [ text, so API documentation generation for saluki-core fails once rustdoc checks links under the crate's denied warnings. Close the first link before or (or make these two separate links) so ChildBuilder's public docs build cleanly.
Useful? React with 👍 / 👎.
Binary Size Analysis (Agent Data Plane)Baseline: d9a74ed · Comparison: 048acaf · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
159cd09 to
048acaf
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |

Summary
This PR adds helpers to support easily spawning associated workers/child tasks under a component's dedicated supervisor in order to replace bespoke/one-off tasks spawned directly on the ambient runtime or global thread pool.
In prior PRs, we've moved topologies, and indeed the individual components within them, to be managed entirely via supervision trees. However, we stopped short of also managing the individual child tasks that some components will spawn. These are things like connection handlers, compute-heavy encoding/decoding, and so on.
This PR adds a new helper,
ComponentSpawner, designed specifically for components to spawn associated workers/child tasks directly on their dedicated supervisor such that they become implicitly associated with the component (good for attribution) and share the same lifecycle as the component: when components are shut down, so are their associated tasks.We explicitly are not porting over components to use this new helper in this PR, as there's a few different patterns of how components spawn tasks, and we'll tackle those in follow-up PRs as so more work will be required to support each pattern.
Change Type
How did you test this PR?
New and existing tests.
References
DADP-2