This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-10-test in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push: new 0ecc0cd821b Make Python 3.9 default for v2-10-test branch (#45599) 0ecc0cd821b is described below commit 0ecc0cd821bf3d636d80e9ba30d762654a236354 Author: Jarek Potiuk <ja...@potiuk.com> AuthorDate: Sun Jan 12 21:45:21 2025 +0100 Make Python 3.9 default for v2-10-test branch (#45599) Since we are switching to Sphinx7, we need to build docs using Python 3.9. We need to make sure that Python 3.9 is default image. --- airflow/api_connexion/schemas/task_schema.py | 6 +- airflow/providers/MANAGING_PROVIDERS_LIFECYCLE.rst | 2 +- .../providers/amazon/aws/transfers/sql_to_s3.py | 9 +- airflow/serialization/serializers/timezone.py | 4 +- constraints/README.md | 2 +- contributing-docs/03_contributors_quick_start.rst | 12 +- contributing-docs/testing/docker_compose_tests.rst | 4 +- contributing-docs/testing/k8s_tests.rst | 4 +- contributing-docs/testing/unit_tests.rst | 10 +- dev/README_RELEASE_AIRFLOW.md | 4 +- dev/README_RELEASE_PROVIDER_PACKAGES.md | 2 +- dev/breeze/src/airflow_breeze/global_constants.py | 2 +- .../airflow_breeze/params/common_build_params.py | 2 +- dev/breeze/tests/test_selective_checks.py | 152 ++++++++++----------- docker_tests/docker_utils.py | 4 +- scripts/ci/pre_commit/common_precommit_utils.py | 6 +- 16 files changed, 111 insertions(+), 114 deletions(-) diff --git a/airflow/api_connexion/schemas/task_schema.py b/airflow/api_connexion/schemas/task_schema.py index 03bf4b59ef2..086e9ae3a55 100644 --- a/airflow/api_connexion/schemas/task_schema.py +++ b/airflow/api_connexion/schemas/task_schema.py @@ -49,14 +49,14 @@ class TaskSchema(Schema): ) depends_on_past = fields.Boolean(dump_only=True) wait_for_downstream = fields.Boolean(dump_only=True) - retries = fields.Number(dump_only=True) + retries = fields.Number(dump_only=True) # type: ignore[var-annotated] queue = fields.String(dump_only=True) pool = fields.String(dump_only=True) - pool_slots = fields.Number(dump_only=True) + pool_slots = fields.Number(dump_only=True) # type: ignore[var-annotated] execution_timeout = fields.Nested(TimeDeltaSchema, dump_only=True) retry_delay = fields.Nested(TimeDeltaSchema, dump_only=True) retry_exponential_backoff = fields.Boolean(dump_only=True) - priority_weight = fields.Number(dump_only=True) + priority_weight = fields.Number(dump_only=True) # type: ignore[var-annotated] weight_rule = WeightRuleField(dump_only=True) ui_color = ColorField(dump_only=True) ui_fgcolor = ColorField(dump_only=True) diff --git a/airflow/providers/MANAGING_PROVIDERS_LIFECYCLE.rst b/airflow/providers/MANAGING_PROVIDERS_LIFECYCLE.rst index 48980f2153c..3d3e95c28b1 100644 --- a/airflow/providers/MANAGING_PROVIDERS_LIFECYCLE.rst +++ b/airflow/providers/MANAGING_PROVIDERS_LIFECYCLE.rst @@ -454,7 +454,7 @@ If you have pre-commit installed, pre-commit will be run automatically on commit manually after commit, you can run it via ``breeze static-checks --last-commit`` some of the tests might fail because suspension of the provider might cause changes in the dependencies, so if you see errors about missing dependencies imports, non-usable classes etc., you will need to build the CI image locally -via ``breeze build-image --python 3.8 --upgrade-to-newer-dependencies`` after the first pre-commit run +via ``breeze build-image --python 3.9 --upgrade-to-newer-dependencies`` after the first pre-commit run and then run the static checks again. If you want to be absolutely sure to run all static checks you can always do this via diff --git a/airflow/providers/amazon/aws/transfers/sql_to_s3.py b/airflow/providers/amazon/aws/transfers/sql_to_s3.py index 65e40797a59..19bc7f016b1 100644 --- a/airflow/providers/amazon/aws/transfers/sql_to_s3.py +++ b/airflow/providers/amazon/aws/transfers/sql_to_s3.py @@ -223,12 +223,9 @@ class SqlToS3Operator(BaseOperator): for group_label in (grouped_df := df.groupby(**self.groupby_kwargs)).groups: yield ( cast(str, group_label), - cast( - "pd.DataFrame", - grouped_df.get_group(group_label) - .drop(random_column_name, axis=1, errors="ignore") - .reset_index(drop=True), - ), + grouped_df.get_group(group_label) + .drop(random_column_name, axis=1, errors="ignore") + .reset_index(drop=True), ) def _get_hook(self) -> DbApiHook: diff --git a/airflow/serialization/serializers/timezone.py b/airflow/serialization/serializers/timezone.py index a1f40e67c69..ef875a92ab6 100644 --- a/airflow/serialization/serializers/timezone.py +++ b/airflow/serialization/serializers/timezone.py @@ -87,9 +87,9 @@ def deserialize(classname: str, version: int, data: object) -> Any: try: from zoneinfo import ZoneInfo except ImportError: - from backports.zoneinfo import ZoneInfo + from backports.zoneinfo import ZoneInfo # type: ignore[no-redef] - return ZoneInfo(data) + return ZoneInfo(data) # type: ignore[arg-type] return parse_timezone(data) diff --git a/constraints/README.md b/constraints/README.md index 791450d1bd7..485ddaba44f 100644 --- a/constraints/README.md +++ b/constraints/README.md @@ -34,7 +34,7 @@ Typical workflow in this case is: * build the image using this command ```bash -breeze ci-image build --python 3.8 --airflow-constraints-location constraints/constraints-3.8txt +breeze ci-image build --python 3.9 --airflow-constraints-location constraints/constraints-3.8txt ``` You can continue iterating and updating the constraint file (and rebuilding the image) diff --git a/contributing-docs/03_contributors_quick_start.rst b/contributing-docs/03_contributors_quick_start.rst index 9c7bdbe9851..dc52368577c 100644 --- a/contributing-docs/03_contributors_quick_start.rst +++ b/contributing-docs/03_contributors_quick_start.rst @@ -256,7 +256,7 @@ Setting up Breeze .. code-block:: bash - breeze --python 3.8 --backend postgres + breeze --python 3.9 --backend postgres .. note:: If you encounter an error like "docker.credentials.errors.InitializationError: @@ -313,7 +313,7 @@ Using Breeze ------------ 1. Starting breeze environment using ``breeze start-airflow`` starts Breeze environment with last configuration run( - In this case python and backend will be picked up from last execution ``breeze --python 3.8 --backend postgres``) + In this case python and backend will be picked up from last execution ``breeze --python 3.9 --backend postgres``) It also automatically starts webserver, backend and scheduler. It drops you in tmux with scheduler in bottom left and webserver in bottom right. Use ``[Ctrl + B] and Arrow keys`` to navigate. @@ -363,7 +363,7 @@ Using Breeze .. code-block:: bash - breeze --python 3.8 --backend postgres + breeze --python 3.9 --backend postgres 2. Open tmux @@ -657,7 +657,7 @@ All Tests are inside ./tests directory. .. code-block:: bash - breeze --backend postgres --postgres-version 15 --python 3.8 --db-reset testing tests --test-type All + breeze --backend postgres --postgres-version 15 --python 3.9 --db-reset testing tests --test-type All - Running specific type of test @@ -667,7 +667,7 @@ All Tests are inside ./tests directory. .. code-block:: bash - breeze --backend postgres --postgres-version 15 --python 3.8 --db-reset testing tests --test-type Core + breeze --backend postgres --postgres-version 15 --python 3.9 --db-reset testing tests --test-type Core - Running Integration test for specific test type @@ -676,7 +676,7 @@ All Tests are inside ./tests directory. .. code-block:: bash - breeze --backend postgres --postgres-version 15 --python 3.8 --db-reset testing tests --test-type All --integration mongo + breeze --backend postgres --postgres-version 15 --python 3.9 --db-reset testing tests --test-type All --integration mongo - For more information on Testing visit : |09_testing.rst| diff --git a/contributing-docs/testing/docker_compose_tests.rst b/contributing-docs/testing/docker_compose_tests.rst index 94864b4137d..8ecdc071ff1 100644 --- a/contributing-docs/testing/docker_compose_tests.rst +++ b/contributing-docs/testing/docker_compose_tests.rst @@ -48,7 +48,7 @@ Running complete test with breeze: .. code-block:: bash - breeze prod-image build --python 3.8 + breeze prod-image build --python 3.9 breeze testing docker-compose-tests In case the test fails, it will dump the logs from the running containers to the console and it @@ -66,7 +66,7 @@ The test can be also run manually with ``pytest docker_tests/test_docker_compose command, provided that you have a local airflow venv with ``dev`` extra set and the ``DOCKER_IMAGE`` environment variable is set to the image you want to test. The variable defaults to ``ghcr.io/apache/airflow/main/prod/python3.8:latest`` which is built by default -when you run ``breeze prod-image build --python 3.8``. also the switches ``--skip-docker-compose-deletion`` +when you run ``breeze prod-image build --python 3.9``. also the switches ``--skip-docker-compose-deletion`` and ``--wait-for-containers-timeout`` can only be passed via environment variables. If you want to debug the deployment using ``docker compose`` commands after ``SKIP_DOCKER_COMPOSE_DELETION`` diff --git a/contributing-docs/testing/k8s_tests.rst b/contributing-docs/testing/k8s_tests.rst index a4a6f67da0e..79ebba89bdc 100644 --- a/contributing-docs/testing/k8s_tests.rst +++ b/contributing-docs/testing/k8s_tests.rst @@ -270,7 +270,7 @@ Should result in KinD creating the K8S cluster. Connecting to localhost:18150. Num try: 1 Error when connecting to localhost:18150 : ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) - Airflow webserver is not available at port 18150. Run `breeze k8s deploy-airflow --python 3.8 --kubernetes-version v1.24.2` to (re)deploy airflow + Airflow webserver is not available at port 18150. Run `breeze k8s deploy-airflow --python 3.9 --kubernetes-version v1.24.2` to (re)deploy airflow KinD cluster airflow-python-3.8-v1.24.2 created! @@ -352,7 +352,7 @@ Should show the status of current KinD cluster. Connecting to localhost:18150. Num try: 1 Error when connecting to localhost:18150 : ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) - Airflow webserver is not available at port 18150. Run `breeze k8s deploy-airflow --python 3.8 --kubernetes-version v1.24.2` to (re)deploy airflow + Airflow webserver is not available at port 18150. Run `breeze k8s deploy-airflow --python 3.9 --kubernetes-version v1.24.2` to (re)deploy airflow Cluster healthy: airflow-python-3.8-v1.24.2 diff --git a/contributing-docs/testing/unit_tests.rst b/contributing-docs/testing/unit_tests.rst index e40b5c82d3b..6b4f21f81a5 100644 --- a/contributing-docs/testing/unit_tests.rst +++ b/contributing-docs/testing/unit_tests.rst @@ -209,7 +209,7 @@ rerun in Breeze as you will (``-n auto`` will parallelize tests using ``pytest-x .. code-block:: bash - breeze shell --backend none --python 3.8 + breeze shell --backend none --python 3.9 > pytest tests --skip-db-tests -n auto @@ -286,7 +286,7 @@ either by package/module/test or by test type - whatever ``pytest`` supports. .. code-block:: bash - breeze shell --backend postgres --python 3.8 + breeze shell --backend postgres --python 3.9 > pytest tests --run-db-tests-only As explained before, you cannot run DB tests in parallel using ``pytest-xdist`` plugin, but ``breeze`` has @@ -296,7 +296,7 @@ you use ``breeze testing db-tests`` command): .. code-block:: bash - breeze testing tests --run-db-tests-only --backend postgres --python 3.8 --run-in-parallel + breeze testing tests --run-db-tests-only --backend postgres --python 3.9 --run-in-parallel Examples of marking test as DB test ................................... @@ -1122,7 +1122,7 @@ directly to the container. .. code-block:: bash - breeze ci-image build --python 3.8 + breeze ci-image build --python 3.9 2. Enter breeze environment by selecting the appropriate airflow version and choosing ``providers-and-tests`` option for ``--mount-sources`` flag. @@ -1224,7 +1224,7 @@ Herr id how to reproduce it. .. code-block:: bash - breeze ci-image build --python 3.8 + breeze ci-image build --python 3.9 2. Build providers from latest sources: diff --git a/dev/README_RELEASE_AIRFLOW.md b/dev/README_RELEASE_AIRFLOW.md index 2d63edf3011..d9cb0f0d886 100644 --- a/dev/README_RELEASE_AIRFLOW.md +++ b/dev/README_RELEASE_AIRFLOW.md @@ -687,7 +687,7 @@ There is also an easy way of installation with Breeze if you have the latest sou Running the following command will use tmux inside breeze, create `admin` user and run Webserver & Scheduler: ```shell script -breeze start-airflow --use-airflow-version 2.7.0rc1 --python 3.8 --backend postgres +breeze start-airflow --use-airflow-version 2.7.0rc1 --python 3.9 --backend postgres ``` You can also choose different executors and extras to install when you are installing airflow this way. For @@ -695,7 +695,7 @@ example in order to run Airflow with CeleryExecutor and install celery, google a Airflow 2.7.0, you need to have celery provider installed to run Airflow with CeleryExecutor) you can run: ```shell script -breeze start-airflow --use-airflow-version 2.7.0rc1 --python 3.8 --backend postgres \ +breeze start-airflow --use-airflow-version 2.7.0rc1 --python 3.9 --backend postgres \ --executor CeleryExecutor --airflow-extras "celery,google,amazon" ``` diff --git a/dev/README_RELEASE_PROVIDER_PACKAGES.md b/dev/README_RELEASE_PROVIDER_PACKAGES.md index 25aa8062c77..d546076af82 100644 --- a/dev/README_RELEASE_PROVIDER_PACKAGES.md +++ b/dev/README_RELEASE_PROVIDER_PACKAGES.md @@ -1016,7 +1016,7 @@ pip install apache-airflow-providers-<provider>==<VERSION>rc<X> ### Installing with Breeze ```shell -breeze start-airflow --use-airflow-version 2.2.4 --python 3.8 --backend postgres \ +breeze start-airflow --use-airflow-version 2.2.4 --python 3.9 --backend postgres \ --load-example-dags --load-default-connections ``` diff --git a/dev/breeze/src/airflow_breeze/global_constants.py b/dev/breeze/src/airflow_breeze/global_constants.py index d374a30eded..91bb72e4dba 100644 --- a/dev/breeze/src/airflow_breeze/global_constants.py +++ b/dev/breeze/src/airflow_breeze/global_constants.py @@ -46,7 +46,7 @@ APACHE_AIRFLOW_GITHUB_REPOSITORY = "apache/airflow" # Checked before putting in build cache ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"] -DEFAULT_PYTHON_MAJOR_MINOR_VERSION = ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS[0] +DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.9" ALLOWED_ARCHITECTURES = [Architecture.X86_64, Architecture.ARM] # Database Backends used when starting Breeze. The "none" value means that the configuration is invalid. # No database will be started - access to a database will fail. diff --git a/dev/breeze/src/airflow_breeze/params/common_build_params.py b/dev/breeze/src/airflow_breeze/params/common_build_params.py index ed32eea4f2c..b206d595b23 100644 --- a/dev/breeze/src/airflow_breeze/params/common_build_params.py +++ b/dev/breeze/src/airflow_breeze/params/common_build_params.py @@ -67,7 +67,7 @@ class CommonBuildParams: prepare_buildx_cache: bool = False python_image: str | None = None push: bool = False - python: str = "3.8" + python: str = "3.9" uv_http_timeout: int = DEFAULT_UV_HTTP_TIMEOUT dry_run: bool = False version_suffix_for_pypi: str | None = None diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py index bfa97dcb1ee..61e237ba393 100644 --- a/dev/breeze/tests/test_selective_checks.py +++ b/dev/breeze/tests/test_selective_checks.py @@ -113,10 +113,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("INTHEWILD.md",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "false", "needs-helm-tests": "false", "run-tests": "false", @@ -147,10 +147,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): pytest.param( ("tests/api/file.py",), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -174,10 +174,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("airflow/operators/file.py",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -201,10 +201,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("airflow/serialization/python.py",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -228,10 +228,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("docs/file.rst",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -259,10 +259,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "true", "needs-helm-tests": "true", @@ -340,10 +340,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("tests/utils/test_cli_util.py",), { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "true", "needs-helm-tests": "true", @@ -366,10 +366,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("tests_common/__init__.py",), { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "true", "needs-helm-tests": "true", @@ -394,10 +394,10 @@ def assert_outputs_are_printed(expected_outputs: dict[str, str], stderr: str): ("airflow/ui/src/index.tsx",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "ci-image-build": "false", "prod-image-build": "false", "needs-helm-tests": "false", @@ -595,16 +595,16 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_ "main", { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "all-versions": "false", "mysql-versions": "['8.0']", "postgres-versions": "['13']", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "kubernetes-versions": "['v1.28.15']", "kubernetes-versions-list-as-string": "v1.28.15", - "kubernetes-combos-list-as-string": "3.8-v1.28.15", + "kubernetes-combos-list-as-string": "3.9-v1.28.15", "ci-image-build": "true", "prod-image-build": "true", "run-tests": "true", @@ -631,16 +631,16 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_ "main", { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "all-versions": "false", "mysql-versions": "['8.0']", "postgres-versions": "['13']", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "kubernetes-versions": "['v1.28.15']", "kubernetes-versions-list-as-string": "v1.28.15", - "kubernetes-combos-list-as-string": "3.8-v1.28.15", + "kubernetes-combos-list-as-string": "3.9-v1.28.15", "ci-image-build": "true", "prod-image-build": "true", "run-tests": "true", @@ -707,14 +707,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_ "main", { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "all-versions": "false", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "kubernetes-versions": "['v1.28.15']", "kubernetes-versions-list-as-string": "v1.28.15", - "kubernetes-combos-list-as-string": "3.8-v1.28.15", + "kubernetes-combos-list-as-string": "3.9-v1.28.15", "ci-image-build": "true", "prod-image-build": "true", "run-tests": "true", @@ -741,14 +741,14 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_ "main", { "selected-providers-list-as-string": ALL_PROVIDERS_AFFECTED, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "all-versions": "false", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "kubernetes-versions": "['v1.28.15']", "kubernetes-versions-list-as-string": "v1.28.15", - "kubernetes-combos-list-as-string": "3.8-v1.28.15", + "kubernetes-combos-list-as-string": "3.9-v1.28.15", "ci-image-build": "true", "prod-image-build": "true", "run-tests": "true", @@ -775,10 +775,10 @@ def test_full_test_needed_when_scripts_changes(files: tuple[str, ...], expected_ ("full tests needed",), "v2-7-stable", { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", - "python-versions": "['3.8']", - "python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", + "python-versions": "['3.9']", + "python-versions-list-as-string": "3.9", "all-versions": "false", "ci-image-build": "true", "prod-image-build": "true", @@ -824,8 +824,8 @@ def test_expected_output_full_tests_needed( ("INTHEWILD.md",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "false", "needs-helm-tests": "false", "run-tests": "false", @@ -847,8 +847,8 @@ def test_expected_output_full_tests_needed( "tests/providers/google/file.py", ), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "needs-helm-tests": "false", "ci-image-build": "true", "prod-image-build": "true", @@ -874,8 +874,8 @@ def test_expected_output_full_tests_needed( "tests/providers/google/file.py", ), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "true", "needs-helm-tests": "false", @@ -899,8 +899,8 @@ def test_expected_output_full_tests_needed( "tests/providers/google/file.py", ), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -1029,8 +1029,8 @@ def test_expected_output_push( ("INTHEWILD.md",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "false", "needs-helm-tests": "false", "run-tests": "false", @@ -1051,8 +1051,8 @@ def test_expected_output_push( ("tests/system/any_file.py",), { "selected-providers-list-as-string": None, - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -1073,8 +1073,8 @@ def test_expected_output_push( pytest.param( ("airflow/models/test.py",), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", @@ -1096,8 +1096,8 @@ def test_expected_output_push( pytest.param( ("airflow/file.py",), { - "all-python-versions": "['3.8']", - "all-python-versions-list-as-string": "3.8", + "all-python-versions": "['3.9']", + "all-python-versions-list-as-string": "3.9", "ci-image-build": "true", "prod-image-build": "false", "needs-helm-tests": "false", diff --git a/docker_tests/docker_utils.py b/docker_tests/docker_utils.py index 1c9aea8a420..a5230d6be21 100644 --- a/docker_tests/docker_utils.py +++ b/docker_tests/docker_utils.py @@ -87,11 +87,11 @@ In case 2) - Follow the steps below: CI image: - breeze ci-image build --upgrade-to-newer-dependencies --python 3.8 + breeze ci-image build --upgrade-to-newer-dependencies --python 3.9 Production image: - breeze ci-image build --production-image --upgrade-to-newer-dependencies --python 3.8 + breeze ci-image build --production-image --upgrade-to-newer-dependencies --python 3.9 * You will see error messages there telling which requirements are conflicting and which packages caused the conflict. Add the limitation that caused the conflict to EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS diff --git a/scripts/ci/pre_commit/common_precommit_utils.py b/scripts/ci/pre_commit/common_precommit_utils.py index f406c811662..1fe162421fd 100644 --- a/scripts/ci/pre_commit/common_precommit_utils.py +++ b/scripts/ci/pre_commit/common_precommit_utils.py @@ -30,7 +30,7 @@ from rich.console import Console AIRFLOW_SOURCES_ROOT_PATH = Path(__file__).parents[3].resolve() AIRFLOW_BREEZE_SOURCES_PATH = AIRFLOW_SOURCES_ROOT_PATH / "dev" / "breeze" -DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.8" +DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.9" console = Console(width=400, color_system="standard") @@ -223,12 +223,12 @@ def validate_cmd_result(cmd_result, include_ci_env_check=False): "\n[yellow]If you see strange stacktraces above, especially about missing imports " "run this command:[/]\n" ) - console.print("[magenta]breeze ci-image build --python 3.8 --upgrade-to-newer-dependencies[/]\n") + console.print("[magenta]breeze ci-image build --python 3.9 --upgrade-to-newer-dependencies[/]\n") elif cmd_result.returncode != 0: console.print( "[warning]\nIf you see strange stacktraces above, " - "run `breeze ci-image build --python 3.8` and try again." + "run `breeze ci-image build --python 3.9` and try again." ) sys.exit(cmd_result.returncode)