diff --git a/pyproject.toml b/pyproject.toml index 74cc3650e..f7e7e5bcb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,11 +121,11 @@ packages = ["/cosmos"] [tool.hatch.envs.tests] dependencies = [ "astronomer-cosmos[tests]", - "apache-airflow-providers-postgres==5.11.0", "apache-airflow-providers-cncf-kubernetes>=5.1.1", "apache-airflow-providers-amazon>=3.0.0,<8.20.0", # https://github.com/apache/airflow/issues/39103 "apache-airflow-providers-docker>=3.5.0", "apache-airflow-providers-microsoft-azure", + "apache-airflow-providers-postgres", "types-PyYAML", "types-attrs", "types-requests", diff --git a/tests/operators/test_local.py b/tests/operators/test_local.py index 0f35705b6..14ed66027 100644 --- a/tests/operators/test_local.py +++ b/tests/operators/test_local.py @@ -23,7 +23,6 @@ parse_number_of_warnings_dbt_runner, parse_number_of_warnings_subprocess, ) -from cosmos.exceptions import AirflowCompatibilityError from cosmos.operators.local import ( DbtBuildLocalOperator, DbtDocsAzureStorageLocalOperator, @@ -443,48 +442,6 @@ def test_run_operator_dataset_inlets_and_outlets(caplog): assert test_operator.outlets == [] -@pytest.mark.skipif( - version.parse(airflow_version) not in PARTIALLY_SUPPORTED_AIRFLOW_VERSIONS, - reason="Airflow 2.9.0 and 2.9.1 have a breaking change in Dataset URIs", - # https://github.com/apache/airflow/issues/39486 -) -@pytest.mark.integration -def test_run_operator_dataset_emission_fails(caplog): - - with DAG("test-id-1", start_date=datetime(2022, 1, 1)) as dag: - seed_operator = DbtSeedLocalOperator( - profile_config=real_profile_config, - project_dir=DBT_PROJ_DIR, - task_id="seed", - dbt_cmd_flags=["--select", "raw_customers"], - install_deps=True, - append_env=True, - ) - run_operator = DbtRunLocalOperator( - profile_config=real_profile_config, - project_dir=DBT_PROJ_DIR, - task_id="run", - dbt_cmd_flags=["--models", "stg_customers"], - install_deps=True, - append_env=True, - ) - - seed_operator >> run_operator - - with pytest.raises(AirflowCompatibilityError) as exc: - run_test_dag(dag) - - err_msg = str(exc.value) - assert ( - "Apache Airflow 2.9.0 & 2.9.1 introduced a breaking change in Dataset URIs, to be fixed in newer versions" - in err_msg - ) - assert ( - "If you want to use Cosmos with one of these Airflow versions, you will have to disable emission of Datasets" - in err_msg - ) - - @pytest.mark.skipif( version.parse(airflow_version) not in PARTIALLY_SUPPORTED_AIRFLOW_VERSIONS, reason="Airflow 2.9.0 and 2.9.1 have a breaking change in Dataset URIs",