alexbegg edited a comment on pull request #10556:
URL: https://github.com/apache/airflow/pull/10556#issuecomment-682991309


   > @ryw not sure how they could diverge given they sue the same data value. 
Is that from an older Airflow version? The different/shorter formatting of the 
the tooltip date stands out to me.
   
   @ryanahamilton and @ryw I found the issue/mixup. Yes they diverge in airflow 
1.10.x if RBAC UI disabled (one is `execution_date`, one is `start_date`), but 
they are the same if RBAC UI is enabled (both `execution_date`). I think I know 
how to fix it in the RBAC UI to be different values again so I'll make a PR 
(see the end of this comment)
   
   - For the old Non-RBAC UI while they are both derived off of the "last run" 
they are definitely two different properties. The timestamp shown directly in 
the column is `last_run.execution_date` (line 111), whereas the timestamp in 
the (i) tooltip is `last_run.start_date` (line 114): 
https://github.com/apache/airflow/blob/836f717d316d6b20bc2f2bc07d781dd332618471/airflow/www/templates/airflow/dags.html#L107-L116
   
   - For the newer RBAC UI the two values are the same. See the `last_run` 
variable (defined on line 366) used in both places, for both the link's text 
(line 370) as well as the (i)'s (`span`) tooltip (line 373): 
https://github.com/apache/airflow/blob/836f717d316d6b20bc2f2bc07d781dd332618471/airflow/www_rbac/templates/airflow/dags.html#L363-L378
   
   I found out it was the commit that changed the DAGs view to have the latest 
DAG runs be loaded asynchronously that might have inadvertently changed both 
dates to the the same value: 
https://github.com/apache/airflow/commit/ba9c035a851bdabc9324a1fa3eb372b0422b784a
   
   I found the source of the json passed to the `lastDagRunsHandler` function 
for RBAC UI, and if we also pass the `start_date` value in that json then we 
can fix the (i) tooltip to actually use the `start_date`. I am going to make a 
seperate PR to fix this after some testing:
   
https://github.com/apache/airflow/blob/836f717d316d6b20bc2f2bc07d781dd332618471/airflow/www_rbac/views.py#L524-L537


----------------------------------------------------------------
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:
[email protected]


Reply via email to