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

Clean up error logs #84

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Clean up error logs #84

merged 1 commit into from
Nov 29, 2023

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Nov 29, 2023

Why are these changes needed?

Properly ignore noisy error logs

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@@ -120,9 +121,11 @@ func (e *EncodingStreamer) Start(ctx context.Context) error {
case response := <-encoderChan:
err := e.ProcessEncodedBlobs(ctx, response)
if err != nil {
if !errors.Is(err, context.Canceled) {
e.logger.Error("error processing encoded blobs", "err", err)
if strings.Contains(err.Error(), context.Canceled.Error()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

errors.Is(err, context.Canceled)?

Copy link
Contributor Author

@ian-shim ian-shim Nov 29, 2023

Choose a reason for hiding this comment

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

The previous version did just that. It didn't work as context canceled message in err is not wrapped as error but as rpc status.
This is a workaround.

@ian-shim ian-shim marked this pull request as ready for review November 29, 2023 18:29
@ian-shim ian-shim merged commit 55fe65a into Layr-Labs:master Nov 29, 2023
5 checks passed
teddyknox pushed a commit that referenced this pull request Nov 29, 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