uranusjr commented on code in PR #28777: URL: https://github.com/apache/airflow/pull/28777#discussion_r1064247537
########## airflow/www/utils.py: ########## @@ -133,13 +133,25 @@ def get_mapped_summary(parent_instance, task_instances): def get_dag_run_conf(dag_run_conf: Any) -> tuple[str | None, bool]: + class DagRunConfEncoder(json.JSONEncoder): + def default(self, obj): + if isinstance(obj, bytes): + try: + return obj.decode() + except Exception: + return str(obj) + try: + return json.JSONEncoder.default(self, obj) + except Exception: + return str(obj) Review Comment: Just to comment, if you _have_ to stringify things for display, `repr` is better than `str`. -- 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]
