diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 224de35488010..46d7537fa5f0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -799,31 +799,6 @@ jobs: run: breeze ci fix-ownership if: always() - tests-aws-async-provider: - timeout-minutes: 50 - name: "Pytest for AWS Async Provider" - runs-on: "${{needs.build-info.outputs.runs-on}}" - needs: [build-info, wait-for-ci-images] - if: needs.build-info.outputs.run-tests == 'true' - steps: - - name: Cleanup repo - shell: bash - run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*" - - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" - uses: actions/checkout@v3 - with: - persist-credentials: false - - name: "Prepare breeze & CI image" - uses: ./.github/actions/prepare_breeze_and_image - - name: "Run AWS Async Test" - run: "breeze shell \ - 'pip install aiobotocore>=2.1.1 && pytest /opt/airflow/tests/providers/amazon/aws/deferrable'" - - name: "Post Tests" - uses: ./.github/actions/post_tests - - name: "Fix ownership" - run: breeze ci fix-ownership - if: always() - tests-helm: timeout-minutes: 80 name: "Python unit tests for Helm chart" diff --git a/airflow/providers/amazon/provider.yaml b/airflow/providers/amazon/provider.yaml index d7b7578dee10f..763110ed0eb46 100644 --- a/airflow/providers/amazon/provider.yaml +++ b/airflow/providers/amazon/provider.yaml @@ -600,6 +600,9 @@ additional-extras: - name: pandas dependencies: - pandas>=0.17.1 + # There is conflict between boto3 and aiobotocore dependency botocore. + # TODO: We can remove it once boto3 and aiobotocore both have compatible botocore version or + # boto3 have native aync support and we move away from aio aiobotocore - name: aiobotocore dependencies: - aiobotocore>=2.1.1 diff --git a/setup.py b/setup.py index 90a73f440477d..2ac40e2c6abcc 100644 --- a/setup.py +++ b/setup.py @@ -399,6 +399,11 @@ def write_version(filename: str = str(AIRFLOW_SOURCES_ROOT / "airflow" / "git_ve "wheel", "yamllint", "aioresponses", + # This required for AWS deferrable operators. + # There is conflict between boto3 and aiobotocore dependency botocore. + # TODO: We can remove it once boto3 and aiobotocore both have compatible botocore version or + # boto3 have native aync support and we move away from aio aiobotocore + "aiobotocore>=2.1.1", ] diff --git a/tests/providers/amazon/aws/deferrable/hooks/test_base_aws.py b/tests/providers/amazon/aws/deferrable/hooks/test_base_aws.py index d50f6dcd16e02..eef118ce6794e 100644 --- a/tests/providers/amazon/aws/deferrable/hooks/test_base_aws.py +++ b/tests/providers/amazon/aws/deferrable/hooks/test_base_aws.py @@ -29,8 +29,6 @@ except ImportError: pass -pytest.importorskip("aiobotocore") - class TestAwsBaseAsyncHook: @staticmethod diff --git a/tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py b/tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py index 3cbc39cedabc9..b9552837d6347 100644 --- a/tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py +++ b/tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py @@ -24,8 +24,6 @@ from airflow.providers.amazon.aws.hooks.redshift_cluster import RedshiftAsyncHook from tests.providers.amazon.aws.utils.compat import async_mock -pytest.importorskip("aiobotocore") - class TestRedshiftAsyncHook: @pytest.mark.asyncio diff --git a/tests/providers/amazon/aws/deferrable/triggers/test_redshift_cluster.py b/tests/providers/amazon/aws/deferrable/triggers/test_redshift_cluster.py index fe34233895323..0bfd40065620d 100644 --- a/tests/providers/amazon/aws/deferrable/triggers/test_redshift_cluster.py +++ b/tests/providers/amazon/aws/deferrable/triggers/test_redshift_cluster.py @@ -16,8 +16,6 @@ # under the License. from __future__ import annotations -import importlib.util - import pytest from airflow.providers.amazon.aws.triggers.redshift_cluster import ( @@ -30,7 +28,6 @@ POLLING_PERIOD_SECONDS = 1.0 -@pytest.mark.skipif(not bool(importlib.util.find_spec("aiobotocore")), reason="aiobotocore require") class TestRedshiftClusterTrigger: def test_pause_serialization(self): """