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

feat: alert users to cluster disconnection and reconnect #270

Merged
merged 35 commits into from
Sep 17, 2024

Conversation

TristanHoladay
Copy link
Contributor

@TristanHoladay TristanHoladay commented Aug 30, 2024

Description

Adds a cluster connection check endpoint to the backend to poll for cluster connection. Upon cluster disconnection, the frontend will be notified and pop up an alert in the user's view to let them know. The backend will trigger a reconnection handler, which will infinitely retry to connect every 5 seconds until successful or user stops the app. When a new connection is made, the old cache informers will be stopped and a new cache will be created.

To Test

  1. run frontend and backend, with our without auth
  2. in separate terminal, cd into runtime repo and run uds run test:k3d
  3. watch the frontend for alerts

Related Issue

Resolves #10

@TristanHoladay TristanHoladay changed the title feat: alert users to cluster disconnection feat: alert users to cluster disconnection and reconnect Sep 6, 2024
pkg/api/start.go Outdated Show resolved Hide resolved
pkg/api/start.go Outdated Show resolved Hide resolved
decleaver
decleaver previously approved these changes Sep 9, 2024
Copy link
Contributor

@decleaver decleaver left a comment

Choose a reason for hiding this comment

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

Comments addressed and issue being created to look into the timing and number of network calls to /health

@TristanHoladay
Copy link
Contributor Author

TristanHoladay commented Sep 9, 2024

for multiple health calls #299

for automatic "reload" for user #300

pkg/api/start_test.go Outdated Show resolved Hide resolved
pkg/api/start.go Outdated Show resolved Hide resolved
pkg/api/start.go Outdated Show resolved Hide resolved
decleaver
decleaver previously approved these changes Sep 16, 2024
decleaver
decleaver previously approved these changes Sep 16, 2024
Copy link
Contributor

@decleaver decleaver left a comment

Choose a reason for hiding this comment

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

🚀

@TristanHoladay TristanHoladay merged commit d121bdc into main Sep 17, 2024
12 checks passed
@TristanHoladay TristanHoladay deleted the cluster-disconnection branch September 17, 2024 14:11
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.

Cluster Disconnection Alert
3 participants