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

   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   Gantt view calculates the diff between start date and queued at values to 
show queued duration. In case of deferred tasks that tasks get re-queued when 
the triggerer returns an event causing queued at to be greater than start date. 
This causes incorrect values to be shown in the UI. I am not sure how to fix 
this. Maybe queued duration can be not shown on the tooltip when queued time is 
greater than start time.
   
   ![Screenshot from 2023-10-31 
09-15-54](https://github.com/apache/airflow/assets/3972343/c65e2f56-0a68-4080-9fcd-7785ca23e882)
   
   
   ### What you think should happen instead
   
   _No response_
   
   ### How to reproduce
   
   1. Trigger the below dag
   2. `touch /tmp/a` to ensure triggerer returns an event.
   3. Check for queued duration value in gantt view.
   
   ```python
   from __future__ import annotations
   
   from datetime import datetime
   
   from airflow import DAG
   from airflow.models.baseoperator import BaseOperator
   from airflow.triggers.file import FileTrigger
   
   
   class FileCheckOperator(BaseOperator):
       def __init__(self, filepath, **kwargs):
           self.filepath = filepath
           super().__init__(**kwargs)
   
       def execute(self, context):
           self.defer(
               trigger=FileTrigger(filepath=self.filepath),
               method_name="execute_complete",
           )
   
       def execute_complete(self, context, event=None):
           pass
   
   
   with DAG(
       dag_id="file_trigger",
       start_date=datetime(2021, 1, 1),
       catchup=False,
       schedule_interval=None,
   ) as dag:
       t1 = FileCheckOperator(task_id="t1", filepath="/tmp/a")
       t2 = FileCheckOperator(task_id="t2", filepath="/tmp/b")
   
       t1
       t2
   ```
   
   ### Operating System
   
   Ubuntu
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to