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 websocket stream reconnection #6755

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

kschiffer
Copy link
Contributor

@kschiffer kschiffer commented Dec 11, 2023

Summary

This PR fixes the automatic reconnection of event streams after a disruption.

Changes

  • Fix omitted connection success event to setup the internal state machine correctly for reconnection attempts.
  • Improve the synthetic event messages to reflect the new situation for disconnects after the websocket refactor.

Testing

  • Go to the Console and navigate to an application or gateway
  • Observe the event stream connecting and delivering events
  • Put your machine into sleep mode
  • Wait a couple of seconds
  • Exit sleep mode
  • Observe the event stream being closed
  • Observe the event stream being automatically reconnected after a couple of seconds

Notes for Reviewers

START_EVENT_STREAM_SUCCESS event and hence the connection was never set as CONNECTED but CONNECTING and consequently no reconnection attempts were made because the connection was considered to be still connecting.

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 11, 2023
@kschiffer kschiffer added this to the v3.28.2 milestone Dec 11, 2023
@kschiffer kschiffer self-assigned this Dec 11, 2023
@kschiffer kschiffer requested a review from a team as a code owner December 11, 2023 04:53
@github-actions github-actions bot removed the c/console This is related to the Console label Dec 11, 2023
@kschiffer kschiffer force-pushed the fix/event-stream-reconnect-2 branch from 0c81e80 to 9f3309f Compare December 11, 2023 07:20
@kschiffer kschiffer merged commit 16b68eb into v3.28 Dec 11, 2023
13 checks passed
@kschiffer kschiffer deleted the fix/event-stream-reconnect-2 branch December 11, 2023 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui/web This is related to a web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants