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/12/28 08:04:37 UTC

[GitHub] XD-DENG opened a new pull request #4395: [AIRFLOW-3587] Remove unnecessary condition checks in dag_stats & task_stats

XD-DENG opened a new pull request #4395: [AIRFLOW-3587] Remove unnecessary condition checks in dag_stats & task_stats
URL: https://github.com/apache/incubator-airflow/pull/4395
 
 
   ### Jira
   
     - https://issues.apache.org/jira/browse/AIRFLOW-3587
   
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   
   These two condition checks will always pass no matter whether "all_dags" is in filter_dag_ids.
   
   **Reasoning:**
   
   - if `"all_dags" in filter_dag_ids == True`, `filter_dag_ids` will be updated into a list of all DAG IDs (no `"all_dags"` inside)
   - if `"all_dags" in filter_dag_ids == False`, `filter_dag_ids` will not be touched. It will still be a set of DAG IDs, or empty set.
   
   In either case,
   - there is no point to check whether `"all_dags"` is in `filter_dag_ids`, because for sure it will not.
   - then what's the point to check `dag_id in filter_dag_ids` in a `for loop` of `for dag_id in filter_dag_ids`?
   
   ### Code Quality
   
   - [x] Passes `flake8`

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