-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix: prevent progress bar from panicking using workaround #6940
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6940 +/- ##
==========================================
+ Coverage 77.59% 77.66% +0.06%
==========================================
Files 310 310
Lines 41475 41463 -12
==========================================
+ Hits 32183 32201 +18
+ Misses 9292 9262 -30 |
d77fd73
to
4965b2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix!
I think we should restart the Zebra instance before the demo as a workaround.
The long-term fix would be disabling the ETA on those progress bars (an API change), and fixing the overflow bug in those libraries. But that's not a priority right now.
Would you mind moving these limits into comments? It's important that we document them anyway, and we might as well refer to the existing constants.
It takes 4m30s to crash on my machine, so that may lead to a very stressful demo 😅
Done in 74365c4 |
Oh wow, that's not what was happening when I wrote the feature. This seems like a new bug in the libraries we're using. |
Co-authored-by: teor <teor@riseup.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Motivation
Running Zebra with progress bar makes it panic after a while.
This seems to be caused by a bug in
howudoin
/indicatif
where if a progress bar gets stuck, the ETA keeps growing and growing until it overflows. I'll eventually try to get a simple reproducer and report it, but in the meantime we can do a workaround.Solution
This removes the limit on the progress bars that are not guaranteed to complete, which removes the ETA and avoids the panic. The other progress bars (e.g. Blocks) could still panic if the node gets offline but this seems enough for now.
We could copy&paste and modify the
TermLine
implementation fromhowudoin
to not display the ETA, but seems more work and would duplicate code.They look like this with this PR:
Closes #6926
Review
This is not urgent since progress bars are optional. But I think it would be nice to get this in the stable release so that we can show the progress bars working during demos.
Anyone can review.
Reviewer Checklist
Follow Up Work
Need to report the bug in
indicatif
(and maybe propose a PR to fix), will do that later