imrichardwu commented on code in PR #61878:
URL: https://github.com/apache/airflow/pull/61878#discussion_r2810310251
##########
airflow-core/src/airflow/serialization/helpers.py:
##########
@@ -31,6 +31,94 @@
from airflow.timetables.base import Timetable as CoreTimetable
+def _truncate_rendered_value(rendered: str, max_length: int) -> str:
+ if max_length <= 0:
+ return ""
+
+ prefix = "Truncated. You can change this behaviour in
[core]max_templated_field_length. "
+ suffix = "..."
+ value = str(rendered)
Review Comment:
You're absolutely right, the 2 functions I used were built off a closed pr,
and I totally didn't realize.
--
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]