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/01 09:05:08 UTC

[GitHub] [airflow] XD-DENG opened a new pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

XD-DENG opened a new pull request #8663:
URL: https://github.com/apache/airflow/pull/8663


   This PR is to address issue https://github.com/apache/airflow/issues/8662
   
   Currently, task instances of `DummyOperators` are always marked as `SUCCESS` then immediately being skipped. Other entries like `start_date`, `end_date`, and `duration` are not marked for it in the database (in `task_instance` table in DB, `start_date`, `end_date`, and `duration` are all `NULL` for `DummyOperator` tasks).
   
   One of the issues resulted from this is that when we hover over task instances of `DummyOperator` in RBAC UI, the started and ended times are always showing the CURRENT time, instead of the the actual task started and ended time (like other operators/sensors).
   
   For details, please refer to https://github.com/apache/airflow/issues/8662
   
   ---
   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
   - [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).
   


----------------------------------------------------------------
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 edited a comment on pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

Posted by GitBox <gi...@apache.org>.
ashb edited a comment on pull request #8663:
URL: https://github.com/apache/airflow/pull/8663#issuecomment-622349314


   Probably worth another pr to fix that.
   
   (This was a bug I introduced in my UI tz work - `moment.utc(unrefined)` returns now, we didn't used to call moment at all.)


----------------------------------------------------------------
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 #8663: Persist start/end date and duration for DummyOperator Task Instance

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


   Sounds like there's also a bug in the UI code - I would have expected it to show nothing rather than current 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] XD-DENG commented on pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on pull request #8663:
URL: https://github.com/apache/airflow/pull/8663#issuecomment-622333382


   Hi @ashb , IMO as a user it's good to know when this DummyOperator task is processed by the scheduler, so showing the start/end time for DummyOperator tasks in UI is useful


----------------------------------------------------------------
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] XD-DENG commented on pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on pull request #8663:
URL: https://github.com/apache/airflow/pull/8663#issuecomment-622344999


   @ashb  you are right that the UI JS code is handling this correctly, https://github.com/apache/airflow/blob/a943d6beab473b8ec87bb8c6e43f93cc64fa1d23/airflow/www_rbac/static/js/task-instances.js#L32 and https://github.com/apache/airflow/blob/a943d6beab473b8ec87bb8c6e43f93cc64fa1d23/airflow/www_rbac/static/js/task-instances.js#L86 assumes that `ti.start_date` and `ti.end_date` are always available. While they are none, it falls back to "default" value which is current time.
   
   However I assume this is no longer an issue/bug if this PR is merged?


----------------------------------------------------------------
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 #8663: Persist start/end date and duration for DummyOperator Task Instance

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


   Oh yes absolutely.
   
   I just meant cos of the bug with the missing fields I would have expected the UI to show nothing. 


----------------------------------------------------------------
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 #8663: Persist start/end date and duration for DummyOperator Task Instance

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


   Probably worth another pr to fix that 


----------------------------------------------------------------
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] XD-DENG commented on pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on pull request #8663:
URL: https://github.com/apache/airflow/pull/8663#issuecomment-622990414


   Hi @kaxil mind taking a look when you have time? Need to merge this before I proceed to merge https://github.com/apache/airflow/pull/8667 (which has been approved already). Thanks :)


----------------------------------------------------------------
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] XD-DENG commented on pull request #8663: Persist start/end date and duration for DummyOperator Task Instance

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on pull request #8663:
URL: https://github.com/apache/airflow/pull/8663#issuecomment-622336219


   > Oh yes absolutely.
   > 
   > I just meant cos of the bug with the missing fields I would have expected the UI to show nothing.
   
   Ha, get what you mean. That's exactly the behaviour in the non-RBAC 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