pierrejeambrun opened a new pull request, #74742: URL: https://github.com/apache/airflow/pull/74742
YAML has no duration type, so a YAML Dag with `retry_delay: "5m"` failed to import with `TypeError: unsupported type for timedelta seconds component: str`. Arguments that only accept a `timedelta`, such as `execution_timeout`, `dagrun_timeout` or `TimeDeltaSensor.delta`, could not be set from YAML at all. The importer's own example fixture (`example_dag.yaml`) already uses `retry_delay: "5m"` and `delta: "1h"`, but its tests only parse it and never build it, so this went unnoticed. Found while testing the language SDKs on 3.4.0b1. The builder already promotes date strings for `datetime`-annotated arguments. This applies the same annotation-based approach to `timedelta`-annotated arguments, accepting durations written as `30s`, `5m`, `1h30m` or `2d` on the Dag, at task level and under `with:`. Only arguments annotated as `timedelta` are touched, and any other string is passed through unchanged, as for dates. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
