Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/actions/migration_tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,12 @@ runs:
airflow db migrate --to-revision heads &&
airflow db downgrade -n 2.7.0 -y &&
airflow db migrate
# migration tests cannot be run with Python 3.13 now - currently we have no FAB and no FABDBManager -
# and airflow (correctly) refuses to migrate things to Airflow 2 when there is no "ab_user"
# table created. So migration tests for now will have to be excluded for Python 3.13 until
# we start working on 3.2 (with migration to 3.1) or until FAB is supported in 3.13 (FAB 5)
# TODO(potiuk) bring migration tests back for Python 3.13 when one of the two conditions are fulfilled
if: env.BACKEND != 'sqlite' && inputs.python-version != '3.13'
if: env.BACKEND != 'sqlite'
- name: "Bring composer down"
shell: bash
run: breeze down
env:
COMPOSE_PROJECT_NAME: "docker-compose"
if: inputs.python-version != '3.13'
- name: "Test ORM migration 2 to 3: ${{env.BACKEND}}"
shell: bash
run: >
Expand All @@ -70,13 +64,12 @@ runs:
airflow db migrate --to-revision heads &&
airflow db downgrade -n 2.7.0 -y &&
airflow db migrate
if: env.BACKEND != 'sqlite' && inputs.python-version != '3.13'
if: env.BACKEND != 'sqlite'
- name: "Bring compose down again"
shell: bash
run: breeze down
env:
COMPOSE_PROJECT_NAME: "docker-compose"
if: inputs.python-version != '3.13'
- name: "Test ORM migration ${{env.BACKEND}}"
shell: bash
run: >
Expand All @@ -88,13 +81,11 @@ runs:
env:
COMPOSE_PROJECT_NAME: "docker-compose"
DB_MANAGERS: "airflow.providers.fab.auth_manager.models.db.FABDBManager"
if: inputs.python-version != '3.13'
- name: "Bring compose down again"
shell: bash
run: breeze down
env:
COMPOSE_PROJECT_NAME: "docker-compose"
if: inputs.python-version != '3.13'
- name: "Test offline migration ${{env.BACKEND}}"
shell: bash
run: >
Expand All @@ -106,13 +97,12 @@ runs:
env:
COMPOSE_PROJECT_NAME: "docker-compose"
DB_MANAGERS: "airflow.providers.fab.auth_manager.models.db.FABDBManager"
if: env.BACKEND != 'sqlite' && inputs.python-version != '3.13'
if: env.BACKEND != 'sqlite'
- name: "Bring any containers left down"
shell: bash
run: breeze down
env:
COMPOSE_PROJECT_NAME: "docker-compose"
if: inputs.python-version != '3.13'
- name: "Dump logs on failure ${{env.BACKEND}}"
shell: bash
run: docker ps -q | xargs docker logs
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/prod-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,6 @@ jobs:
with:
name: prod-packages
path: ./docker-context-files
- name: "Remove fab provider for python 3.13"
shell: bash
run: rm -vf ./docker-context-files/apache_airflow_providers_fab-*.whl
if: matrix.python-version == '3.13'
- name: "Show downloaded packages"
run: ls -la ./docker-context-files
- name: "Download constraints"
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/special-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,7 @@ jobs:
test-scope: "DB"
test-group: "core"
backend: "postgres"
# The python version constraint is a TEMPORARY WORKAROUND to exclude all FAB tests. It should be
# removed after upgrading FAB to v5 (PR #50960). The setting below should be:
# "['${{ inputs.default-python-version }}']"
python-versions: "['3.13']"
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
Expand All @@ -164,7 +161,6 @@ jobs:
skip-providers-tests: ${{ inputs.skip-providers-tests }}
use-uv: ${{ inputs.use-uv }}
default-branch: ${{ inputs.default-branch }}
if: contains(fromJSON(inputs.python-versions), '3.13') # Remove this line after upgrading FAB to v5

