You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/03/19 11:18:27 UTC

(airflow) branch v2-8-test updated (bcdd076200 -> 5aa424d563)

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

potiuk pushed a change to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


    from bcdd076200 Fix filtered TI links (#38274)
     new 305a516d63 Limit azure-cosmos (#38175)
     new e0192f5168 Limit importlib_resources as it breaks pytest_rewrites (#38095)
     new 5aa424d563 Fix incorrect serialisation of the FixedTimezone (#38139)

The 3 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/providers/microsoft/azure/provider.yaml |  3 ++-
 airflow/serialization/serialized_objects.py     |  2 +-
 dev/breeze/README.md                            |  2 +-
 dev/breeze/pyproject.toml                       |  3 +++
 generated/provider_dependencies.json            |  2 +-
 pyproject.toml                                  |  6 ++++--
 tests/serialization/test_dag_serialization.py   | 13 +++++++++++--
 7 files changed, 23 insertions(+), 8 deletions(-)


(airflow) 03/03: Fix incorrect serialisation of the FixedTimezone (#38139)

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

potiuk pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 5aa424d5639d0de38f09a2afbfd3c4c01a62be1c
Author: Alexander Millin <mi...@gmail.com>
AuthorDate: Sat Mar 16 14:25:20 2024 +0300

    Fix incorrect serialisation of the FixedTimezone (#38139)
    
    This issue introduced in Airflow 2.8.
    
    When the `start_date` of a DAG is specified with a fixed timezone, its serialisation will not be correct and this causes the scheduler to crash.
    
    (cherry picked from commit 0720ea08a065bd46fac3372b7ed00687078d7655)
---
 airflow/serialization/serialized_objects.py   |  2 +-
 tests/serialization/test_dag_serialization.py | 13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/airflow/serialization/serialized_objects.py b/airflow/serialization/serialized_objects.py
index 7c8906d697..81df0581b7 100644
--- a/airflow/serialization/serialized_objects.py
+++ b/airflow/serialization/serialized_objects.py
@@ -459,7 +459,7 @@ class BaseSerialization:
             return cls._encode(var.timestamp(), type_=DAT.DATETIME)
         elif isinstance(var, datetime.timedelta):
             return cls._encode(var.total_seconds(), type_=DAT.TIMEDELTA)
-        elif isinstance(var, Timezone):
+        elif isinstance(var, (Timezone, FixedTimezone)):
             return cls._encode(encode_timezone(var), type_=DAT.TIMEZONE)
         elif isinstance(var, relativedelta.relativedelta):
             return cls._encode(encode_relativedelta(var), type_=DAT.RELATIVEDELTA)
diff --git a/tests/serialization/test_dag_serialization.py b/tests/serialization/test_dag_serialization.py
index 30407eb945..06966b78c1 100644
--- a/tests/serialization/test_dag_serialization.py
+++ b/tests/serialization/test_dag_serialization.py
@@ -25,7 +25,7 @@ import json
 import multiprocessing
 import os
 import pickle
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone as dt_timezone
 from glob import glob
 from pathlib import Path
 from typing import TYPE_CHECKING
@@ -686,7 +686,16 @@ class TestStringifiedDAGs:
                 datetime(2019, 7, 30, tzinfo=timezone.utc),
                 datetime(2019, 8, 1, tzinfo=timezone.utc),
             ),
-            (pendulum.datetime(2019, 8, 1, tz="UTC"), None, pendulum.datetime(2019, 8, 1, tz="UTC")),
+            (
+                datetime(2019, 8, 1, tzinfo=dt_timezone(timedelta(hours=1))),
+                datetime(2019, 7, 30, tzinfo=dt_timezone(timedelta(hours=1))),
+                datetime(2019, 8, 1, tzinfo=dt_timezone(timedelta(hours=1))),
+            ),
+            (
+                pendulum.datetime(2019, 8, 1, tz="UTC"),
+                None,
+                pendulum.datetime(2019, 8, 1, tz="UTC"),
+            ),
         ],
     )
     def test_deserialization_start_date(self, dag_start_date, task_start_date, expected_task_start_date):


(airflow) 01/03: Limit azure-cosmos (#38175)

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

potiuk pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 305a516d636ca63b3df370f8cb8bc5764ed6e83b
Author: Elad Kalif <45...@users.noreply.github.com>
AuthorDate: Fri Mar 15 12:50:51 2024 +0200

    Limit azure-cosmos (#38175)
    
    (cherry picked from commit 832571c6f3de2bd69ab11b13877ae20f6cddf1d6)
---
 airflow/providers/microsoft/azure/provider.yaml | 3 ++-
 generated/provider_dependencies.json            | 2 +-
 pyproject.toml                                  | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/airflow/providers/microsoft/azure/provider.yaml b/airflow/providers/microsoft/azure/provider.yaml
index ffe397024d..f2240df6cf 100644
--- a/airflow/providers/microsoft/azure/provider.yaml
+++ b/airflow/providers/microsoft/azure/provider.yaml
@@ -75,7 +75,8 @@ dependencies:
   - apache-airflow>=2.6.0
   - adlfs>=2023.10.0
   - azure-batch>=8.0.0
-  - azure-cosmos>=4.0.0
+  # azure-cosmos 4.6.0 fail on mypy, limit version till we fix the issue
+  - azure-cosmos>=4.0.0,<4.6.0
   - azure-mgmt-cosmosdb
   - azure-datalake-store>=0.0.45
   - azure-identity>=1.3.1
diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json
index 7c0010eb2b..76dd3a9d12 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -686,7 +686,7 @@
       "adlfs>=2023.10.0",
       "apache-airflow>=2.6.0",
       "azure-batch>=8.0.0",
-      "azure-cosmos>=4.0.0",
+      "azure-cosmos>=4.0.0,<4.6.0",
       "azure-datalake-store>=0.0.45",
       "azure-identity>=1.3.1",
       "azure-keyvault-secrets>=4.1.0",
diff --git a/pyproject.toml b/pyproject.toml
index 2a3cac3008..d673d7b613 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -798,7 +798,7 @@ microsoft-azure = [ # source: airflow/providers/microsoft/azure/provider.yaml
   "adal>=1.2.7",
   "adlfs>=2023.10.0",
   "azure-batch>=8.0.0",
-  "azure-cosmos>=4.0.0",
+  "azure-cosmos>=4.0.0,<4.6.0",
   "azure-datalake-store>=0.0.45",
   "azure-identity>=1.3.1",
   "azure-keyvault-secrets>=4.1.0",


(airflow) 02/03: Limit importlib_resources as it breaks pytest_rewrites (#38095)

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

potiuk pushed a commit to branch v2-8-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit e0192f5168fff98af95cfcda3a21224f321d3b27
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Wed Mar 13 09:05:24 2024 +0100

    Limit importlib_resources as it breaks pytest_rewrites (#38095)
    
    New version of importlib_resources released today - 6.2.0 but also 6.3.0
    released few hours later, break pytest_rewrite feature in rather
    unexpected ways. Until the problem is diagnosed and solved we should
    limit it. The issue is tracked in
    https://github.com/python/importlib_resources/issues/299
    
    (cherry picked from commit 7ec2407e7f50251fff4359ffe7109dd8dc360f24)
---
 dev/breeze/README.md      | 2 +-
 dev/breeze/pyproject.toml | 3 +++
 pyproject.toml            | 4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dev/breeze/README.md b/dev/breeze/README.md
index a6e6419c36..ae93bd0f90 100644
--- a/dev/breeze/README.md
+++ b/dev/breeze/README.md
@@ -66,6 +66,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.
 
 ---------------------------------------------------------------------------------------------------------
 
-Package config hash: e2db123fd25e40b515520fb9f6ed32a601fe85e6a22b9845343bc5c81e5785b472527ed3bf6d07521c512d2222f99877a1ce1911ac504a3a6af7b7866aa674cc
+Package config hash: eef72be47311fa0b1f3d73e41696365989da51a76db970c2dd012f50f1ad04f1ec97e7c9679b682159aab7fc48785ca8df9422cc57620963f246f6c9d0701f1a
 
 ---------------------------------------------------------------------------------------------------------
diff --git a/dev/breeze/pyproject.toml b/dev/breeze/pyproject.toml
index 5a43c3b560..b585a92a13 100644
--- a/dev/breeze/pyproject.toml
+++ b/dev/breeze/pyproject.toml
@@ -51,6 +51,9 @@ dependencies = [
     "flit>=3.5.0",
     "gitpython>=3.1.40",
     "hatch==1.9.1",
+    # Importib_resources 6.2.0 break pytest_rewrite
+    # see https://github.com/python/importlib_resources/issues/299
+    "importlib_resources>=5.2,<6.2.0;python_version<\"3.9\"",
     "inputimeout>=1.0.4",
     "jinja2>=3.1.0",
     "jsonschema>=4.19.1",
diff --git a/pyproject.toml b/pyproject.toml
index d673d7b613..88742db9fe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -107,7 +107,9 @@ dependencies = [
     "gunicorn>=20.1.0",
     "httpx",
     "importlib_metadata>=1.7;python_version<\"3.9\"",
-    "importlib_resources>=5.2;python_version<\"3.9\"",
+    # Importib_resources 6.2.0 break pytest_rewrite
+    # see https://github.com/python/importlib_resources/issues/299
+    "importlib_resources>=5.2,<6.2.0;python_version<\"3.9\"",
     "itsdangerous>=2.0",
     "jinja2>=3.0.0",
     "jsonschema>=4.18.0",