ashb commented on code in PR #58111:
URL: https://github.com/apache/airflow/pull/58111#discussion_r2532043722


##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -2111,7 +2116,10 @@ def _deserialize_field_value(cls, field_name: str, 
value: Any) -> Any:
             return None
         elif field_name == "resources":
             return Resources.from_dict(value) if value is not None else None
-        elif field_name.endswith("_date"):
+        elif field_name in ("start_date", "end_date"):
+            # Skip deserialization for strings containing Jinja templates only 
for top-level date fields
+            if isinstance(value, str) and cls._contains_jinja(value):
+                return value  # Keep as-is for runtime rendering

Review Comment:
   If the goal is to allow rendering start_date and end_date form Jinja 
templates, which is a new feature, this PR needs renaming. It's a much much 
bigger (conceptual) ask than "just don't crash".
   
   One that I'm not sure it is worth Airflow supporting -- the scheduler is 
already struggling perf wise that I don't think we should blindly add this in 
just because a few users are trying it -- instead a better option (since this 
hasn't ever worked that I can see) would be to reject it at dag parsing time.



-- 
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]

Reply via email to