You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/20 06:32:35 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #21640: Change the default auth backend to session

uranusjr commented on a change in pull request #21640:
URL: https://github.com/apache/airflow/pull/21640#discussion_r810577276



##########
File path: airflow/configuration.py
##########
@@ -350,10 +350,11 @@ def _using_old_value(self, old, current_value):
         return old.search(current_value) is not None
 
     def _update_env_var(self, section, name, new_value):
-        # Make sure the env var option is removed, otherwise it
-        # would be read and used instead of the value we set
         env_var = self._env_var_name(section, name)
-        os.environ.pop(env_var, None)
+        # If the config comes from environment, set it there so that any subprocesses keep the same override!
+        if os.environ.get(env_var):

Review comment:
       ```suggestion
           if env_var in os.environ:
   ```
   
   This matters because it is possible to set an environment variable to an empty string.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org