Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1705 +/- ##
==========================================
- Coverage 91.58% 91.56% -0.02%
==========================================
Files 96 97 +1
Lines 18976 19004 +28
==========================================
+ Hits 17379 17401 +22
- Misses 1597 1603 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Unix-only startup helper to raise the process RLIMIT_NOFILE soft limit (capped at 0x100000) to reduce “too many open files” failures in highly-parallel workloads, and wires it into the prek CLI startup path.
Changes:
- Introduces
resource_limitmodule withadjust_open_file_limit()usingrustixgetrlimit/setrlimit. - Invokes the adjustment during process startup on Unix.
- Adds
rustixas a direct dependency of theprekcrate (and updatesCargo.lock).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/prek/src/resource_limit.rs | New Unix helper for adjusting RLIMIT_NOFILE with a safety cap and structured errors. |
| crates/prek/src/main.rs | Calls the helper at startup on Unix. |
| crates/prek/Cargo.toml | Adds rustix dependency needed by the new helper. |
| Cargo.lock | Locks rustix as a dependency of the prek crate. |
📦 Cargo Bloat ComparisonBinary size change: +0.00% (23.9 MiB → 23.9 MiB) Expand for cargo-bloat outputHead Branch ResultsBase Branch Results |
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.
Steal from astral-sh/uv#17464
Closes #1696