-
Notifications
You must be signed in to change notification settings - Fork 44
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
The /client.config endpoint must query the services health endpoint #1599
Comments
After a call with @lucapette we came up the following proposal The return {
"components": [
"api-communication",
"media-resolver",
"integration-webhook",
"api-admin",
"api-websocket",
"frontend-chat-plugin",
"frontend-ui",
"sources-chat-plugin",
"sources-facebook",
"sources-google",
"sources-twilio"
]
} The {
"components": {
"sources-facebook": {},
"sources-google": {}
}
} Benefits: By removing the What do you think? |
How would the output of the While I think this is a fast way to make this work, I would re-iterate the proposal I made on Slack. Instead of dumbing down the endpoint, we can make a better distinction between apps (user runnables in our cluster) and components (things you can configure in the So to make {
"sources-facebook-connector": {
"enabled": true,
"component": "sources-facebook"
},
"sources-facebook-events-router": {
"enabled": true,
"component": "sources-facebook"
},
"api-communication": {
"enabled": true,
"component": "api-communication"
}
}
It's also worth considering renaming Since we are already going for introspection it makes more sense to me to follow through with it. |
it’s easier to find for us the right thing if the component name is they key, like it was in the beginning
|
@AitorAlgorta that's true but long term it makes more sense if the endpoint reflects the state of the system more precisely. Say for instance you want to display exactly which apps are failing and why in the UI. Plus transforming the above payload is as simple as: Object.keys(payload).reduce((result, key) => {
const {healthy, enabled, component} = payload[key];
return {
...result,
[component]: {
enabled,
healthy: result[component] ? result[component].healthy && healthy : healthy
}
}
}, {}) By keeping the response generic it will be easier to adapt to new requirements on the client. |
yeah I am good with both options actually. I understand that this one makes more sense and that one extra step to have the desired structure is not a big deal. |
We must query the health endpoint for each service returned on the controller api call to check the status
The text was updated successfully, but these errors were encountered: