From 7ee739bb9202e9d5318d1513b55676ab75b66e3b Mon Sep 17 00:00:00 2001
From: Daniel Standish <15932138+dstandish@users.noreply.github.com>
Date: Wed, 11 May 2022 07:13:57 -0700
Subject: [PATCH] Simplify flash message for _airflow_moved tables (#23635)
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
(cherry picked from commit b68667843c7a9796e7017b729f4474c0b0c990cd)
---
airflow/www/templates/airflow/dags.html | 26 ++++++++++++++++++-------
airflow/www/views.py | 4 ++--
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/airflow/www/templates/airflow/dags.html b/airflow/www/templates/airflow/dags.html
index ba0e35f8c1fd5..a824369769897 100644
--- a/airflow/www/templates/airflow/dags.html
+++ b/airflow/www/templates/airflow/dags.html
@@ -80,15 +80,27 @@
{% for m in dashboard_alerts %}
{{ show_message(m.message, m.category) }}
{% endfor %}
- {% for original_table_name, moved_table_name in migration_moved_data_alerts %}
- {% call show_message(category='error', dismissible=false) %}
- Airflow found incompatible data in the {{ original_table_name }}
table in the
- metadatabase, and has moved them to {{ moved_table_name }}
during the database migration
- to upgrade. Please inspect the moved data to decide whether you need to keep them, and manually drop
- the {{ moved_table_name }}
table to dismiss this warning. Read more about it
+ {% if migration_moved_data_alerts %}
+ {% call show_message(category='warning', dismissible=false) %}
+ While upgrading the metadatabase, Airflow had to move some bad data in order to apply new constraints.
+ The moved data can be found in the following tables:
+
Source table | +Table with moved rows | +
---|---|
{{ original_table_name }} |
+ {{ moved_table_name }} |
+