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 2022/01/25 13:26:43 UTC

[GitHub] [airflow] jan920 opened a new issue #21095: When using deferrable operators `task_instance` is saved is saved with `start_date` equal to `end_date`

jan920 opened a new issue #21095:
URL: https://github.com/apache/airflow/issues/21095


   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### What happened
   
   When using deferrable operators `task_instance` doesn't have correct `start_date` and it is qual or close to `end_date` even when the task takes significant amount of time.
   
   For example I used operator:
   
   ```
   from airflow.sensors.time_delta import TimeDeltaSensorAsync
   import datetime
   
   job1 = TimeDeltaSensorAsync(delta=datetime.timedelta(seconds=120), task_id='job1')
   ```
   
   During the run the `Gantt` was showing correct values on frontend: 
   ![Screenshot 2022-01-25 at 14 19 22](https://user-images.githubusercontent.com/38770318/150984950-406e1d2b-3a14-4b2c-b255-773cb2b7f882.png)
   
   
   But after the run I can see that the `start_date` and `end_date` are the same.
   
   ![Screenshot 2022-01-25 at 14 20 23](https://user-images.githubusercontent.com/38770318/150985024-da5f894b-bc46-40b1-9af7-15d68a99a4a1.png)
   
   ![Screenshot 2022-01-25 at 14 20 05](https://user-images.githubusercontent.com/38770318/150985033-c4e93a53-d165-46c7-853c-164547d0516d.png)
   
   
   
   ### What you expected to happen
   
   I think `start_date` should be equal to the actual datetime when the task started.
   
   ### How to reproduce
   
   I was able to reproduce this by using following operator: 
   
   ```
   from airflow.sensors.time_delta import TimeDeltaSensorAsync
   import datetime
   
   job1 = TimeDeltaSensorAsync(delta=datetime.timedelta(seconds=120), task_id='job1')
   ```
   
   ### Operating System
   
   Darwin 21.1.0 x86_64
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### 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: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #21095: When using deferrable operators `task_instance` is saved is saved with `start_date` equal to `end_date`

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


   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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #21095: When using deferrable operators `task_instance` is saved is saved with `start_date` equal to `end_date`

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


   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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

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