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

Replaces fs-err for some snapshot errors #34837

Conversation

brooksprumo
Copy link
Contributor

@brooksprumo brooksprumo commented Jan 18, 2024

Problem

The fs-err create does not include source errors when displaying the error. The solana repo's convention is to include the source error in the message, so we end up losing the underlying cause of an IO error if fs_err is used.

Here's more info about the issue that I raised on the fs-err repo: andrewhickman/fs-err#51. Turns out their behavior is desired, and likely the most idiomatically correct Rust way. But we're not going to change the solana repo's error reporting anytime soon. Instead, we should replace the use of fs-err with regular std::fs.

Related: #34799

Summary of Changes

Replace fs-err for all the AddBankSnapshotError and GetSnapshotAccountsHardLinkDirError errors

@brooksprumo brooksprumo self-assigned this Jan 18, 2024
@brooksprumo brooksprumo changed the title Replaces fs-err for all AddBankSnapshotErrors Replaces fs-err for some snapshot errors Jan 18, 2024
@brooksprumo brooksprumo marked this pull request as ready for review January 18, 2024 20:03
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

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

Comparison is base (8f9d915) 81.8% compared to head (09c488e) 81.7%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34837     +/-   ##
=========================================
- Coverage    81.8%    81.7%   -0.1%     
=========================================
  Files         825      825             
  Lines      223269   223276      +7     
=========================================
- Hits       182635   182611     -24     
- Misses      40634    40665     +31     

Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

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

lgtm!

@brooksprumo brooksprumo merged commit 6835e10 into solana-labs:master Jan 19, 2024
35 checks passed
@brooksprumo brooksprumo deleted the snap/errors/add-bank-snapshot-errors branch January 19, 2024 17:53
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