Page MenuHomePhabricator

Env vars being overwritten
Closed, ResolvedPublic

Description

env_specific_paths puts the env vars in the list first and then update overwrites the more specific vars.

At least, I think that's the reason why this is ignored,
https://github.com/wikimedia/mediawiki-services-parsoid-deploy/blob/master/scap/environments/beta/vars.yaml

diff --git a/scap/deploy.py b/scap/deploy.py
index d9fedb5..8842337 100644
--- a/scap/deploy.py
+++ b/scap/deploy.py
@@ -648,7 +648,7 @@ class Deploy(cli.Application):
 
         # Build vars to override remote
         search = self.context.env_specific_paths('vars.yaml')
-        for vars_file in search:
+        for vars_file in reversed(search):
             with open(vars_file, 'r') as vf:
                 tmp_cfg['override_vars'].update(yaml.load(vf.read()))

Revisions and Commits

Event Timeline

mobrovac added projects: User-mobrovac, Services.

Yup, the new version of Scap is definitely rewriting that setting with the production one. I have fixed the config manually on deployment-parsoid09 for the time being to have a functional Parsoid instance in beta.