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

add keyed future missing methods #213

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

ermalkaleci
Copy link
Contributor

No description provided.

Copy link
Collaborator

@antifuchs antifuchs left a comment

Choose a reason for hiding this comment

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

Hi, thanks for writing these!

I admit I was slightly torn between wanting these methods and wanting some greater consistency between them and the check_n type methods' error reporting: Similar to the "making unhandled errors unrepresentable" section in http://sled.rs/errors.html, these methods return a nested result: One outer result for an error that pertains to "holding it wrong" (the InsufficientCapacity error), and the inner result for the "you got ratelimited" status.

But! since these methods are async (waiting until the rate-limited state resolves), the "you got ratelimited" status is not representable - and we only need one layer of Result!

So, this is great & I'm more than happy to get this PR into the codebase. I would however like there to be some tests that exercise the functions - the codecov tests will yell about the missing coverage too. Can you add those?

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9991cc3) 97.69% compared to head (870dfb0) 98.19%.
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   97.69%   98.19%   +0.50%     
==========================================
  Files          31       31              
  Lines        2208     2271      +63     
==========================================
+ Hits         2157     2230      +73     
+ Misses         51       41      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@antifuchs
Copy link
Collaborator

Love it! Thanks for the excellent contribution!

bors merge

@antifuchs
Copy link
Collaborator

oh no, lmao, seems that bors has at last been shut down. I'll set up a different merge queue & merge this.

@antifuchs
Copy link
Collaborator

Update: There is a new CI setup in place on the master branch now (I also removed the same line as you did in 870dfb0) - could you rebase/merge onto latest master to pick up that new CI setup? (:

@antifuchs antifuchs enabled auto-merge December 7, 2023 20:58
@antifuchs antifuchs added this pull request to the merge queue Dec 7, 2023
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c1a9fdb) 98.16% compared to head (c615d35) 98.19%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   98.16%   98.19%   +0.03%     
==========================================
  Files          31       31              
  Lines        2229     2271      +42     
==========================================
+ Hits         2188     2230      +42     
  Misses         41       41              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Merged via the queue into boinkor-net:master with commit 5cd2d5e Dec 7, 2023
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