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/05/21 01:48:53 UTC

[GitHub] [airflow] chrismclennon opened a new pull request #8941: Tree view tooltip to show next execution date

chrismclennon opened a new pull request #8941:
URL: https://github.com/apache/airflow/pull/8941


   This proposed change modifies the tooltip on the Tree View to include "Next Execution Date". I've found that Airflow scheduling work at the end of a schedule interval is a common source of confusion for my users. When they see on the tree view that the "last run" was one schedule interval away from the current time, they often raise questions about why the latest run hasn't kicked off yet.
   
   I believe that showing both execution date and next execution date in this tooltip better illustrates the window of time that their Airflow task is operating on.
   
   ![airflow](https://user-images.githubusercontent.com/7297387/82514204-bea12000-9ada-11ea-8569-7f0236f0c897.png)
   
   ---
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Target Github ISSUE in description if exists -- No issue
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   


----------------------------------------------------------------
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] chrismclennon commented on pull request #8941: Tree view tooltip to show next execution date

Posted by GitBox <gi...@apache.org>.
chrismclennon commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-644450997


   I dig it. It'll now say "Following" on the 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] stale[bot] closed pull request #8941: WIP: Tree view tooltip to show following execution date

Posted by GitBox <gi...@apache.org>.
stale[bot] closed pull request #8941:
URL: https://github.com/apache/airflow/pull/8941


   


----------------------------------------------------------------
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] chrismclennon commented on pull request #8941: Tree view tooltip to show next execution date

Posted by GitBox <gi...@apache.org>.
chrismclennon commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-643076595


   It looks like CI is failing on one of the flaky tests. I'm going to ignore the CI failure unless asked to do any different. Anyone down to review?


----------------------------------------------------------------
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 pull request #8941: Tree view tooltip to show next execution date

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-644062422


   Ahh gotcha yes.
   
   Instead of "Next" how about we change it to "Following"?


----------------------------------------------------------------
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 pull request #8941: Tree view tooltip to show next execution date

Posted by GitBox <gi...@apache.org>.
ashb commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-643438323


   Having it in the tooltip for the task instances seems slightly odd.
   
   Additionally there is https://github.com/apache/airflow/pull/9052 (which I need to resume work on) that may be a better solution.


----------------------------------------------------------------
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] chrismclennon commented on a change in pull request #8941: Tree view tooltip to show following execution date

Posted by GitBox <gi...@apache.org>.
chrismclennon commented on a change in pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#discussion_r448211785



##########
File path: airflow/www/static/js/task-instances.js
##########
@@ -67,7 +67,8 @@ export default function tiTooltip(ti, {includeTryNumber = false} = {}) {
   if (ti.task_id !== undefined) {
     tt += `Task_id: ${escapeHtml(ti.task_id)}<br>`;
   }
-  tt += `Run: ${formatDateTime(ti.execution_date)}<br>`;
+  tt += `Execution Date: ${formatDateTime(ti.execution_date)}<br>`;
+  tt += `Following Execution Date: ${formatDateTime(ti.following_execution_date)}<br>`;

Review comment:
       That's a really great question. 
   
   For manual runs, it shows the following execution date, when it should be showing the same execution date.
   
   ![screen](https://user-images.githubusercontent.com/7297387/86222278-a269b780-bb4b-11ea-9c1d-ada897ea85db.png)
   
   For schedule interval of type "None", it explodes in a traceback:
   ```
   ...
     File "/opt/airflow/airflow/www/decorators.py", line 57, in wrapper
       return f(*args, **kwargs)
     File "/opt/airflow/airflow/www/views.py", line 1415, in tree
       dag_run['following_execution_date'] = dag.following_schedule(execution_date).isoformat()
   AttributeError: 'NoneType' object has no attribute 'isoformat'
   ```
   
   I'll make fixes to both and comment when done.




----------------------------------------------------------------
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] chrismclennon commented on pull request #8941: Tree view tooltip to show next execution date

Posted by GitBox <gi...@apache.org>.
chrismclennon commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-643504195


   I think tooltip makes sense if you want to see the window between `execution_date` and `next_execution_date` across a history of tasks, and Airflow encourages to have tasks operate on idempotent slices of time between these two dates. Is there a better place or way to show those windows of time?
   
   If I'm reading #9052 correctly, it shows when the DAG will next run, but it doesn't illustrate that window of time.


----------------------------------------------------------------
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] stale[bot] commented on pull request #8941: WIP: Tree view tooltip to show following execution date

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#issuecomment-674490661


   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
   


----------------------------------------------------------------
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 a change in pull request #8941: Tree view tooltip to show following execution date

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #8941:
URL: https://github.com/apache/airflow/pull/8941#discussion_r440726923



##########
File path: airflow/www/static/js/task-instances.js
##########
@@ -67,7 +67,8 @@ export default function tiTooltip(ti, {includeTryNumber = false} = {}) {
   if (ti.task_id !== undefined) {
     tt += `Task_id: ${escapeHtml(ti.task_id)}<br>`;
   }
-  tt += `Run: ${formatDateTime(ti.execution_date)}<br>`;
+  tt += `Execution Date: ${formatDateTime(ti.execution_date)}<br>`;
+  tt += `Following Execution Date: ${formatDateTime(ti.following_execution_date)}<br>`;

Review comment:
       If this is a manually triggered dag run , or one with `schedule_interval=None` it doesn't have a following date.
   
   What does this show in those cases?




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