rorymcstay opened a new issue, #50172:
URL: https://github.com/apache/airflow/issues/50172

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After upgrading to airflow 3, dag context incorrectly resolves 
`data_interval_start` as `data_interval_end`. This is both in the UI under the 
dag details and affects the task parameters itself.
   
   The schedule argument being used is "*/15 5-21 * * MON-FRI"
   
   ### What you think should happen instead?
   
   The dag should resolve data interval start/end dates correctly.
   
   ### How to reproduce
   
   In airflow 3 create the following dag
   
   ```
   from airflow import DAG
   from datetime import datetime
   from airflow.operators.python import PythonOperator
   
   with DAG(
       "example",
       start_date=datetime.fromisoformat("2025-05-01 00:00:00+00:00"),
       schedule="*/15 5-21 * * MON-FRI",
   ) as dag:
   
       PythonOperator(
           task_id="print",
           python_callable=print,
           op_args=(
               "{{ data_interval_start }}",
               "{{ data_interval_end }}",
           ),
           op_kwargs={},
       )
   ```
   
   Run the dag, and observe the dag details resolving the correct data interval.
   
   In the UI
   
![Image](https://github.com/user-attachments/assets/0c0fbb40-74f1-489b-bdbe-26296243a9d4)
   
   In the task logs
   ```
   [2025-05-04, 11:04:41] INFO - DAG bundles loaded: dags-folder: 
source="airflow.dag_processing.bundles.manager.DagBundlesManager"
   [2025-05-04, 11:04:41] INFO - Filling up the DagBag from 
/opt/airflow/dags/example_dag.py: source="airflow.models.dagbag.DagBag"
   [2025-05-04, 11:04:43] INFO - Done. Returned value was: None: 
source="airflow.task.operators.airflow.providers.standard.operators.python.PythonOperator"
   [2025-05-04, 11:04:43] INFO - 2025-05-02 21:45:00+00:00 2025-05-02 
21:45:00+00:00: chan="stdout": source="task"
   ```
   
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm)
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Extending `apache/airflow:3.0.0-python3.11`
   
   
   ### Anything else?
   
   Problem occurs for all scheduled dags using the PythonOperator and a 
intraday cron expression and `@daily` cron expression. 
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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