Skip to content

Commit

Permalink
Fix pre-commit for auto update of fab migration versions (#42382)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ephraimbuddy committed Sep 20, 2024
1 parent 8741e9c commit 6a527c9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/fab/alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/fab/auth_manager/models/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
PACKAGE_DIR = os.path.dirname(airflow.__file__)

_REVISION_HEADS_MAP: dict[str, str] = {
"1.3.0": "6709f7a774b9",
"1.4.0": "6709f7a774b9",
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
down_revision = None
branch_labels = None
depends_on = None
fab_version = "1.3.0"
fab_version = "1.4.0"


def upgrade() -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow-providers-fab/migrations-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6a527c9

Please sign in to comment.