-
Notifications
You must be signed in to change notification settings - Fork 179
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
Cleanup streaming errors for block not ready #5632
Cleanup streaming errors for block not ready #5632
Conversation
…p-streaming-errors-for-block-not-ready
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5632 +/- ##
==========================================
- Coverage 55.55% 55.45% -0.11%
==========================================
Files 1043 991 -52
Lines 102034 97588 -4446
==========================================
- Hits 56689 54113 -2576
+ Misses 40992 39250 -1742
+ Partials 4353 4225 -128
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
good start. I think there are a few more places to update as well.
we're looking to simplify this list in the streamer:
flow-go/engine/access/subscription/streamer.go
Lines 108 to 114 in ad12394
if errors.Is(err, storage.ErrNotFound) || | |
errors.Is(err, storage.ErrHeightNotIndexed) || | |
execution_data.IsBlobNotFoundError(err) || | |
errors.Is(err, ErrBlockNotReady) { | |
// no more available | |
return nil | |
} |
to just be
if errors.Is(err, ErrBlockNotReady) {
return nil
}
So all code that returns errors to subscription.Next
will need to have updated error handling that converts one those errors into subscription.ErrBlockNotReady
. Other errors can be returned normally so they get handled as they do today.
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.
please also update the other streaming endpoints in a similar way
…p-streaming-errors-for-block-not-ready
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.
please also update
flow-go/engine/access/subscription/streamer.go
Lines 108 to 114 in ad12394
if errors.Is(err, storage.ErrNotFound) || | |
errors.Is(err, storage.ErrHeightNotIndexed) || | |
execution_data.IsBlobNotFoundError(err) || | |
errors.Is(err, ErrBlockNotReady) { | |
// no more available | |
return nil | |
} |
to only match on subscription.ErrBlockNotReady
…p-streaming-errors-for-block-not-ready
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.
I added a couple of small comments. Otherwise, it looks good!
Closes: #5574