-
Notifications
You must be signed in to change notification settings - Fork 15
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
Socket Initialization on user login #1109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -13,4 +13,4 @@ export const getLastExecutionByGroupID = (groupID) => | |||
wandaClient.get(`/api/checks/groups/${groupID}/executions/last`); | |||
|
|||
export const getCatalog = (env) => | |||
wandaClient.get(`/api/checks/catalog`, { params: env }) | |||
wandaClient.get(`/api/checks/catalog`, { params: env }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the linter catch this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a formatting issue, for some reason previous formatting tasks didn't catch 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CDimonaco can we investigate? are we checking the formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes in the CI we have the correct step, I will investigate further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with comments
function* watchUserLoggedIn() { | ||
yield all([ | ||
takeLatest('user/setUserAsLogged', initialDataFetch), | ||
takeLatest('user/setUserAsLogged', setupSocketEvents), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if this breaks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The application will crash, it's an unrecoverable error (no sockets no frontend basically), for the initial data fetching the error handling is the same as all the api requests
Description
Socket connection needs to be initialized only after user login.
How was this tested?
Automated tests