mirror of
https://github.com/apache/airflow.git
synced 2026-11-04 07:12:48 +00:00
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.
This commit is contained in:
1 parent
e41de08806
commit
d4e92e6bb8
2 files changed
+20
-11
No files matched your search
@@ -227,6 +227,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"
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user