You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/28 20:39:46 UTC
[airflow] branch main updated: Hide some task instance attributes (#23338)
This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f5f9c582a6 Hide some task instance attributes (#23338)
f5f9c582a6 is described below
commit f5f9c582a61e29a3bc007cb02a15579a42505565
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Thu Apr 28 16:39:38 2022 -0400
Hide some task instance attributes (#23338)
---
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 d6103b1bc3..8979789dcb 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()