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 2021/02/18 20:15:06 UTC

[GitHub] [airflow] koshy1123 opened a new issue #14299: UI: Start Date is incorrect in "DAG Details" view

koshy1123 opened a new issue #14299:
URL: https://github.com/apache/airflow/issues/14299


   **Apache Airflow version**: 2.0.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release): Ubuntu
   - **Kernel** (e.g. `uname -a`):
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   The start date in the "DAG Details" view `{AIRFLOW_URL}/dag_details?dag_id={dag_id}` is incorrect if there's a schedule for the DAG.
   
   **What you expected to happen**:
   
   Start date should be the same as the specified date in the DAG.
   
   **How to reproduce it**:
   For example, I created a DAG with a start date of `2019-07-09` but the DAG details view shows:
   ![image](https://user-images.githubusercontent.com/12819087/108415107-ee07c900-71e1-11eb-8661-79bd0288291c.png)
   
   Minimal code block to reproduce:
   ```
   from datetime import datetime, timedelta
   START_DATE = datetime(2019, 7, 9)
   DAG_ID = '*redacted*'
   dag = DAG(
       dag_id=DAG_ID,
       description='*redacted*',
       catchup=False,
       start_date=START_DATE,
       schedule_interval=timedelta(weeks=1),
       )
   start = DummyOperator(task_id='start', dag=dag)
   ```
   


----------------------------------------------------------------
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 #14299: UI: Start Date is incorrect in "DAG Details" view

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


   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] ashb closed issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   


-- 
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] ashb commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   Yeah, this is confusing terminology, rather than the wrong date being displayed.
   
   Closing this as "wont fix" for now as we are working on a new UI


-- 
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] ashb commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   Just looked at the screenshot more closely and it's showing the wrong value, yes!
   
   It's showing the start date for a dag run or task, but given the title says "DAG Details" it _should_ show the start_date of the dag.


-- 
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] uranusjr commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   This happens when `catchup=False`. The calculation mutates the DAG instance here:
   
   https://github.com/apache/airflow/blob/6690758c696562e0fd4f1858d937d43efd1fbb47/airflow/models/dag.py#L580-L584
   
   because when there’s no catchup, we don’t want to schedule the DAG for periods before the current time. So the displayed time is *logically* correct to the scheduler—the DAG won’t actually start being scheduled until the logical start date, even if the user set the value to an earlier time—but probably not what the user expects (as this issue shows).
   
   So the current start date isn’t wrong (in a sense); confusing terminology is a good description. Simply changing the start date to show the value specified by the user is also misleading IMO because the DAG detail page won’t be able to reflect `catchup=False`, and the user will be confused why the DAG is not being scheduled after the start date.


-- 
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] kurtqq commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   Possibly there is a mix.
   There are two kinds of start date in the UI.
   1. the one that you shared which should be the start_date propery as defined in the DAG.
   2. the one that showed when hovering the (i) icon int the DAG page which shows when the dag actualy ran.
   
   Since in your image it shows full timestamp I assume that it takes the same value of start_date like the one in point (2).


----------------------------------------------------------------
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] uranusjr commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   So what can we do here? One way is to explicitly store the user-defined start date (e.g. `DAG.declated_start_date`) and rename the field as **Declared start date** so it’s clearer that might not be the time the DAG *actually* started. Another is to hide the field when `catchup=False` altogether, and maybe display something else to indicate whether the DAG has started or not.


-- 
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] uranusjr commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   Yeah, that (combine with showing the DAG has `catchup=False`) is probably sufficient IMO.


-- 
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] ashb commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   Nice analysis @uranusjr -- we probably need to tweak the display in the case of catchup=False then.


-- 
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] uranusjr commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   So what can we do here? One way is to explicitly store the user-defined start date (e.g. `DAG.declated_start_date`) and rename the field as **Declared start date** so it’s clearer that might not be the time the DAG *actually* started. Another is to hide the field when `catchup=False` altogether, and maybe display something else to indicate whether the DAG has started or not.


-- 
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] ryanahamilton closed issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   


-- 
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] uranusjr edited a comment on issue #14299: UI: Start Date is incorrect in "DAG Details" view

Posted by GitBox <gi...@apache.org>.
uranusjr edited a comment on issue #14299:
URL: https://github.com/apache/airflow/issues/14299#issuecomment-852349923


   Yeah, that (combine with showing the DAG has `catchup=False`) is probably sufficient IMO. Thanks for the suggestion! I think that could be a good plan for a PR if someone wants to do it.


-- 
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] bbovenzi commented on issue #14299: UI: Start Date is incorrect in "DAG Details" view

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


   @uranusjr What would the "something else" be to indicate if a dag has started? Right now we show a count of task instances, would that be sufficient?
   
   <img width="453" alt="Screen Shot 2021-05-28 at 12 20 53 PM" src="https://user-images.githubusercontent.com/4600967/120020318-28d28780-bfaf-11eb-9403-1905a468f97a.png">
   


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