potiuk commented on code in PR #29039:
URL: https://github.com/apache/airflow/pull/29039#discussion_r1081322570
##########
airflow/www/views.py:
##########
@@ -154,6 +154,18 @@ def truncate_task_duration(task_duration):
return int(task_duration) if task_duration > 10.0 else
round(task_duration, 3)
+def sanitize_args(args: dict[str, str]) -> dict[str, str]:
+ """
+ Remove all parameters starting with `_`
+ :param args: arguments of request
+ :return: the dictionary passed as input with args starting with `_`
removed.
+ """
+ for key in list(args.keys()):
+ if key.startswith("_"):
+ del args[key]
+ return args
Review Comment:
Yeah. I was pondering on that one too.. Will change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]