anishmehta24 opened a new pull request, #73656: URL: https://github.com/apache/airflow/pull/73656
`encode_relativedelta` dropped every falsy field, so absolute fields set to 0 were lost. `relativedelta(weekday=FR, hour=0, minute=0, second=0)` came back as just `weekday=FR`, and a schedule meant to snap to Friday midnight kept the time of day from the base datetime instead. Relative fields (`days`, `hours`, ...) default to 0 and absolute ones (`day`, `hour`, ...) default to None, so absolute fields are now kept whenever they are not None and relative fields are still dropped at 0. This also covers `encode_interval`, which goes through the same function. The decoder already handled these fields. Added the midnight case from the issue and a mixed relative/absolute case to `test_roundtrip_relativedelta`; both fail without the change. Ran the serialization and timetable unit tests in the CI image with sqlite. closes: #70527 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code 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]
