From 7e85c699e4124f0fabed802137ffcb04f518df9b Mon Sep 17 00:00:00 2001 From: Ash Berlin-Taylor Date: Wed, 7 Oct 2020 09:13:09 +0100 Subject: [PATCH] Automatically upgrade old default navbar color As part of #11195 we re-styled the UI, changing a lot of the default colours to make them look more modern. However for anyone upgrading and keeping their airflow.cfg from 1.10 to 2.0 they would end up with things looking a bit ugly, as the old navbar color would be kept. This uses the existing config value upgrade feature to automatically change the old default colour in to the new default colour. --- airflow/configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airflow/configuration.py b/airflow/configuration.py index d41366bd732935..32386a2e0aeeee 100644 --- a/airflow/configuration.py +++ b/airflow/configuration.py @@ -178,6 +178,9 @@ class AirflowConfigParser(ConfigParser): # pylint: disable=too-many-ancestors 'task_runner': (re.compile(r'\ABashTaskRunner\Z'), r'StandardTaskRunner', '2.0'), 'hostname_callable': (re.compile(r':'), r'.', '2.0'), }, + 'webserver': { + 'navbar_color': (re.compile(r'\A#007A87\Z', re.IGNORECASE), '#fff', '2.1'), + }, 'email': { 'email_backend': ( re.compile(r'^airflow\.contrib\.utils\.sendgrid\.send_email$'),