amoghrajesh commented on PR #48648:
URL: https://github.com/apache/airflow/pull/48648#issuecomment-2774575672
@prabhusneha this is too specific and too complicated to be solving a simple
problem.
The root of the problem is that taskflow operators send op_args as a tuple
which comes in to the `serialize_template_field` and becomes a list eventually
due to this branch:
```
if not is_jsonable(template_field):
try:
serialized = template_field.serialize()
except AttributeError:
serialized = str(template_field)
if len(serialized) > max_length:
rendered = redact(serialized, name)
return (
"Truncated. You can change this behaviour in
[core]max_templated_field_length. "
f"{rendered[: max_length - 79]!r}... "
)
return serialized
```
Instead, we can do one thing since we kinda want to retain the behaviour
from before, we can just translate the tuples into list as we do in the `else`
branch. I'd say just drop the case of handling the tuples separately in
`is_jsonable` and before entering that, we can do: `template_fields =
translate_tuples_to_lists(template_fields)`. The tuple case was introduced for
a bit but we do not really use it anymore tbh.
--
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]