Skip to content

Commit

Permalink
Fix pre-commit for auto update of fab migration versions
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ephraimbuddy committed Sep 20, 2024
1 parent 0d5b089 commit c4ad9a3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,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 version to the latest version in the documentation
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

0 comments on commit c4ad9a3

Please sign in to comment.