quetz icon indicating copy to clipboard operation
quetz copied to clipboard

Env var override suggestion

Open ericdill opened this issue 4 years ago • 4 comments

Having spent some time recently with airflow, I wonder what your thoughts are on handling env var overrides in Quetz similar to how they do it in Airflow:

AIRFLOW__{CONFIG_SECTION}__{CONFIG_KEY}

Basically separate QUETZ, CONFIG_SECTION and CONFIG_KEY with double underscores __ instead of single underscores _. This has a couple of benefits: easier to parse visually and also enforces uniqueness between sections. In theory you could have config like:

[config_test]
url = 'some url'
[config]
test_url = 'some other url'

and so with the current scheme in Quetz, these two would have identical environmental variables of QUETZ_CONFIG_TEST_URL whereas with the double underscore you'd get QUETZ__CONFIG_TEST__URL and QUETZ__CONFIG__TEST_URL

Thoughts?

ericdill avatar Sep 07 '20 18:09 ericdill

Sounds reasonable to me.

benjamb avatar Sep 11 '20 08:09 benjamb

I think this is related to #155

wolfv avatar Nov 16 '20 08:11 wolfv

it's a very good idea, it might be also added to the current config system

btel avatar Nov 16 '20 10:11 btel

Agree!

adriendelsalle avatar Nov 16 '20 19:11 adriendelsalle