fission-codes / fission-server

Apache License 2.0
9 stars 0 forks source link

Add more checks to /healthcheck #255

Open matheus23 opened 7 months ago

matheus23 commented 7 months ago

At the time of writing, https://server.fission.dev/healthcheck reports {"database_connected":true,"database_up_to_date":true}, but it's not actually all fine.

Here's some tests to make sure DNS is configured correctly:

I'm not 100% sure yet if these checks are the correct ones. E.g. what if we don't know our own IP address? Or if there's some forwarding going on. Perhaps it makes more sense to try to resolve _did.<origin> to see if it resolves as our own DID? But what if there's two accidentally deploys with the same DID? Or an old deploy with the same DID is still cached? Also, we don't have any TXT records on <users_origin> by default. Perhaps we should add one? And call it _healthcheck, make sure that it's set to an in-memory random variable and see if it resolves correctly?

matheus23 commented 7 months ago

Another thing we could add to /healthcheck is just printing out the environment: "environment": "prod" / "environment": "staging", etc.

matheus23 commented 7 months ago

Also information about the connection status of ipfs.peers that were configured?