tests-latest-sqlalchemy-providers:
name: "Latest SQLAlchemy test: providers"
Expand All @@ -180,10 +176,7 @@ jobs:
test-scope: "DB"
test-group: "providers"
backend: "postgres"
# The python version constraint is a TEMPORARY WORKAROUND to exclude all FAB tests. It should be
# removed after upgrading FAB to v5 (PR #50960). The setting below should be:
# "['${{ inputs.default-python-version }}']"
python-versions: "['3.13']"
python-versions: "['${{ inputs.default-python-version }}']"
backend-versions: "['${{ inputs.default-postgres-version }}']"
excluded-providers-as-string: ${{ inputs.excluded-providers-as-string }}
excludes: "[]"
Expand All @@ -193,7 +186,6 @@ jobs:
skip-providers-tests: ${{ inputs.skip-providers-tests }}
use-uv: ${{ inputs.use-uv }}
default-branch: ${{ inputs.default-branch }}
if: contains(fromJSON(inputs.python-versions), '3.13') # Remove this line after upgrading FAB to v5

tests-boto-core:
name: "Latest Boto test: core"
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ dev = [
"apache-airflow-providers-amazon",
"apache-airflow-providers-celery",
"apache-airflow-providers-cncf-kubernetes",
"apache-airflow-providers-fab>=2.2.0; python_version < '3.13'",
"apache-airflow-providers-fab>=2.2.0",
"apache-airflow-providers-git",
"apache-airflow-providers-ftp",
]
Expand Down
9 changes: 0 additions & 9 deletions airflow-core/src/airflow/api_fastapi/core_api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import logging
import os
import sys
import warnings
from pathlib import Path

Expand All @@ -35,7 +34,6 @@

log = logging.getLogger(__name__)

_PY313 = sys.version_info >= (3, 13)
_AIRFLOW_PATH = Path(__file__).parents[3]


Expand Down Expand Up @@ -123,13 +121,6 @@ def init_flask_plugins(app: FastAPI) -> None:
try:
from airflow.providers.fab.www.app import create_app
except ImportError:
if _PY313:
log.info(
"Some Airflow 2 plugins have been detected in your environment. Currently FAB provider "
"does not support Python 3.13, so you cannot use Airflow 2 plugins with Airflow 3 until "
"FAB provider will be Python 3.13 compatible."
)
return
raise AirflowException(
"Some Airflow 2 plugins have been detected in your environment. "
"To run them with Airflow 3, you must install the FAB provider in your Airflow environment."
Expand Down
34 changes: 5 additions & 29 deletions airflow-core/tests/unit/utils/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
from airflow.utils.db_manager import RunDBManager

from tests_common.test_utils.config import conf_vars
from unit.cli.commands.test_kerberos_command import PY313

pytestmark = pytest.mark.db_test

Expand Down Expand Up @@ -105,16 +104,12 @@ def test_database_schema_and_sqlalchemy_model_are_in_sync(self, initialized_db):
for dbmanager in external_db_managers._managers:
for table_name, table in dbmanager.metadata.tables.items():
all_meta_data._add_table(table_name, table.schema, table)
skip_fab = PY313
if not skip_fab:
# FAB DB Manager
from airflow.providers.fab.auth_manager.models.db import FABDBManager
# FAB DB Manager
from airflow.providers.fab.auth_manager.models.db import FABDBManager

# test FAB models
for table_name, table in FABDBManager.metadata.tables.items():
all_meta_data._add_table(table_name, table.schema, table)
else:
print("Ignoring FAB models in Python 3.13+ as FAB is not compatible with 3.13+ yet.")
# test FAB models
for table_name, table in FABDBManager.metadata.tables.items():
all_meta_data._add_table(table_name, table.schema, table)
# create diff between database schema and SQLAlchemy model
mctx = MigrationContext.configure(
settings.engine.connect(),
Expand Down Expand Up @@ -152,20 +147,6 @@ def test_database_schema_and_sqlalchemy_model_are_in_sync(self, initialized_db):
lambda t: t[0] == "remove_table" and t[1].name == "_xcom_archive",
]

if skip_fab:
# Check structure first
ignores.append(lambda t: len(t) > 1 and hasattr(t[1], "name") and t[1].name.startswith("ab_"))
ignores.append(
lambda t: (
len(t) > 1
and t[0] == "remove_index"
and hasattr(t[1], "columns")
and len(t[1].columns) > 0
and hasattr(t[1].columns[0], "table")
and t[1].columns[0].table.name.startswith("ab_")
)
)

for ignore in ignores:
diff = [d for d in diff if not ignore(d)]

Expand Down Expand Up @@ -243,11 +224,6 @@ def test_check_migrations(self):
],
)
def test_upgradedb(self, auth, expected, mocker):
if PY313 and "airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager" in str(auth):
pytest.skip(
"Skipping test for FAB Auth Manager on Python 3.13+ as FAB is not compatible with 3.13+ yet."
)

