Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. fix(state): use the new increase_nofile_limit function from rlimit 0.7.0 #3539

Merged
merged 2 commits into from
Feb 21, 2022

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Feb 15, 2022

Motivation

rlimit 0.7.0 is a breaking change. It implements a new increase_nofile_limit function, which replaces a lot of code we'd written.

Makes code changes required by this dependency update:

Part of:

API reference

https://docs.rs/rlimit/latest/rlimit/fn.increase_nofile_limit.html

Solution

  • upgrade to rlimit 0.7.0
  • update types to match the breaking changes in rlimit
  • delete a manual implementation that was similar to increase_nofile_limit, but not as good on macOS and some BSDs

Review

@jvff can review this dependency upgrade PR.

Reviewer Checklist

  • New Code Makes Sense
  • Existing Tests Pass

@teor2345 teor2345 added A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement P-Low ❄️ I-panic Zebra panics with an internal error message I-usability Zebra is hard to understand or use labels Feb 15, 2022
@teor2345 teor2345 self-assigned this Feb 15, 2022
@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #3539 (9cf0546) into main (499ae89) will increase coverage by 1.84%.
The diff coverage is 74.93%.

@@            Coverage Diff             @@
##             main    #3539      +/-   ##
==========================================
+ Coverage   78.34%   80.18%   +1.84%     
==========================================
  Files         267      276       +9     
  Lines       31526    32373     +847     
==========================================
+ Hits        24698    25958    +1260     
+ Misses       6828     6415     -413     

…0.7.0

Also:
- upgrades to rlimit 0.7.0
- updates types to match the breaking changes in rlimit
- deletes a manual implementation that was similar to `increase_nofile_limit`,
  but not as good on macOS and some BSDs
@teor2345 teor2345 changed the title fix(state): use the new increase_nofile_limit function from rlimit 0.7.0 1. fix(state): use the new increase_nofile_limit function from rlimit 0.7.0 Feb 18, 2022
@teor2345 teor2345 requested review from jvff and removed request for oxarbitrage February 18, 2022 08:12
Copy link
Contributor

@jvff jvff left a comment

Choose a reason for hiding this comment

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

Looks good, I've just added a few optional suggestions.

@teor2345
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Feb 20, 2022

update

✅ Branch has been successfully updated

@teor2345

This comment was marked as resolved.

@teor2345
Copy link
Contributor Author

gustavovalverde I'm seeing some missing required jobs on this PR:

It seems to work now, thanks!

@mergify mergify bot merged commit 2ec0ac6 into main Feb 21, 2022
@mergify mergify bot deleted the rlimit-0.7.0 branch February 21, 2022 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement I-panic Zebra panics with an internal error message I-usability Zebra is hard to understand or use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants