You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2020/06/18 00:48:38 UTC

[airflow] branch v1-10-test updated (5e16a12 -> 2d83e77)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a change to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git.


    from 5e16a12  Fix KubernetesPodOperator pod name length validation (#8829)
     new a5434ba  Fix awkward log info in dbapi_hook (#8482)
     new 354b58e  Fix performance degradation when updating dagrun state (#8435)
     new ddbb15d  Correctly deserialize dagrun_timeout field on DAGs (#8735)
     new 2d83e77  Fix migration message (#8988)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 airflow/hooks/dbapi_hook.py                                        | 2 +-
 airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py | 2 ++
 airflow/models/dagrun.py                                           | 3 ++-
 airflow/serialization/serialized_objects.py                        | 2 +-
 tests/serialization/test_dag_serialization.py                      | 2 +-
 5 files changed, 7 insertions(+), 4 deletions(-)


[airflow] 02/04: Fix performance degradation when updating dagrun state (#8435)

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 354b58eb025673da1a15f429813d6721e534ca7b
Author: Daniel Frank <da...@airbnb.com>
AuthorDate: Sat Apr 18 11:58:37 2020 -0700

    Fix performance degradation when updating dagrun state (#8435)
    
    Co-authored-by: Dan Frank <da...@coinbase.com>
    (cherry picked from commit dd9f04e152997b7cff56920cb73c1e5b710a6f9d)
---
 airflow/models/dagrun.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/airflow/models/dagrun.py b/airflow/models/dagrun.py
index a4991d7..c5fcde5 100644
--- a/airflow/models/dagrun.py
+++ b/airflow/models/dagrun.py
@@ -300,7 +300,8 @@ class DagRun(Base, LoggingMixin):
         duration = (timezone.utcnow() - start_dttm).total_seconds() * 1000
         Stats.timing("dagrun.dependency-check.{}".format(self.dag_id), duration)
 
-        leaf_tis = [ti for ti in tis if ti.task_id in {t.task_id for t in dag.leaves}]
+        leaf_task_ids = {t.task_id for t in dag.leaves}
+        leaf_tis = [ti for ti in tis if ti.task_id in leaf_task_ids]
 
         # if all roots finished and at least one failed, the run failed
         if not unfinished_tasks and any(


[airflow] 03/04: Correctly deserialize dagrun_timeout field on DAGs (#8735)

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ddbb15d80c61486b450a51263b67c0c4413251c0
Author: Ash Berlin-Taylor <as...@firemirror.com>
AuthorDate: Wed May 6 18:33:06 2020 +0100

    Correctly deserialize dagrun_timeout field on DAGs (#8735)
    
    We weren't deserializing this correctly (it was left as a float) but
    nothing _was_ using it, and we hadn't explicitly tested it.
    
    We already have example dags with this field, so we just need to check
    for this field.
    
    (cherry picked from commit 336aa271e324574bb17cff29bee7b36e4de8e317)
---
 airflow/serialization/serialized_objects.py   | 2 +-
 tests/serialization/test_dag_serialization.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow/serialization/serialized_objects.py b/airflow/serialization/serialized_objects.py
index 3d2029a..917d80f 100644
--- a/airflow/serialization/serialized_objects.py
+++ b/airflow/serialization/serialized_objects.py
@@ -548,7 +548,7 @@ class SerializedDAG(DAG, BaseSerialization):
                 k = "task_dict"
             elif k == "timezone":
                 v = cls._deserialize_timezone(v)
-            elif k in {"retry_delay", "execution_timeout"}:
+            elif k in {"dagrun_timeout"}:
                 v = cls._deserialize_timedelta(v)
             elif k.endswith("_date"):
                 v = cls._deserialize_datetime(v)
diff --git a/tests/serialization/test_dag_serialization.py b/tests/serialization/test_dag_serialization.py
index b0c0d2e..52f6e1a 100644
--- a/tests/serialization/test_dag_serialization.py
+++ b/tests/serialization/test_dag_serialization.py
@@ -297,7 +297,7 @@ class TestStringifiedDAGs(unittest.TestCase):
             "params", "fileloc", "max_active_runs", "concurrency",
             "is_paused_upon_creation", "doc_md", "safe_dag_id", "is_subdag",
             "catchup", "description", "start_date", "end_date", "parent_dag",
-            "template_searchpath", "_access_control"
+            "template_searchpath", "_access_control", "dagrun_timeout"
         ]
 
         # fields_to_check = dag.get_serialized_fields()


[airflow] 04/04: Fix migration message (#8988)

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 2d83e7734f4f550592a7f84e252610ce7fcecf65
Author: larluo <la...@clojurians.org>
AuthorDate: Sun May 24 03:21:08 2020 +0800

    Fix migration message (#8988)
    
    (cherry picked from commit 971cae35200968ecbeea81d39846f2d8309644a0)
---
 airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py b/airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py
index dc8260a..a193f9f 100644
--- a/airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py
+++ b/airflow/migrations/versions/b3b105409875_add_root_dag_id_to_dag.py
@@ -17,9 +17,11 @@
 # under the License.
 
 """add root_dag_id to DAG
+
 Revision ID: b3b105409875
 Revises: d38e04c12aa2
 Create Date: 2019-09-28 23:20:01.744775
+
 """
 
 import sqlalchemy as sa


[airflow] 01/04: Fix awkward log info in dbapi_hook (#8482)

Posted by ka...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit a5434ba42e93b579d5ea9b9e59b3744bfaadf97c
Author: Hao Liang <le...@outlook.com>
AuthorDate: Tue Apr 21 19:50:25 2020 +0800

    Fix awkward log info in dbapi_hook (#8482)
    
    Co-authored-by: Liang Hao <li...@tesla.com>
    (cherry picked from commit 06cde6b05acca1620da97481553b120c4ffe35b6)
---
 airflow/hooks/dbapi_hook.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/hooks/dbapi_hook.py b/airflow/hooks/dbapi_hook.py
index d03d7da..218ff83 100644
--- a/airflow/hooks/dbapi_hook.py
+++ b/airflow/hooks/dbapi_hook.py
@@ -260,7 +260,7 @@ class DbApiHook(BaseHook):
                     if commit_every and i % commit_every == 0:
                         conn.commit()
                         self.log.info(
-                            "Loaded %s into %s rows so far", i, table
+                            "Loaded %s rows into %s so far", i, table
                         )
 
             conn.commit()