This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 8b1fe82da97 update airflow_version in asset_watcher migration to 3.2.0
(#55902)
8b1fe82da97 is described below
commit 8b1fe82da97dbe051aa562c6b4a18e5153d02f22
Author: Deji Ibrahim <[email protected]>
AuthorDate: Sat Sep 20 07:33:52 2025 +0100
update airflow_version in asset_watcher migration to 3.2.0 (#55902)
* update airflow_version in asset_watcher migration
* handle version compat
---
airflow-core/docs/img/airflow_erd.sha256 | 2 +-
airflow-core/docs/migrations-ref.rst | 2 +-
...sset.py => 0085_3_2_0_replace_asset_trigger_table_with_asset.py} | 2 +-
airflow-core/src/airflow/utils/db.py | 3 ++-
devel-common/src/tests_common/test_utils/db.py | 6 +++---
devel-common/src/tests_common/test_utils/version_compat.py | 2 ++
6 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/airflow-core/docs/img/airflow_erd.sha256
b/airflow-core/docs/img/airflow_erd.sha256
index 3aec734927a..cae4f78509c 100644
--- a/airflow-core/docs/img/airflow_erd.sha256
+++ b/airflow-core/docs/img/airflow_erd.sha256
@@ -1 +1 @@
-8d036059b5c850d397a63fad98cad37d2a9f2222c05714d45de9b2a7d2bd7a85
\ No newline at end of file
+ebc15a6ad6529f10a59633d8adff009dd3b526e6a97f1b578436c275b98e177b
\ No newline at end of file
diff --git a/airflow-core/docs/migrations-ref.rst
b/airflow-core/docs/migrations-ref.rst
index 511fcedcf5d..c39e22f39cb 100644
--- a/airflow-core/docs/migrations-ref.rst
+++ b/airflow-core/docs/migrations-ref.rst
@@ -39,7 +39,7 @@ Here's the list of all the Database Migrations that are
executed via when you ru
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
| Revision ID | Revises ID | Airflow Version | Description
|
+=========================+==================+===================+==============================================================+
-| ``15d84ca19038`` (head) | ``eaf332f43c7c`` | ``3.1.0`` | replace
asset_trigger table with asset_watcher. |
+| ``15d84ca19038`` (head) | ``eaf332f43c7c`` | ``3.2.0`` | replace
asset_trigger table with asset_watcher. |
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
| ``eaf332f43c7c`` | ``a3c7f2b18d4e`` | ``3.1.0`` | add
last_parse_duration to dag model. |
+-------------------------+------------------+-------------------+--------------------------------------------------------------+
diff --git
a/airflow-core/src/airflow/migrations/versions/0085_3_1_0_replace_asset_trigger_table_with_asset.py
b/airflow-core/src/airflow/migrations/versions/0085_3_2_0_replace_asset_trigger_table_with_asset.py
similarity index 99%
rename from
airflow-core/src/airflow/migrations/versions/0085_3_1_0_replace_asset_trigger_table_with_asset.py
rename to
airflow-core/src/airflow/migrations/versions/0085_3_2_0_replace_asset_trigger_table_with_asset.py
index f3238379a83..6ff03981054 100644
---
a/airflow-core/src/airflow/migrations/versions/0085_3_1_0_replace_asset_trigger_table_with_asset.py
+++
b/airflow-core/src/airflow/migrations/versions/0085_3_2_0_replace_asset_trigger_table_with_asset.py
@@ -35,7 +35,7 @@ revision = "15d84ca19038"
down_revision = "eaf332f43c7c"
branch_labels = None
depends_on = None
-airflow_version = "3.1.0"
+airflow_version = "3.2.0"
_STRING_COLUMN_TYPE = sa.String(length=1500).with_variant(
sa.String(length=1500, collation="latin1_general_cs"),
diff --git a/airflow-core/src/airflow/utils/db.py
b/airflow-core/src/airflow/utils/db.py
index cb9d0837d9e..99d5ff97914 100644
--- a/airflow-core/src/airflow/utils/db.py
+++ b/airflow-core/src/airflow/utils/db.py
@@ -110,7 +110,8 @@ _REVISION_HEADS_MAP: dict[str, str] = {
"2.10.3": "5f2621c13b39",
"3.0.0": "29ce7909c52b",
"3.0.3": "fe199e1abd77",
- "3.1.0": "15d84ca19038",
+ "3.1.0": "eaf332f43c7c",
+ "3.2.0": "15d84ca19038",
}
diff --git a/devel-common/src/tests_common/test_utils/db.py
b/devel-common/src/tests_common/test_utils/db.py
index 6ee91553fee..9e8f729a9f8 100644
--- a/devel-common/src/tests_common/test_utils/db.py
+++ b/devel-common/src/tests_common/test_utils/db.py
@@ -60,7 +60,7 @@ from tests_common.test_utils.compat import (
ParseImportError,
TaskOutletAssetReference,
)
-from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS,
AIRFLOW_V_3_1_PLUS
+from tests_common.test_utils.version_compat import AIRFLOW_V_3_0_PLUS,
AIRFLOW_V_3_1_PLUS, AIRFLOW_V_3_2_PLUS
if TYPE_CHECKING:
from pathlib import Path
@@ -229,7 +229,7 @@ def clear_db_assets():
session.query(AssetActive).delete()
session.query(DagScheduleAssetNameReference).delete()
session.query(DagScheduleAssetUriReference).delete()
- if AIRFLOW_V_3_1_PLUS:
+ if AIRFLOW_V_3_2_PLUS:
from airflow.models.asset import AssetWatcherModel
session.query(AssetWatcherModel).delete()
@@ -237,7 +237,7 @@ def clear_db_assets():
def clear_db_triggers():
with create_session() as session:
- if AIRFLOW_V_3_1_PLUS:
+ if AIRFLOW_V_3_2_PLUS:
from airflow.models.asset import AssetWatcherModel
session.query(AssetWatcherModel).delete()
diff --git a/devel-common/src/tests_common/test_utils/version_compat.py
b/devel-common/src/tests_common/test_utils/version_compat.py
index 50d50d2a1cc..bf696fe4b80 100644
--- a/devel-common/src/tests_common/test_utils/version_compat.py
+++ b/devel-common/src/tests_common/test_utils/version_compat.py
@@ -36,6 +36,7 @@ AIRFLOW_V_3_0_1 = get_base_airflow_version_tuple() == (3, 0,
1)
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
AIRFLOW_V_3_0_3_PLUS = get_base_airflow_version_tuple() >= (3, 0, 3)
AIRFLOW_V_3_1_PLUS = get_base_airflow_version_tuple() >= (3, 1, 0)
+AIRFLOW_V_3_2_PLUS = get_base_airflow_version_tuple() >= (3, 2, 0)
if AIRFLOW_V_3_1_PLUS:
@@ -67,6 +68,7 @@ __all__ = [
"AIRFLOW_V_3_0_PLUS",
"AIRFLOW_V_3_0_1",
"AIRFLOW_V_3_1_PLUS",
+ "AIRFLOW_V_3_2_PLUS",
"SQLALCHEMY_V_1_4",
"SQLALCHEMY_V_2_0",
"XCOM_RETURN_KEY",