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

EOF logged as error while receiving eventstream in generic event source #3182

Open
jdaftari-confluent opened this issue Jun 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jdaftari-confluent
Copy link

Describe the bug
The generic eventsource client logs an error when it receives and io.EOF on the stream. This is a valid response indicating that the stream has completed successfully and should not be logged as an error.

To Reproduce
Steps to reproduce the behavior:

  1. Implement a generic event source server that implements generic.proto. The server sends a nil for error indicating there's no error and the stream has finished.
  2. Deploy the event bus, the event source server and configure the generic eventsource to connect to the server.
  3. Once the generic eventsource client starts streaming from the server, you'll notice this error.

Expected behavior
No error logs when io.EOF is received because EOF on the Recv method indicates that the stream completed successfully.

Screenshots
N/A

Environment (please complete the following information):

  • Kubernetes: v1.28.9
  • Argo: 3.5.6
  • Argo Events: 1.9.1

Additional context

Log
{
    "level": "error",
    "ts": 1719377580.1872804,
    "logger": "argo-events.eventsource",
    "caller": "generic/start.go:82",
    "msg": "failed to receive events from the event stream, reconnecting in 5 seconds...",
    "eventSourceName": "foo",
    "eventSourceType": "generic",
    "eventName": "bar",
    "url": "foo.argo-events.svc:50051",
    "error": "EOF",
    "stacktrace": "github.com/argoproj/argo-events/eventsources/sources/generic.(*EventListener).StartListening\n\t/home/build/eventsources/sources/generic/start.go:82\ngithub.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3.1\n\t/home/build/eventsources/eventing.go:536\ngithub.com/argoproj/argo-events/common.DoWithRetry.func1\n\t/home/build/common/retry.go:106\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection.ConditionFunc.WithContext.func1\n\t/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:220\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext\n\t/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:233\nk8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection\n\t/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:226\nk8s.io/apimachinery/pkg/util/wait.ExponentialBackoff\n\t/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:421\ngithub.com/argoproj/argo-events/common.DoWithRetry\n\t/home/build/common/retry.go:105\ngithub.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3\n\t/home/build/eventsources/eventing.go:535"
}
Stacktrace
github.com/argoproj/argo-events/eventsources/sources/generic.(*EventListener).StartListening
        /home/build/eventsources/sources/generic/start.go:82
github.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3.1
        /home/build/eventsources/eventing.go:536
github.com/argoproj/argo-events/common.DoWithRetry.func1
        /home/build/common/retry.go:106
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection.ConditionFunc.WithContext.func1
        /var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:220
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
        /var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:233
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtection
        /var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:226
k8s.io/apimachinery/pkg/util/wait.ExponentialBackoff
        /var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:421
github.com/argoproj/argo-events/common.DoWithRetry
        /home/build/common/retry.go:105
github.com/argoproj/argo-events/eventsources.(*EventSourceAdaptor).run.func3
        /home/build/eventsources/eventing.go:535

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@jdaftari-confluent jdaftari-confluent added the bug Something isn't working label Jun 26, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had
any activity in the last 60 days. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 26, 2024
@justinfx
Copy link

:bump:

@github-actions github-actions bot removed the stale label Aug 27, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has not had
any activity in the last 60 days. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 26, 2024
@justinfx
Copy link

:bump:

@github-actions github-actions bot removed the stale label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants