You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "matthieuauger (via GitHub)" <gi...@apache.org> on 2025/04/25 15:15:02 UTC

[I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

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

   ### Apache Airflow version
   
   3.0.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Hello, this is probably a configuration issue somewhere because I don't think this could not work but this was functional with Airflow 2.8, not with Airflow 3.0 and every documentation I find tell me that current behaviour is not as expected. If this is something obvious, thanks and my apologies.
   
   I have a really simple DAG with following configuration, schedule='@daily'
   
   `@dag(
       'example_dag',
       schedule='@daily',
       start_date=datetime(2025, 4, 23),
       catchup=True,
   )
   def example_dag():
   
       @task(task_id='no_op')
       def no_op() -> List[Dict]:
           logger = LoggingMixin().log
           logger.info("no op")
   
   dag = example_dag()
   `
   
   When I activate the DAG, there are 3 scheduled runs, as expected.
   
   ![Image](https://github.com/user-attachments/assets/bd911cc4-212e-43f7-a5fd-a8c2939627f7)
   
   But data_interval_start is not set to Day-1 but to the same value that data_interval_end. This is true for every run.
   
   ![Image](https://github.com/user-attachments/assets/4958e25c-3f26-436f-b00f-72cc093739c1)
   
   ![Image](https://github.com/user-attachments/assets/10e7d340-794e-4f3b-9e2b-7900e4bafb06)
   
   ![Image](https://github.com/user-attachments/assets/b892b32c-7307-4e5c-a6e0-97f425857ed9)
   
   I tried to play with several configuration, changing to cron format, removing catchup, etc but I always have same start and end execution date. Is there something wrong with this configuration?
   
   Here is detailled configuration for a run if that can help.
   
   ### What you think should happen instead?
   
   If I put a DAG as daily and a run is scheduled, data_interval_start should be N-1, or at least data_interval_start and data_interval_end should not be equal
   
   ### How to reproduce
   
   Use the same DAG
   
   ### Operating System
   
   Docker
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] 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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

Posted by "aditya-emmanuel (via GitHub)" <gi...@apache.org>.
aditya-emmanuel commented on issue #49790:
URL: https://github.com/apache/airflow/issues/49790#issuecomment-2833086201

   Thanks for sharing! I encountered the similar issue


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

Posted by "matthieuauger (via GitHub)" <gi...@apache.org>.
matthieuauger commented on issue #49790:
URL: https://github.com/apache/airflow/issues/49790#issuecomment-2830867360

   You're right, I'm digging it and it's kind of explained:
   
   - [There](https://www.astronomer.io/docs/learn/airflow-upgrade-2-3/#changes-related-to-scheduling) it says that it used to default to CronDataIntervalTimetable, not it defaults to CronTriggerTimetable
   - [Here](https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/timetable.html#differences-between-trigger-and-data-interval-timetables) there are the differences and it is stated that data_interval_start and end are the same
   
   So it is actually intended. I made the change you proposed and it works.
   
   Closing the issue as it is *expected* behaviour but I feel it will create a lot confusion for people migrating their DAG from 2.X to 3.X


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #49790:
URL: https://github.com/apache/airflow/issues/49790#issuecomment-2830713991

   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.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

Posted by "sheikhu (via GitHub)" <gi...@apache.org>.
sheikhu commented on issue #49790:
URL: https://github.com/apache/airflow/issues/49790#issuecomment-2830841129

   Hello @matthieuauger 
   I encountered the same issue, did you try with `CronDataIntervalTimetable` ?
   
   ```
   from airflow.timetables.interval import CronDataIntervalTimetable
   CronDataIntervalTimetable("0 0 * * *")
   ```
   
   this helped me come up with the issue, but if i'm not wrong using cron as string or CronDataIntervalTimetable should produce the same result


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically [airflow]

Posted by "matthieuauger (via GitHub)" <gi...@apache.org>.
matthieuauger closed issue #49790: Data Interval End identical to Data Interval Start for DAG with interval @daily scheduled automatically
URL: https://github.com/apache/airflow/issues/49790


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org