VBhojawala commented on a change in pull request #14024:
URL: https://github.com/apache/airflow/pull/14024#discussion_r568602878
##########
File path: airflow/www/views.py
##########
@@ -898,7 +898,7 @@ def rendered_templates(self):
content = getattr(task, template_field)
renderer = task.template_fields_renderers.get(template_field,
template_field)
if renderer in renderers:
- if isinstance(content, (dict, list)):
+ if isinstance(content, dict):
Review comment:
I agree , If we are also rendering the each dictionary item instead of
rending as json.
##########
File path: airflow/www/views.py
##########
@@ -898,7 +898,7 @@ def rendered_templates(self):
content = getattr(task, template_field)
renderer = task.template_fields_renderers.get(template_field,
template_field)
if renderer in renderers:
- if isinstance(content, (dict, list)):
+ if isinstance(content, dict):
Review comment:
I agree , If we are also rendering the each dictionary item instead of
rending as json.
##########
File path: airflow/www/views.py
##########
@@ -898,7 +898,7 @@ def rendered_templates(self):
content = getattr(task, template_field)
renderer = task.template_fields_renderers.get(template_field,
template_field)
if renderer in renderers:
- if isinstance(content, (dict, list)):
+ if isinstance(content, dict):
Review comment:
IMHO can we extract renderer code from the view and my be map a custom
render function for json here ?
https://github.com/apache/airflow/blob/d2efb33239d36e58fb69066fd23779724cb11a90/airflow/www/utils.py#L346
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]