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 2018/08/06 06:28:42 UTC

[GitHub] ubermen opened a new pull request #3667: [AIRFLOW-1298] Add clear option 'only_failed_or_upstream_failed'

ubermen opened a new pull request #3667: [AIRFLOW-1298] Add clear option 'only_failed_or_upstream_failed'
URL: https://github.com/apache/incubator-airflow/pull/3667
 
 
   ### JIRA
   - [x] My PR addresses the following [Airflow Jira]
   - https://issues.apache.org/jira/browse/AIRFLOW-1298
   
   ### Description
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   In my operations team, it is necessary to clear all tasks in one command line (because of so many schedules should be reprocessed cause of some reasons)
   But, 'clear -cdf ...' is only clearing failed tasks without upstream_failed. It is not fit for our operator's needs.
   So, I want to add new options to clear failed or upstream_failed jobs all at once.
   
   
   ### Tests
   - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   1. clear only one schedule of this task : airflow clear -cp -s 2018-07-22T05:00:00 -e 2018-07-22T05:00:00 -t ^task_name$ schedule_name
   2. clear only multiple schedules of this task : airflow clear -cp -s 2018-07-22T05:00:00 -e 2018-07-22T09:00:00 -t ^task_name$ schedule_name
   3. clear multiple schedules of this task with downstream : airflow clear -cdp -s 2018-07-22T05:00:00 -e 2018-07-22T09:00:00 -t ^task_name$ schedule_name
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   - [x] In case of new functionality, my PR adds documentation that describes how to use it.
   new option of clear command
   option is 'p' of upstream_failed's p character.
   Usage sample is like below :
   airflow clear -cdp -s 2018-07-22T05:00:00 -e 2018-07-22T09:00:00 -t ^task_name$ schedule_name
   
   ### Code Quality
   
   - [x] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services