etl
etl copied to clipboard
:hammer: enable chart-diff to connect to production and clean up envs
Motivation
Managing various envs (live, staging, local, etc.) has become more scattered and everyone is reinventing the wheel with their own helper functions. This PR unifies env management under existing OWIDEnv
class.
Implementation
Leverage OWIDEnv
object for managing settings and engines for various environments. Instead of using default etl.config
, you can now pass arbitrary config. There are also helper functions for creating OWIDEnv
for staging servers etc.
I also removed staging
from OWIDEnvType
since we no longer use them (@lucasrodes can I remove remote-staging
to staging
?). Should I maybe also remove mentions of live
from everywhere and replace them by production
?
Production env
Currently, we compare chart-diff
against staging-site-master
on staging servers. That's not optimal as we'd like to compare it against production. Hence, we add ENV_FILE_PROD
env variable that points to production .env
file (e.g. .env.prod.read
).
TODO after merging
- [ ] Add
ENV_FILE_PROD=.env.prod.read
variable and actual.env.prod.read
file to all staging servers