You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/23 07:23:04 UTC

[GitHub] [airflow] ayush1291 opened a new issue #11758: 'execution_time' for first run is not correct when, 'catchup'=False and 'schedule_interval' is using timedelta function

ayush1291 opened a new issue #11758:
URL: https://github.com/apache/airflow/issues/11758


   When trying to run a dag with `catchup=False` and `schedule_interval=timedelta(minutes=5)`. Basically, here we are using timedelta function for schedule_interval.
    Here is sample dag:
   
   ```
   dag = DAG(
       'child',
       max_active_runs=1,
       description='A sample pipeline run',
       start_date=days_ago(0),
       catchup=False,
       schedule_interval=timedelta(minutes=5)
   )
   ```
   Now, the first runs **execution_time should not have seconds and milliseconds** part. It should be 0. 
   However, we are getting wrong execution_time. It is also adding seconds and milliseconds there.
   
   <img width="999" alt="Screenshot 2020-10-23 at 11 55 38 AM" src="https://user-images.githubusercontent.com/17189579/96968222-50033b00-152e-11eb-9a1e-e31cd4222c77.png">
   
   
   As we can see in the runs, there is 5 minutes gap between schedules, which is fine. But, there is no consistency of those 5 minutes. Also, seconds and milliseconds is also not 0.
   
   Also, note that the above scenario **runs fine when we use cron (*/5 * * * *)**, instead of timedelta function. 
   


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

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



[GitHub] [airflow] kaxil closed issue #11758: 'execution_time' for first run is not correct when, 'catchup'=False and 'schedule_interval' is using timedelta function

Posted by GitBox <gi...@apache.org>.
kaxil closed issue #11758:
URL: https://github.com/apache/airflow/issues/11758


   


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

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #11758: 'execution_time' for first run is not correct when, 'catchup'=False and 'schedule_interval' is using timedelta function

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #11758:
URL: https://github.com/apache/airflow/issues/11758#issuecomment-715055759


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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

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



[GitHub] [airflow] amodig commented on issue #11758: 'execution_time' for first run is not correct when, 'catchup'=False and 'schedule_interval' is using timedelta function

Posted by GitBox <gi...@apache.org>.
amodig commented on issue #11758:
URL: https://github.com/apache/airflow/issues/11758#issuecomment-763763587


   I encountered this same problem when a DAG is initially paused. When unpaused, the first `execution_date` becomes the current time, even though it doesn't match with the `start_date` plus intervals.  I don't know if this is how it's supposed to work?
   
   But the more annoying problem is, that the behaviour cannot be apparently fixed from the UI by editing the `execution_date` manually and just re-running the dagrun. The future dagruns always have some extra seconds after the corrected `execution_date`. This seems more like a bug, that the scheduler doesn't set it correctly with the `timedelta`. This messes up e.g. all sensor tasks.


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

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



[GitHub] [airflow] kaxil commented on issue #11758: 'execution_time' for first run is not correct when, 'catchup'=False and 'schedule_interval' is using timedelta function

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #11758:
URL: https://github.com/apache/airflow/issues/11758#issuecomment-715608987


   This is how it works unfortuntaly with timedelta it is basically the first time it runs + timedelta whereas with corn it runs at that time of the day no matter when it started


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

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