feat(uv): monitor wheel build memory#1174
Merged
xangcastle merged 1 commit intoJun 24, 2026
Merged
Conversation
Add an explicit monitor_memory package override for source-built wheels. Sample the build process tree through Linux procfs and emit flushed high-water reports so failed or OOM-killed builds leave evidence for calibrating resource_set. Keep monitoring independent from scheduler reservations. Launch the PEP 517 frontend in the existing Bazel process group and leave cancellation to Bazel; the sampler observes descendants but never signals them. Only add the monitor dependency to opted-in generated build tools. Reject prebuilt-only packages and custom BUILD replacements that have no generated wheel action to instrument.
Contributor
Author
|
Extracted from #1140. That patch coupled memory diagnostics to resource |
jbedard
approved these changes
Jun 24, 2026
xangcastle
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large source-built wheels can exhaust memory before their action logs show
enough evidence to size a scheduler reservation.
Add an explicit
monitor_memorypackage override that samples approximateLinux procfs RSS for the PEP 517 frontend and its descendants. Emit the
first sample, 256 MiB high-water crossings, and a final peak. Preserve
earlier samples across procfs races and identify a direct SIGKILL as a
possible OOM.
Keep diagnostics independent from
resource_set. The monitor inherits theBazel process group and never installs signal handlers or kills child
processes, so Bazel retains cancellation ownership. Only opted-in generated
build tools carry the monitor dependency.
Apply monitoring only to generated sdist actions. Selecting a compatible
prebuilt wheel produces no report; prebuilt-only packages and complete
custom BUILD replacements reject the override.