mock_upgrade = mocker.patch("alembic.command.upgrade")

with conf_vars(auth):
Expand Down
3 changes: 1 addition & 2 deletions dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
# Checked before putting in build cache
ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS = ["3.10", "3.11", "3.12", "3.13"]
DEFAULT_PYTHON_MAJOR_MINOR_VERSION = ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS[0]
# We set 3.12 as default image version until FAB supports Python 3.13
DEFAULT_PYTHON_MAJOR_MINOR_VERSION_FOR_IMAGES = "3.12"
DEFAULT_PYTHON_MAJOR_MINOR_VERSION_FOR_IMAGES = ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS[0]


# Maps each supported Python version to the minimum Airflow version that supports it.
Expand Down
6 changes: 1 addition & 5 deletions dev/breeze/tests/test_selective_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,7 @@ def test_excluded_providers():
)
assert_outputs_are_printed(
{
"excluded-providers-as-string": json.dumps(
{
"3.13": ["fab"],
}
),
"excluded-providers-as-string": json.dumps({}),
},
str(stderr),
)
Expand Down
6 changes: 0 additions & 6 deletions docker-tests/tests/docker_tests/test_prod_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ def test_required_providers_are_installed(self, default_docker_image):
else:
packages_to_install = set(REGULAR_IMAGE_PROVIDERS)
assert len(packages_to_install) != 0
python_version = run_bash_in_docker(
"python --version",
image=default_docker_image,
)
if python_version.startswith("Python 3.13"):
packages_to_install.discard("apache-airflow-providers-fab")
output = run_bash_in_docker(
"airflow providers list --output json",
image=default_docker_image,
Expand Down
2 changes: 1 addition & 1 deletion providers/amazon/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Extra Dependencies
``python3-saml`` ``python3-saml>=1.16.0; python_version < '3.13'``, ``xmlsec>=1.3.14; python_version < '3.13'``, ``lxml>=6.0.0; python_version < '3.13'``
``apache.hive`` ``apache-airflow-providers-apache-hive``
``exasol`` ``apache-airflow-providers-exasol``
``fab`` ``apache-airflow-providers-fab>=2.2.0; python_version < '3.13'``
``fab`` ``apache-airflow-providers-fab>=2.2.0``
``ftp`` ``apache-airflow-providers-ftp``
``google`` ``apache-airflow-providers-google``
``imap`` ``apache-airflow-providers-imap``
Expand Down
2 changes: 1 addition & 1 deletion providers/amazon/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ dependencies = [
"apache-airflow-providers-exasol"
]
"fab" = [
"apache-airflow-providers-fab>=2.2.0; python_version < '3.13'"
"apache-airflow-providers-fab>=2.2.0"
]
"ftp" = [
"apache-airflow-providers-ftp"
Expand Down
2 changes: 1 addition & 1 deletion providers/databricks/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Extra Dependencies
================== ================================================================
``avro`` ``fastavro>=1.9.0``, ``fastavro>=1.10.0;python_version>="3.12"``
``azure-identity`` ``azure-identity>=1.3.1``
``fab`` ``apache-airflow-providers-fab>=2.2.0; python_version < '3.13'``
``fab`` ``apache-airflow-providers-fab>=2.2.0``
``google`` ``apache-airflow-providers-google>=10.24.0``
``sdk`` ``databricks-sdk==0.10.0``
``standard`` ``apache-airflow-providers-standard``
Expand Down
4 changes: 2 additions & 2 deletions providers/databricks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ dependencies = [
"azure-identity>=1.3.1",
]
"fab" = [
"apache-airflow-providers-fab>=2.2.0; python_version < '3.13'"
"apache-airflow-providers-fab>=2.2.0"
]
"google" = [
"apache-airflow-providers-google>=10.24.0"
Expand Down Expand Up @@ -113,7 +113,7 @@ dev = [
# Additional devel dependencies (do not remove this line and add extra development dependencies)
# Need to exclude 1.3.0 due to missing aarch64 binaries, fixed with 1.3.1++
"deltalake>=1.1.3,!=1.3.0",
"apache-airflow-providers-fab>=2.2.0; python_version < '3.13'",
"apache-airflow-providers-fab>=2.2.0",
"apache-airflow-providers-microsoft-azure",
"apache-airflow-providers-common-sql[pandas,polars]",
"apache-airflow-providers-fab",
Expand Down
24 changes: 12 additions & 12 deletions providers/fab/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ PIP package Version required
========================================== ==========================================
``apache-airflow`` ``>=3.0.2``
``apache-airflow-providers-common-compat`` ``>=1.12.0``
``blinker`` ``>=1.6.2; python_version < "3.13"``
``flask`` ``>=2.2.1,<2.3; python_version < "3.13"``
``flask-appbuilder`` ``==5.0.1; python_version < "3.13"``
``flask-login`` ``>=0.6.2; python_version < "3.13"``
``flask-session`` ``>=0.8.0; python_version < "3.13"``
``msgpack`` ``>=1.0.0; python_version < "3.13"``
``flask-sqlalchemy`` ``>=3.0.5; python_version < "3.13"``
``flask-wtf`` ``>=1.1.0; python_version < "3.13"``
``jmespath`` ``>=0.7.0; python_version < "3.13"``
``werkzeug`` ``>=2.2,<4; python_version < "3.13"``
``wtforms`` ``>=3.0,<4; python_version < "3.13"``
``cachetools`` ``>=6.0; python_version < "3.13"``
``blinker`` ``>=1.6.2``
``flask`` ``>=2.2.1,<2.3``
``flask-appbuilder`` ``==5.2.0``
``flask-login`` ``>=0.6.2``
``flask-session`` ``>=0.8.0``
``msgpack`` ``>=1.0.0``
``flask-sqlalchemy`` ``>=3.0.5``
``flask-wtf`` ``>=1.1.0``
``jmespath`` ``>=0.7.0``
``werkzeug`` ``>=2.2,<4``
``wtforms`` ``>=3.0,<4``
``cachetools`` ``>=6.0``
``flask_limiter`` ``>3,!=3.13,<4``
========================================== ==========================================

Expand Down
30 changes: 15 additions & 15 deletions providers/fab/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,25 @@ Requirements

The minimum Apache Airflow version supported by this provider distribution is ``3.0.2``.

========================================== =========================================
========================================== ==================
PIP package Version required
========================================== =========================================
========================================== ==================
``apache-airflow`` ``>=3.0.2``
``apache-airflow-providers-common-compat`` ``>=1.12.0``
``blinker`` ``>=1.6.2; python_version < "3.13"``
``flask`` ``>=2.2.1,<2.3; python_version < "3.13"``
``flask-appbuilder`` ``==5.0.1; python_version < "3.13"``
``flask-login`` ``>=0.6.2; python_version < "3.13"``
``flask-session`` ``>=0.8.0; python_version < "3.13"``
``msgpack`` ``>=1.0.0; python_version < "3.13"``
``flask-sqlalchemy`` ``>=3.0.5; python_version < "3.13"``
``flask-wtf`` ``>=1.1.0; python_version < "3.13"``
``jmespath`` ``>=0.7.0; python_version < "3.13"``
``werkzeug`` ``>=2.2,<4; python_version < "3.13"``
``wtforms`` ``>=3.0,<4; python_version < "3.13"``
``cachetools`` ``>=6.0; python_version < "3.13"``
``blinker`` ``>=1.6.2``
``flask`` ``>=2.2.1,<2.3``
``flask-appbuilder`` ``==5.2.0``
``flask-login`` ``>=0.6.2``
``flask-session`` ``>=0.8.0``
``msgpack`` ``>=1.0.0``
``flask-sqlalchemy`` ``>=3.0.5``
``flask-wtf`` ``>=1.1.0``
``jmespath`` ``>=0.7.0``
``werkzeug`` ``>=2.2,<4``
``wtforms`` ``>=3.0,<4``
``cachetools`` ``>=6.0``
``flask_limiter`` ``>3,!=3.13,<4``
========================================== =========================================
========================================== ==================

Cross provider package dependencies
-----------------------------------
Expand Down
3 changes: 0 additions & 3 deletions providers/fab/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ versions:
- 1.0.1
- 1.0.0

excluded-python-versions:
- "3.13"

config:
fab:
description: This section contains configs specific to FAB provider.
Expand Down
Loading