metaphysics icon indicating copy to clipboard operation
metaphysics copied to clipboard

`Must-have` configs

Open mzikherman opened this issue 6 years ago • 0 comments

We have a list of 'must have' configs, and we throw an error if any of them are missing: https://github.com/artsy/metaphysics/blob/33eac8c55c1d0fd811872aaf541133683d4b3101/src/config.js#L75

I this is a cool idea! Rather than fail silently/mysteriously at a future point, we enforce their presence.

However, I think there are two current issues with Metaphysics and its handling of the 'must-have' configs that we should solve to get this working right.

Flag to disable this check, when running yarn sync-schema, etc.

The ENV vars don't need to be set in order to run: https://github.com/artsy/metaphysics/blob/33eac8c55c1d0fd811872aaf541133683d4b3101/package.json#L20-L21 (one of which is run from Emission/Reaction, where Metaphysics is a submodule). Rather than go the route of providing dummy ENV vars to silence the warnings: https://github.com/artsy/metaphysics/pull/1039 , we should be able to run these scripts without these.

So, something like: DISABLE_ENV_CHECK=1 yarn dump-schema... perhaps.

Better handling of deploy failures

We had two incidents of env vars appearing in this check and then not actually being set in our k8s staging deployment. Sure enough, those deploys didn't actually return a failure, or do a rollback, but left Metaphysics in a state where it was unresponsive and had to be manually 'refreshed' (the infamous 'delete pods' UI).

Personally, I wouldn't mind commenting out the check in the meantime until the above two issues are resolved. Once they are however, I would love having the check back.

mzikherman avatar May 09 '18 13:05 mzikherman