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 6a527c9fac Fix pre-commit for auto update of fab migration versions
(#42382)
6a527c9fac is described below
commit 6a527c9facc649b3d64f36459cd655bcb03a9cb1
Author: Ephraim Anierobi <[email protected]>
AuthorDate: Sat Sep 21 00:15:44 2024 +0100
Fix pre-commit for auto update of fab migration versions (#42382)
* Fix pre-commit for auto update of fab migration versions
This fixes the pre-commit for updating the version in FAB migration and
also, updated the actual version as 1.4 since that's going to be the next
version
At the same time, added Daniel's fix for airflow alembic.ini file
* fixup! Fix pre-commit for auto update of fab migration versions
* fixup! fixup! Fix pre-commit for auto update of fab migration versions
---
.pre-commit-config.yaml | 4 +++-
airflow/providers/fab/alembic.ini | 2 +-
airflow/providers/fab/auth_manager/models/db.py | 2 +-
...0_placeholder_migration.py => 0001_1_4_0_placeholder_migration.py} | 2 +-
docs/apache-airflow-providers-fab/migrations-ref.rst | 2 +-
5 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a356de6dec..4ca7f304d1 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -510,7 +510,9 @@ repos:
(?x)
^scripts/ci/pre_commit/version_heads_map\.py$|
^airflow/migrations/versions/.*$|^airflow/migrations/versions|
- ^airflow/utils/db.py$
+
^airflow/providers/fab/migrations/versions/.*$|^airflow/providers/fab/migrations/versions|
+ ^airflow/utils/db.py$|
+ ^airflow/providers/fab/auth_manager/models/db.py$
additional_dependencies: ['packaging','google-re2']
- id: update-version
name: Update versions in docs
diff --git a/airflow/providers/fab/alembic.ini
b/airflow/providers/fab/alembic.ini
index 55c7338f9b..75d42ee16d 100644
--- a/airflow/providers/fab/alembic.ini
+++ b/airflow/providers/fab/alembic.ini
@@ -20,7 +20,7 @@
[alembic]
# path to migration scripts
# Use forward slashes (/) also on windows to provide an os agnostic path
-script_location = migrations
+script_location = %(here)s/migrations
# template used to generate migration file names; The default value is
%%(rev)s_%%(slug)s
# Uncomment the line below if you want the files to be prepended with date and
time
diff --git a/airflow/providers/fab/auth_manager/models/db.py
b/airflow/providers/fab/auth_manager/models/db.py
index f72e1fcc65..efca4a1041 100644
--- a/airflow/providers/fab/auth_manager/models/db.py
+++ b/airflow/providers/fab/auth_manager/models/db.py
@@ -28,7 +28,7 @@ from airflow.utils.db_manager import BaseDBManager
PACKAGE_DIR = os.path.dirname(airflow.__file__)
_REVISION_HEADS_MAP: dict[str, str] = {
- "1.3.0": "6709f7a774b9",
+ "1.4.0": "6709f7a774b9",
}
diff --git
a/airflow/providers/fab/migrations/versions/0001_1_3_0_placeholder_migration.py
b/airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py
similarity index 98%
rename from
airflow/providers/fab/migrations/versions/0001_1_3_0_placeholder_migration.py
rename to
airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py
index 685216779d..722c39198a 100644
---
a/airflow/providers/fab/migrations/versions/0001_1_3_0_placeholder_migration.py
+++
b/airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py
@@ -36,7 +36,7 @@ revision = "6709f7a774b9"
down_revision = None
branch_labels = None
depends_on = None
-fab_version = "1.3.0"
+fab_version = "1.4.0"
def upgrade() -> None: ...
diff --git a/docs/apache-airflow-providers-fab/migrations-ref.rst
b/docs/apache-airflow-providers-fab/migrations-ref.rst
index dbddd6e7d4..bf27837e84 100644
--- a/docs/apache-airflow-providers-fab/migrations-ref.rst
+++ b/docs/apache-airflow-providers-fab/migrations-ref.rst
@@ -34,7 +34,7 @@ Here's the list of all the Database Migrations that are
executed via when you ru
+-------------------------+--------------+---------------+------------------------+
| Revision ID | Revises ID | Fab Version | Description
|
+=========================+==============+===============+========================+
-| ``6709f7a774b9`` (head) | ``None`` | ``1.3.0`` | placeholder
migration. |
+| ``6709f7a774b9`` (head) | ``None`` | ``1.4.0`` | placeholder
migration. |
+-------------------------+--------------+---------------+------------------------+
.. End of auto-generated table