parabol icon indicating copy to clipboard operation
parabol copied to clipboard

feat: user presence supports k8s

Open mattkrick opened this issue 3 years ago • 1 comments

Description

fix #7204

User presence is currently reset during a postDeploy step. This won't work when we move to k8s and have multiple servers deploying at different times.

This PR will wipe out user presence for all users connected to a given socket server during shutdown. In the event of an ungraceful shutdown, when a server starts up it performs a health check on all other servers. It then removes any user presence for servers that were not present during the health check.

Testing scenarios

  • [ ] tbd

mattkrick avatar Sep 21 '22 00:09 mattkrick

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Sep 21 '22 00:09 sonarqubecloud[bot]

@Dschoordsch you're too kind! thanks for the review. I'm stuck on testing that SIGINT handler. i could call kill -s SIGINT, but i'd like to just ctrl+c, but that's not triggering it! I'm not sure what is swallowing the signal...

mattkrick avatar Nov 29 '22 19:11 mattkrick

i misunderstood the SIGINT handler, it doesn't handle promises. instead of doing async work in the SIGINT handler, I'll have the dying node publish a message to all living nodes asking them to kill it in redis :grimacing:

mattkrick avatar Dec 14 '22 01:12 mattkrick

@Dschoordsch would you mind giving this old thing a fresh review?

mattkrick avatar Feb 09 '23 19:02 mattkrick

I think this is good to go, we're got a lot of risky PRs going on right now, so I'll hold off on merging this until things calm down in a week or so.

mattkrick avatar Feb 24 '23 20:02 mattkrick