SamWheating edited a comment on issue #18582:
URL: https://github.com/apache/airflow/issues/18582#issuecomment-931473731


   So we _can_ modify an env var, but the issue is that these changes aren't 
persisted anywhere and will be wiped or reset on a server or container restart, 
hence its not really a reliable place for long-lived read-write values. 
   
   Variables, connections and secrets set by the env will take precedence over 
a matching entry in the config file or database, which can lead to some 
misleading behaviour when a value is set in multiple places. 
   
   So assuming we're doing something like:
   
   ```
   On every scheduler start-up, check the environment for env vars like 
`AIRFLOW_POOL_<POOL_NAME>=<size>`
   
   For every match, create or update the specified pool to the given size
   ```
   
   A few uncertainties come to mind:
   
   1) Are we OK with the pool being left there once the env var is removed?
   
   2) Are we OK with the pool being reset to the env-var configured size after 
being manually updated via the CLI or UI? (since we'd be treating environment 
variables as the higher-priority source of truth)
   
   Additionally, since there is a `description` field on Pools, we could update 
the description to say something like `Provisioned by AIRFLOW__POOL_MY_POOL 
environment variable` which might reduce some confusion around pool values 
changing without UI / CLI input. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to