Repository: incubator-airflow Updated Branches: refs/heads/master bb0d9ee19 -> 726dc9a21
[AIRFLOW-2429] Fix security/task/sensors/ti_deps folders flake8 error Closes #3501 from feng-tao/flake8_p7 Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/726dc9a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/726dc9a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/726dc9a2 Branch: refs/heads/master Commit: 726dc9a21909f93509efcb2494e74dc24f668078 Parents: bb0d9ee Author: Tao feng <[email protected]> Authored: Fri Jun 15 11:34:02 2018 +0200 Committer: Fokko Driesprong <[email protected]> Committed: Fri Jun 15 11:34:02 2018 +0200 ---------------------------------------------------------------------- airflow/security/__init__.py | 5 ++--- airflow/security/utils.py | 3 ++- airflow/sensors/__init__.py | 4 ++-- airflow/sensors/base_sensor_operator.py | 4 ++-- airflow/sensors/external_task_sensor.py | 4 ++-- airflow/sensors/hdfs_sensor.py | 4 ++-- airflow/sensors/hive_partition_sensor.py | 4 ++-- airflow/sensors/http_sensor.py | 4 ++-- airflow/sensors/metastore_partition_sensor.py | 4 ++-- airflow/sensors/s3_key_sensor.py | 4 ++-- airflow/sensors/s3_prefix_sensor.py | 4 ++-- airflow/sensors/sql_sensor.py | 4 ++-- airflow/sensors/time_delta_sensor.py | 4 ++-- airflow/sensors/time_sensor.py | 4 ++-- airflow/sensors/web_hdfs_sensor.py | 4 ++-- airflow/task/__init__.py | 4 ++-- airflow/task/task_runner/__init__.py | 4 ++-- airflow/task/task_runner/base_task_runner.py | 5 +++-- airflow/task/task_runner/bash_task_runner.py | 4 ++-- airflow/ti_deps/__init__.py | 4 ++-- airflow/ti_deps/dep_context.py | 6 ++++-- airflow/ti_deps/deps/__init__.py | 4 ++-- airflow/ti_deps/deps/base_ti_dep.py | 5 +++-- airflow/ti_deps/deps/dag_ti_slots_available_dep.py | 5 +++-- airflow/ti_deps/deps/dag_unpaused_dep.py | 5 +++-- airflow/ti_deps/deps/dagrun_exists_dep.py | 5 +++-- airflow/ti_deps/deps/exec_date_after_start_date_dep.py | 5 +++-- airflow/ti_deps/deps/not_in_retry_period_dep.py | 4 ++-- airflow/ti_deps/deps/not_running_dep.py | 5 +++-- airflow/ti_deps/deps/not_skipped_dep.py | 5 +++-- airflow/ti_deps/deps/prev_dagrun_dep.py | 5 +++-- airflow/ti_deps/deps/runnable_exec_date_dep.py | 4 ++-- airflow/ti_deps/deps/task_concurrency_dep.py | 11 +++++++---- airflow/ti_deps/deps/trigger_rule_dep.py | 7 ++++--- airflow/ti_deps/deps/valid_state_dep.py | 5 +++-- 35 files changed, 89 insertions(+), 73 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/security/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/security/__init__.py b/airflow/security/__init__.py index f0f8b68..114d189 100644 --- a/airflow/security/__init__.py +++ b/airflow/security/__init__.py @@ -7,13 +7,12 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/security/utils.py ---------------------------------------------------------------------- diff --git a/airflow/security/utils.py b/airflow/security/utils.py index 24d823b..8e4fcbd 100644 --- a/airflow/security/utils.py +++ b/airflow/security/utils.py @@ -32,7 +32,8 @@ def get_kerberos_principal(principal, host): return principal else: if not host: - raise IOError("Can't replace %s pattern since host is null." % HOSTNAME_PATTERN) + raise IOError("Can't replace %s pattern " + "since host is null." % HOSTNAME_PATTERN) return replace_hostname_pattern(components, host) http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/__init__.py b/airflow/sensors/__init__.py index fb70870..b9d1dbb 100644 --- a/airflow/sensors/__init__.py +++ b/airflow/sensors/__init__.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/base_sensor_operator.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/base_sensor_operator.py b/airflow/sensors/base_sensor_operator.py index cb7b3fb..45e4a52 100644 --- a/airflow/sensors/base_sensor_operator.py +++ b/airflow/sensors/base_sensor_operator.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/external_task_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/external_task_sensor.py b/airflow/sensors/external_task_sensor.py index 0560d02..eda1a2d 100644 --- a/airflow/sensors/external_task_sensor.py +++ b/airflow/sensors/external_task_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/hdfs_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/hdfs_sensor.py b/airflow/sensors/hdfs_sensor.py index e5a71f0..c9bac08 100644 --- a/airflow/sensors/hdfs_sensor.py +++ b/airflow/sensors/hdfs_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/hive_partition_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/hive_partition_sensor.py b/airflow/sensors/hive_partition_sensor.py index 1277848..c8eddc3 100644 --- a/airflow/sensors/hive_partition_sensor.py +++ b/airflow/sensors/hive_partition_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/http_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/http_sensor.py b/airflow/sensors/http_sensor.py index a90b5cb..33f8531 100644 --- a/airflow/sensors/http_sensor.py +++ b/airflow/sensors/http_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/metastore_partition_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/metastore_partition_sensor.py b/airflow/sensors/metastore_partition_sensor.py index a9bcdba..6cb9fd2 100644 --- a/airflow/sensors/metastore_partition_sensor.py +++ b/airflow/sensors/metastore_partition_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/s3_key_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/s3_key_sensor.py b/airflow/sensors/s3_key_sensor.py index ae811c0..fa2eb78 100644 --- a/airflow/sensors/s3_key_sensor.py +++ b/airflow/sensors/s3_key_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/s3_prefix_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/s3_prefix_sensor.py b/airflow/sensors/s3_prefix_sensor.py index e831000..917dd46 100644 --- a/airflow/sensors/s3_prefix_sensor.py +++ b/airflow/sensors/s3_prefix_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/sql_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/sql_sensor.py b/airflow/sensors/sql_sensor.py index ee42c2c..e9208fa 100644 --- a/airflow/sensors/sql_sensor.py +++ b/airflow/sensors/sql_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/time_delta_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/time_delta_sensor.py b/airflow/sensors/time_delta_sensor.py index 51c6a7f..4ae807b 100644 --- a/airflow/sensors/time_delta_sensor.py +++ b/airflow/sensors/time_delta_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/time_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/time_sensor.py b/airflow/sensors/time_sensor.py index 6e61f61..0c39235 100644 --- a/airflow/sensors/time_sensor.py +++ b/airflow/sensors/time_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/sensors/web_hdfs_sensor.py ---------------------------------------------------------------------- diff --git a/airflow/sensors/web_hdfs_sensor.py b/airflow/sensors/web_hdfs_sensor.py index c51b7fe..67b1d38 100644 --- a/airflow/sensors/web_hdfs_sensor.py +++ b/airflow/sensors/web_hdfs_sensor.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/task/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/task/__init__.py b/airflow/task/__init__.py index 4067cc7..114d189 100644 --- a/airflow/task/__init__.py +++ b/airflow/task/__init__.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/task/task_runner/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/task/task_runner/__init__.py b/airflow/task/task_runner/__init__.py index f2820c7..0edc020 100644 --- a/airflow/task/task_runner/__init__.py +++ b/airflow/task/task_runner/__init__.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/task/task_runner/base_task_runner.py ---------------------------------------------------------------------- diff --git a/airflow/task/task_runner/base_task_runner.py b/airflow/task/task_runner/base_task_runner.py index 20e633e..337f6a6 100644 --- a/airflow/task/task_runner/base_task_runner.py +++ b/airflow/task/task_runner/base_task_runner.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from __future__ import unicode_literals import getpass http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/task/task_runner/bash_task_runner.py ---------------------------------------------------------------------- diff --git a/airflow/task/task_runner/bash_task_runner.py b/airflow/task/task_runner/bash_task_runner.py index 826fc19..4ddcac5 100644 --- a/airflow/task/task_runner/bash_task_runner.py +++ b/airflow/task/task_runner/bash_task_runner.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/__init__.py b/airflow/ti_deps/__init__.py index 4067cc7..114d189 100644 --- a/airflow/ti_deps/__init__.py +++ b/airflow/ti_deps/__init__.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/dep_context.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/dep_context.py b/airflow/ti_deps/dep_context.py index 034393c..6d39998 100644 --- a/airflow/ti_deps/dep_context.py +++ b/airflow/ti_deps/dep_context.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.dag_ti_slots_available_dep import DagTISlotsAvailableDep from airflow.ti_deps.deps.dag_unpaused_dep import DagUnpausedDep from airflow.ti_deps.deps.dagrun_exists_dep import DagrunRunningDep @@ -80,6 +81,7 @@ class DepContext(object): self.ignore_task_deps = ignore_task_deps self.ignore_ti_state = ignore_ti_state + # In order to be able to get queued a task must have one of these states QUEUEABLE_STATES = { State.FAILED, http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/__init__.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/__init__.py b/airflow/ti_deps/deps/__init__.py index 4067cc7..114d189 100644 --- a/airflow/ti_deps/deps/__init__.py +++ b/airflow/ti_deps/deps/__init__.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/base_ti_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/base_ti_dep.py b/airflow/ti_deps/deps/base_ti_dep.py index d444faf..90c156c 100644 --- a/airflow/ti_deps/deps/base_ti_dep.py +++ b/airflow/ti_deps/deps/base_ti_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from collections import namedtuple from airflow.utils.db import provide_session http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/dag_ti_slots_available_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/dag_ti_slots_available_dep.py b/airflow/ti_deps/deps/dag_ti_slots_available_dep.py index c3245eb..993e147 100644 --- a/airflow/ti_deps/deps/dag_ti_slots_available_dep.py +++ b/airflow/ti_deps/deps/dag_ti_slots_available_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/dag_unpaused_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/dag_unpaused_dep.py b/airflow/ti_deps/deps/dag_unpaused_dep.py index adf150f..c900bad 100644 --- a/airflow/ti_deps/deps/dag_unpaused_dep.py +++ b/airflow/ti_deps/deps/dag_unpaused_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/dagrun_exists_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/dagrun_exists_dep.py b/airflow/ti_deps/deps/dagrun_exists_dep.py index afa3d97..5c0772c 100644 --- a/airflow/ti_deps/deps/dagrun_exists_dep.py +++ b/airflow/ti_deps/deps/dagrun_exists_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session from airflow.utils.state import State http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/exec_date_after_start_date_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/exec_date_after_start_date_dep.py b/airflow/ti_deps/deps/exec_date_after_start_date_dep.py index 9a9c89f..d14dad0 100644 --- a/airflow/ti_deps/deps/exec_date_after_start_date_dep.py +++ b/airflow/ti_deps/deps/exec_date_after_start_date_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/not_in_retry_period_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/not_in_retry_period_dep.py b/airflow/ti_deps/deps/not_in_retry_period_dep.py index 91c99f0..e168ecb 100644 --- a/airflow/ti_deps/deps/not_in_retry_period_dep.py +++ b/airflow/ti_deps/deps/not_in_retry_period_dep.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/not_running_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/not_running_dep.py b/airflow/ti_deps/deps/not_running_dep.py index 459d4bd..6fa04f8 100644 --- a/airflow/ti_deps/deps/not_running_dep.py +++ b/airflow/ti_deps/deps/not_running_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session from airflow.utils.state import State http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/not_skipped_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/not_skipped_dep.py b/airflow/ti_deps/deps/not_skipped_dep.py index 5b2c0b2..f40eef6 100644 --- a/airflow/ti_deps/deps/not_skipped_dep.py +++ b/airflow/ti_deps/deps/not_skipped_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session from airflow.utils.state import State http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/prev_dagrun_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/prev_dagrun_dep.py b/airflow/ti_deps/deps/prev_dagrun_dep.py index 2dd311f..ed01834 100644 --- a/airflow/ti_deps/deps/prev_dagrun_dep.py +++ b/airflow/ti_deps/deps/prev_dagrun_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session from airflow.utils.state import State http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/runnable_exec_date_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/runnable_exec_date_dep.py b/airflow/ti_deps/deps/runnable_exec_date_dep.py index c8d033f..d797859 100644 --- a/airflow/ti_deps/deps/runnable_exec_date_dep.py +++ b/airflow/ti_deps/deps/runnable_exec_date_dep.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/task_concurrency_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/task_concurrency_dep.py b/airflow/ti_deps/deps/task_concurrency_dep.py index 8a9f82b..bc96dd2 100644 --- a/airflow/ti_deps/deps/task_concurrency_dep.py +++ b/airflow/ti_deps/deps/task_concurrency_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session @@ -35,8 +36,10 @@ class TaskConcurrencyDep(BaseTIDep): return if ti.get_num_running_task_instances(session) >= ti.task.task_concurrency: - yield self._failing_status(reason="The max task concurrency has been reached.") + yield self._failing_status(reason="The max task concurrency " + "has been reached.") return else: - yield self._passing_status(reason="The max task concurrency has not been reached.") + yield self._passing_status(reason="The max task concurrency " + "has not been reached.") return http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/trigger_rule_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/trigger_rule_dep.py b/airflow/ti_deps/deps/trigger_rule_dep.py index 7a39419..76e5e13 100644 --- a/airflow/ti_deps/deps/trigger_rule_dep.py +++ b/airflow/ti_deps/deps/trigger_rule_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from sqlalchemy import case, func import airflow @@ -191,7 +192,7 @@ class TriggerRuleDep(BaseTIDep): "tasks to have completed, but found {1} task(s) that " "weren't done. upstream_tasks_state={2}, " "upstream_task_ids={3}" - .format(tr, upstream-done, upstream_tasks_state, + .format(tr, upstream_done, upstream_tasks_state, task.upstream_task_ids)) else: yield self._failing_status( http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/726dc9a2/airflow/ti_deps/deps/valid_state_dep.py ---------------------------------------------------------------------- diff --git a/airflow/ti_deps/deps/valid_state_dep.py b/airflow/ti_deps/deps/valid_state_dep.py index 67e2888..478fceb 100644 --- a/airflow/ti_deps/deps/valid_state_dep.py +++ b/airflow/ti_deps/deps/valid_state_dep.py @@ -7,15 +7,16 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + from airflow.exceptions import AirflowException from airflow.ti_deps.deps.base_ti_dep import BaseTIDep from airflow.utils.db import provide_session
