From f7a7b437e4a66906d3727d67319455861ee133ff Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Mon, 8 Jan 2024 17:21:50 +0100 Subject: [PATCH] Bump min version of amazon-provider related dependencies This is a regular bump of Amazon-provider related dependencies. The way how botocore releases are done, they are putting a lot of strain on `pip` to resolve the right set of dependencies, including long backtracking, when there are too man versions available. Therefore, from time to time, we are bumping minimum version of Amazon-related dependencies to limit the impact frequent releases of boto and botocore has. Also it is generally fine to update min version of dependencies for providers because at the very least users can still use previously released providers in case they have problem with those dependencies, also many of the updated dependencies contain fixes and feature we implicitly depend on and bumping them regulary is a good way to make sure all the functionalities of the Amazon provider are working as expected. Another reason for the bump is that as of 1.33 version botocore and boto version stopped being shifted by 3 (previously boto3 1.28 was the version corresponding to botocore 1.31). As of version 1.33 this problem has been solved. See https://github.com/boto/boto3/issues/2702 Watchtower min version is bumped to version 3 (which is 12 months old even if before we opted for much older (more than 2 years old) and again if users want to use older version of watchtower, they can opt for previous provider version. This change saves 5-6 minutes of backtracking when `pip` try to find the right version of dependencies when upgrading to newer version. Extracted from #36537 --- airflow/providers/amazon/provider.yaml | 18 +++++------------- generated/provider_dependencies.json | 6 +++--- setup.py | 8 ++++---- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/airflow/providers/amazon/provider.yaml b/airflow/providers/amazon/provider.yaml index fb010739e4685..dd5d4e0abcbd4 100644 --- a/airflow/providers/amazon/provider.yaml +++ b/airflow/providers/amazon/provider.yaml @@ -81,23 +81,15 @@ dependencies: - apache-airflow-providers-common-sql>=1.3.1 - apache-airflow-providers-http # We should update minimum version of boto3 and here regularly to avoid `pip` backtracking with the number - # of candidates to consider. We should also make sure that all the below related packages have also the - # same minimum version specified. Boto3 1.28.0 has been released on July 6 2023. We should also make sure we - # set it to the version that `aiobotocore` supports (see `aiobotocore` optional dependency at the end - # of this file). Currently we set aiobotocore as minimum 2.5.3 - as this is was the first version - # that supported boto3 1.28. - # NOTE!!! BEFORE botocore 1.33 BOTOCORE VERSIONS ARE SHIFTED BY 3 MINOR VERSIONS - # NOTE!!! Make sure to update _MIN_BOTO3_VERSION in setup.py when you update it here - - boto3>=1.28.0 - # NOTE!!! BEFORE botocore 1.33 version is always shifted by 3 MINOR VERSIONS from boto3, see: - # - https://github.com/boto/boto3/issues/2702 - # - https://github.com/boto/boto3/blob/a3e710df58676c2567b8023dbe09025ad5e0e50f/.changes/1.33.0.json#L13-L15 - - botocore>=1.31.0 + # of candidates to consider. Make sure to configure boto3 version here as well as in all the tools below + # in the `devel-dependencies` section to be the same minimum version. + - boto3>=1.33.0 + - botocore>=1.33.0 - inflection>=0.5.1 # Allow a wider range of watchtower versions for flexibility among users - watchtower>=2.0.1,<4 - jsonpath_ng>=1.5.3 - - redshift_connector>=2.0.888 + - redshift_connector>=2.0.918 - sqlalchemy_redshift>=0.8.6 - asgiref diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index aa4274e41edbd..1833e65f96dcf 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -27,11 +27,11 @@ "apache-airflow-providers-http", "apache-airflow>=2.6.0", "asgiref", - "boto3>=1.28.0", - "botocore>=1.31.0", + "boto3>=1.33.0", + "botocore>=1.33.0", "inflection>=0.5.1", "jsonpath_ng>=1.5.3", - "redshift_connector>=2.0.888", + "redshift_connector>=2.0.918", "sqlalchemy_redshift>=0.8.6", "watchtower>=2.0.1,<4" ], diff --git a/setup.py b/setup.py index 60fcf88724240..047326f0c656f 100644 --- a/setup.py +++ b/setup.py @@ -411,15 +411,15 @@ def write_version(filename: str = str(AIRFLOW_SOURCES_ROOT / "airflow" / "git_ve ] # make sure to update providers/amazon/provider.yaml botocore min version when you update it here -_MIN_BOTO3_VERSION = "1.28.0" +_MIN_BOTO3_VERSION = "1.33.0" _devel_only_amazon = [ - "aws_xray_sdk", - "moto[cloudformation,glue]>=4.2.9", + "aws_xray_sdk>=2.12.0", + "moto[cloudformation,glue]>=4.2.12", + f"mypy-boto3-appflow>={_MIN_BOTO3_VERSION}", f"mypy-boto3-rds>={_MIN_BOTO3_VERSION}", f"mypy-boto3-redshift-data>={_MIN_BOTO3_VERSION}", f"mypy-boto3-s3>={_MIN_BOTO3_VERSION}", - f"mypy-boto3-appflow>={_MIN_BOTO3_VERSION}", ] _devel_only_azure = [