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

Fix event stream error handling and reconnection #6749

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

kschiffer
Copy link
Member

Summary

This PR fixes error handling and reconnection logic of event streams.

Changes

  • Convert stream errors to error objects
  • Implement a timeout for WebSocket connection attempts
  • Fix checks that determine whether reconnects should be attempted

Testing

Local testing.

Notes for Reviewers

This is a somewhat preliminary fix to get the reconnects working again. Error handling in general needs some more love since error propagation is now quite different under the WebSocket logic than it has been before. Concretely we should look into how to identify special errors such as authentication and network errors when using the WebSocket connection to apply special logic in these cases.

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • The steps/process to test this feature are clearly explained including testing for regressions.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@kschiffer kschiffer added bug Something isn't working c/console This is related to the Console ui/web This is related to a web interface labels Dec 5, 2023
@kschiffer kschiffer added this to the v3.28.2 milestone Dec 5, 2023
@kschiffer kschiffer requested a review from a team as a code owner December 5, 2023 08:24
@kschiffer kschiffer self-assigned this Dec 5, 2023
@github-actions github-actions bot removed the c/console This is related to the Console label Dec 5, 2023
Copy link
Contributor

@adriansmares adriansmares left a comment

Choose a reason for hiding this comment

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

Based on my local test, this seems to work.

CHANGELOG.md Outdated Show resolved Hide resolved
@kschiffer
Copy link
Member Author

Still working on some fine-tuning here. Will merge later today.

@kschiffer kschiffer added c/console This is related to the Console c/sdk/js This is related to the JavaScript SDK labels Dec 7, 2023
@github-actions github-actions bot removed the c/console This is related to the Console label Dec 7, 2023
Copy link
Contributor

@mjamescompton mjamescompton left a comment

Choose a reason for hiding this comment

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

I've not got that much context for this so i've mostly spent some time to look over how this all works. Nothing to add as I think I need more time to really get my head into this. I can put more time daily to catch up with all this.

@kschiffer kschiffer merged commit 8925c04 into v3.28 Dec 8, 2023
10 checks passed
@kschiffer kschiffer deleted the fix/event-stream-reconnect branch December 8, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c/sdk/js This is related to the JavaScript SDK ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants