This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v3-1-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 665c69397fd2325a4ab46bcb18ed53f5d209b0d3 Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Fri Sep 12 03:52:46 2025 +0000 Remove FAB provider from expected providers for PROD image 3.13 verification (#55523) The #55518 assumed that PYTHON_MAJOR_MINOR_VERSION is set, this one changes it to use python version retrieved from inside of the image. (cherry picked from commit d4e92e6bb85c55e1394fbe1704c150cfbbcfacbb) --- .github/workflows/prod-image-build.yml | 4 ++++ docker-tests/tests/docker_tests/test_prod_image.py | 27 +++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/prod-image-build.yml b/.github/workflows/prod-image-build.yml index 292d0d37fe3..93eb251cf0d 100644 --- a/.github/workflows/prod-image-build.yml +++ b/.github/workflows/prod-image-build.yml @@ -228,6 +228,10 @@ 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" diff --git a/docker-tests/tests/docker_tests/test_prod_image.py b/docker-tests/tests/docker_tests/test_prod_image.py index 068f8ca8bbd..0b72c0e03cf 100644 --- a/docker-tests/tests/docker_tests/test_prod_image.py +++ b/docker-tests/tests/docker_tests/test_prod_image.py @@ -54,16 +54,6 @@ REGULAR_IMAGE_PROVIDERS = [ if not provider_id.startswith("#") ] -# Exclude FAB provider for Python 3.13 as it is not yet supported -py_version = os.environ.get("PYTHON_MAJOR_MINOR_VERSION", "") - -if py_version == "3.13": - if "apache-airflow-providers-fab" in REGULAR_IMAGE_PROVIDERS: - REGULAR_IMAGE_PROVIDERS.remove("apache-airflow-providers-fab") - - if "apache-airflow-providers-fab" in SLIM_IMAGE_PROVIDERS: - SLIM_IMAGE_PROVIDERS.remove("apache-airflow-providers-fab") - testing_slim_image = os.environ.get("TEST_SLIM_IMAGE", False) @@ -103,6 +93,12 @@ class TestPythonPackages: 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.remove("apache-airflow-providers-fab") output = run_bash_in_docker( "airflow providers list --output json", image=default_docker_image, @@ -204,7 +200,16 @@ class TestPythonPackages: "package_name,import_names", SLIM_PACKAGE_IMPORTS.items() if testing_slim_image else REGULAR_PACKAGE_IMPORTS.items(), ) - def test_check_dependencies_imports(self, package_name, import_names, default_docker_image): + def test_check_dependencies_imports( + self, package_name: str, import_names: list[str], default_docker_image: str + ): + if package_name == "providers": + python_version = run_bash_in_docker( + "python --version", + image=default_docker_image, + ) + if python_version.startswith("Python 3.13"): + import_names.remove("airflow.providers.fab") run_python_in_docker(f"import {','.join(import_names)}", image=default_docker_image) def test_there_is_no_opt_airflow_airflow_folder(self, default_docker_image):