Skip to content

Commit

Permalink
Use more accurate warning text when adding session
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Feb 23, 2022
1 parent b5cd344 commit 6816cae
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions airflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,11 @@ def _upgrade_auth_backends(self):
elif old_value.find('airflow.api.auth.backend.session') == -1:
new_value = old_value + "\nairflow.api.auth.backend.session"
self._update_env_var(section="api", name="auth_backends", new_value=new_value)
self._create_future_warning(
name="auth_backends",
section="api",
current_value=old_value,
new_value=new_value,
version="3.0",
warnings.warn(
'The auth_backends setting in [api] has had airflow.api.auth.backend.session added '
'in the running config, which is needed by the UI. Please update your config before '
'Apache Airflow 3.0.',
FutureWarning,
)

def _validate_enums(self):
Expand Down

0 comments on commit 6816cae

Please sign in to comment.