Skip to content

Commit

Permalink
Reintroduce custom fingerprinting for unexpected EOF
Browse files Browse the repository at this point in the history
The "unexpected EOF" error continues to exist and we should investigate why. Interestingly, it only happens when listing files, not for any other action.
  • Loading branch information
MrSerth committed Oct 22, 2024
1 parent 3e94cdf commit 2034178
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/nomad/api_querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ func (nc *nomadAPIClient) executeInAllocation(ctx context.Context, cmd string, a
case errors.Is(err, context.Canceled):
log.WithContext(ctx).Debug("Execution canceled by context")
return 0, nil
case errors.Is(err, io.ErrUnexpectedEOF), strings.Contains(err.Error(), io.ErrUnexpectedEOF.Error()):
// The unexpected EOF is a generic Nomad error. Because this error happens at the very end,
// it does not affect the functionality. Therefore, we don't propagate the error.
log.WithContext(ctx).WithError(err).
WithField(logging.SentryFingerprintFieldKey, []string{"nomad-unexpected-eof"}).Warn("Unexpected EOF for Execute")
return 0, nil
case strings.Contains(err.Error(), "Unknown allocation"):
return 1, ErrNomadUnknownAllocation
default:
Expand Down

0 comments on commit 2034178

Please sign in to comment.