Skip to content

Commit

Permalink
Bump minimum Airflow version in providers to Airflow 2.6.0 (#36017)
Browse files Browse the repository at this point in the history
* Bump minimum Airflow version in providers to Airflow 2.6.0

* Fix breeze unit tests

* Handle cohere provider

* enhance CI matrix for provider-airflow-compatibility-check

* remove 2.5.0  from BASE_PROVIDERS_COMPATIBILITY_CHECKS
  • Loading branch information
eladkal committed Dec 7, 2023
1 parent ca20f07 commit d0918d7
Show file tree
Hide file tree
Showing 192 changed files with 365 additions and 496 deletions.
4 changes: 2 additions & 2 deletions PROVIDERS.rst
Expand Up @@ -144,8 +144,8 @@ Airflow version to the next MINOR release, when 12 months passed since the first
MINOR version of Airflow.

For example this means that by default we upgrade the minimum version of Airflow supported by providers
to 2.6.0 in the first Provider's release after 2nd of December 2023. The 2nd of December 2022 is the date when the
first ``PATCHLEVEL`` of 2.5 (2.5.0) has been released.
to 2.7.0 in the first Provider's release after 27th of April 2024. 27th of April 2023 is the date when the
first ``PATCHLEVEL`` of 2.6 (2.6.0) has been released.

When we increase the minimum Airflow version, this is not a reason to bump ``MAJOR`` version of the providers
(unless there are other breaking changes in the provider). The reason for that is that people who use
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/airbyte/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-airbyte:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-airbyte:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/airbyte/provider.yaml
Expand Up @@ -41,7 +41,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-http

integrations:
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/alibaba/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-alibaba:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-alibaba:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/alibaba/provider.yaml
Expand Up @@ -42,7 +42,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- oss2>=2.14.0
- alibabacloud_adb20211201>=1.0.0
- alibabacloud_tea_openapi>=0.3.7
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/amazon/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-amazon:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-amazon:{__version__}` needs Apache Airflow 2.6.0+"
)
8 changes: 1 addition & 7 deletions airflow/providers/amazon/aws/notifications/chime.py
Expand Up @@ -20,18 +20,12 @@
from functools import cached_property
from typing import TYPE_CHECKING

from airflow.exceptions import AirflowOptionalProviderFeatureException
from airflow.providers.amazon.aws.hooks.chime import ChimeWebhookHook

if TYPE_CHECKING:
from airflow.utils.context import Context

try:
from airflow.notifications.basenotifier import BaseNotifier
except ImportError:
raise AirflowOptionalProviderFeatureException(
"Failed to import BaseNotifier. This feature is only available in Airflow versions >= 2.6.0"
)
from airflow.notifications.basenotifier import BaseNotifier


class ChimeNotifier(BaseNotifier):
Expand Down
9 changes: 1 addition & 8 deletions airflow/providers/amazon/aws/notifications/sns.py
Expand Up @@ -20,16 +20,9 @@
from functools import cached_property
from typing import Sequence

from airflow.exceptions import AirflowOptionalProviderFeatureException
from airflow.notifications.basenotifier import BaseNotifier
from airflow.providers.amazon.aws.hooks.sns import SnsHook

try:
from airflow.notifications.basenotifier import BaseNotifier
except ImportError:
raise AirflowOptionalProviderFeatureException(
"Failed to import BaseNotifier. This feature is only available in Airflow versions >= 2.6.0"
)


class SnsNotifier(BaseNotifier):
"""
Expand Down
9 changes: 1 addition & 8 deletions airflow/providers/amazon/aws/notifications/sqs.py
Expand Up @@ -20,16 +20,9 @@
from functools import cached_property
from typing import Sequence

from airflow.exceptions import AirflowOptionalProviderFeatureException
from airflow.notifications.basenotifier import BaseNotifier
from airflow.providers.amazon.aws.hooks.sqs import SqsHook

try:
from airflow.notifications.basenotifier import BaseNotifier
except ImportError:
raise AirflowOptionalProviderFeatureException(
"Failed to import BaseNotifier. This feature is only available in Airflow versions >= 2.6.0"
)


class SqsNotifier(BaseNotifier):
"""
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/amazon/aws/sensors/batch.py
Expand Up @@ -125,7 +125,7 @@ def execute_complete(self, context: Context, event: dict[str, Any]) -> None:
if event["status"] != "success":
message = f"Error while running job: {event}"
# TODO: remove this if-else block when min_airflow_version is set to higher than the version that
# changed in https://github.com/apache/airflow/pull/33424 is released
# changed in https://github.com/apache/airflow/pull/33424 is released (2.7.1)
if self.soft_fail:
raise AirflowSkipException(message)
raise AirflowException(message)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/amazon/provider.yaml
Expand Up @@ -73,7 +73,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- 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
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/beam/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-beam:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-beam:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/beam/provider.yaml
Expand Up @@ -49,7 +49,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-beam>=2.47.0

integrations:
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/cassandra/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-cassandra:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-cassandra:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/cassandra/provider.yaml
Expand Up @@ -40,7 +40,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- cassandra-driver>=3.13.0

integrations:
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/drill/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-drill:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-drill:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/drill/provider.yaml
Expand Up @@ -44,7 +44,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-common-sql>=1.3.1
- sqlalchemy-drill>=1.1.0

Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/druid/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-druid:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-druid:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/druid/provider.yaml
Expand Up @@ -49,7 +49,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-common-sql>=1.3.1
- pydruid>=0.4.1

Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/flink/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-flink:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-flink:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/flink/provider.yaml
Expand Up @@ -33,7 +33,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- cryptography>=2.0.0
- apache-airflow-providers-cncf-kubernetes>=5.1.0

Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/hdfs/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-hdfs:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-hdfs:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/hdfs/provider.yaml
Expand Up @@ -45,7 +45,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- hdfs[avro,dataframe,kerberos]>=2.0.4

integrations:
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/hive/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-hive:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-hive:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/hive/provider.yaml
Expand Up @@ -60,7 +60,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-common-sql>=1.3.1
- hmsclient>=0.1.0
- pandas>=0.17.1
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/impala/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-impala:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-impala:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/impala/provider.yaml
Expand Up @@ -34,7 +34,7 @@ versions:

dependencies:
- impyla>=0.18.0,<1.0
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0

integrations:
- integration-name: Apache Impala
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/kafka/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-kafka:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-kafka:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/kafka/provider.yaml
Expand Up @@ -31,7 +31,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- asgiref
- confluent-kafka>=1.8.2

Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/kylin/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-kylin:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-kylin:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/kylin/provider.yaml
Expand Up @@ -38,7 +38,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- kylinpy>=2.6

integrations:
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/livy/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-livy:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-livy:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/livy/provider.yaml
Expand Up @@ -46,7 +46,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-http
- aiohttp
- asgiref
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/pig/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-pig:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-pig:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/pig/provider.yaml
Expand Up @@ -39,7 +39,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0

integrations:
- integration-name: Apache Pig
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/apache/pinot/__init__.py
Expand Up @@ -35,8 +35,8 @@
from airflow.version import version as airflow_version

if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
"2.5.0"
"2.6.0"
):
raise RuntimeError(
f"The package `apache-airflow-providers-apache-pinot:{__version__}` needs Apache Airflow 2.5.0+"
f"The package `apache-airflow-providers-apache-pinot:{__version__}` needs Apache Airflow 2.6.0+"
)
2 changes: 1 addition & 1 deletion airflow/providers/apache/pinot/provider.yaml
Expand Up @@ -45,7 +45,7 @@ versions:
- 1.0.0

dependencies:
- apache-airflow>=2.5.0
- apache-airflow>=2.6.0
- apache-airflow-providers-common-sql>=1.3.1
- pinotdb>0.4.7

Expand Down

0 comments on commit d0918d7

Please sign in to comment.