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] Implement service provider checks in module initialisation #106

Open
kon14 opened this issue Mar 31, 2022 · 1 comment
Open

[FEAT] Implement service provider checks in module initialisation #106

kon14 opened this issue Mar 31, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@kon14
Copy link
Contributor

kon14 commented Mar 31, 2022

Modules like Email, SMS and Storage depend either optionally or entirely on third party service providers.
Accessing and making use of said providers might not always be possible due to configured credentials being invalid, their service going down or even the backend user's account running low on credit.

Instead of just assuming a third-party dependent module is online as long as its configuration specifies active: true and it hasn't yet crashed, we should ideally be performing some checks to verify our connection is not only available, but also functional (that is to say, not connected, but unable to send emails due to a low credit block for instance).

These checks would also prove useful in notifying modules making use of a service-dependent module as to the latter's actual state.
For instance, Authentication's local authentication strategy makes optional use of Email for registration verification etc.
It's no good knowing that Email is online and "active" when in reality it could possibly be incapable of sending any emails.
This could also let us temporarily disable certain routes (route re-registration) on an inactive Email onConfig event and whatnot.

@kon14 kon14 added the enhancement New feature or request label Mar 31, 2022
@kkopanidis kkopanidis changed the title [FEAT] Implevent service provider checks in module initialization [FEAT] Implement service provider checks in module initialisation Apr 10, 2022
@kon14
Copy link
Contributor Author

kon14 commented Apr 28, 2022

Wtih gRPC health checking protocol being implemented we may now specify a NOT_SERVING (or maybe UNKNOWN) health state for modules with improper configuration.
This would result in these modules not registering as available in Config and thus not showing up as available at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant