apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.37k stars 14.11k forks source link

Changed behaviour on macros template due to Pendulum v3 #42302

Open fritzwijaya opened 1 day ago

fritzwijaya commented 1 day ago

Apache Airflow version

2.10.1

If "Other Airflow 2 version" selected, which one?

No response

What happened?

Due to changed default behaviour on Pendulum v3.x.x, the default print behaviour for template is getting affected. Its breaking dags that rely on template that using Pendulum type like data_interval_start and data_interval_end.

The current work around is to using Airflow Jinja filter ts.

What you think should happen instead?

No response

How to reproduce

In Pendulum 2:

>>> import pendulum
>>> str(pendulum.now())
'2024-01-29T16:00:38.678167-06:00'

In Pendulum 3:

>>> import pendulum
>>> str(pendulum.now())
'2024-01-29 16:00:23.305698-06:00'
>>> 

Operating System

Docker/Debian

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

Code of Conduct

boring-cyborg[bot] commented 1 day ago

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

nathadfield commented 38 minutes ago

This has been discussed before. I'd suggest using .isoformat(sep='T') if you require back compat.