This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 894868b406b91388b2902d26d57f97a2708cdf31
Author: Brent Bovenzi <brent.bove...@gmail.com>
AuthorDate: Thu Apr 28 16:39:38 2022 -0400

    Hide some task instance attributes (#23338)
    
    (cherry picked from commit f5f9c582a61e29a3bc007cb02a15579a42505565)
---
 airflow/www/views.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/airflow/www/views.py b/airflow/www/views.py
index bc065db6b8..f73b8107b9 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -1606,10 +1606,22 @@ class Airflow(AirflowBaseView):
             ti_attrs: Optional[List[Tuple[str, Any]]] = None
         else:
             ti.refresh_from_task(task)
+            ti_attrs_to_skip = [
+                'dag_id',
+                'key',
+                'mark_success_url',
+                'log',
+                'log_url',
+                'task',
+            ]
             # Some fields on TI are deprecated, but we don't want those 
warnings here.
             with warnings.catch_warnings():
                 warnings.simplefilter("ignore", DeprecationWarning)
-                all_ti_attrs = ((name, getattr(ti, name)) for name in dir(ti) 
if not name.startswith("_"))
+                all_ti_attrs = (
+                    (name, getattr(ti, name))
+                    for name in dir(ti)
+                    if not name.startswith("_") and name not in 
ti_attrs_to_skip
+                )
             ti_attrs = sorted((name, attr) for name, attr in all_ti_attrs if 
not callable(attr))
 
         attr_renderers = wwwutils.get_attr_renderer()

Reply via email to