Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide some task instance attributes in details page #23338

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,10 +1606,22 @@ def task(self, session):
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()
Expand Down