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

refactor: client error handling #4064

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

dpc
Copy link
Contributor

@dpc dpc commented Jan 18, 2024

After thinking about #4051 and discussion inside it, it seems to me that is_retryable is just a terrible pattern, so in this change:

  • get rid of is_retryable
  • make all federation errors retryable
  • add function to report only errors that is somewhat important
  • go over callsites and do something (hopefully) better

@dpc dpc requested a review from a team as a code owner January 18, 2024 18:12
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 68 lines in your changes are missing coverage. Please review.

Comparison is base (1133976) 58.34% compared to head (7ad74ab) 58.31%.

Files Patch % Lines
fedimint-core/src/api.rs 0.00% 41 Missing ⚠️
modules/fedimint-ln-client/src/pay.rs 0.00% 7 Missing ⚠️
modules/fedimint-wallet-client/src/withdraw.rs 0.00% 6 Missing ⚠️
modules/fedimint-dummy-client/src/states.rs 0.00% 5 Missing ⚠️
modules/fedimint-ln-client/src/incoming.rs 0.00% 4 Missing ⚠️
fedimint-client/src/transaction/sm.rs 0.00% 2 Missing ⚠️
modules/fedimint-ln-client/src/receive.rs 0.00% 2 Missing ⚠️
modules/fedimint-mint-client/src/output.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4064      +/-   ##
==========================================
- Coverage   58.34%   58.31%   -0.04%     
==========================================
  Files         194      194              
  Lines       42618    42644      +26     
==========================================
+ Hits        24865    24867       +2     
- Misses      17753    17777      +24     

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

elsirion
elsirion previously approved these changes Jan 19, 2024
Copy link
Contributor

@elsirion elsirion left a comment

Choose a reason for hiding this comment

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

I think this is a good direction to go. We'll need to build tooling to either detect zombie state machines or always include timeout state transitions to not overload the executor, but that sounds doable.

I'll ACK to reduce latency, but please take a look at my one comment.

modules/fedimint-wallet-client/src/withdraw.rs Outdated Show resolved Hide resolved
elsirion
elsirion previously approved these changes Jan 23, 2024
After thinking about fedimint#4051 and discussion inside it, it seems
to me that `is_retryable` is just a terrible pattern, so in this change:

* get rid of `is_retryable`
* make all federation errors retryable
* add function to report only errors that is somewhat important
* go over callsites and do something (hopefully) better
@maan2003
Copy link
Member

rebased

@maan2003 maan2003 mentioned this pull request Jan 23, 2024
@justinmoon
Copy link
Contributor

I'm re-approving based on @elsirion's previous review. I didn't review closely but we just rebased since @elsirion's approval so I think his review and Manmeet's is sufficient to merge.

@dpc dpc added this pull request to the merge queue Jan 23, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 23, 2024
@maan2003 maan2003 added this pull request to the merge queue Jan 23, 2024
Merged via the queue into fedimint:master with commit 7f589d5 Jan 23, 2024
20 checks passed
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.

None yet

4 participants