Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Azure task in the remote store manifest example DAG #1333

Merged
merged 10 commits into from
Nov 20, 2024
30 changes: 14 additions & 16 deletions dev/dags/cosmos_manifest_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,24 @@ def cosmos_manifest_example() -> None:
# [END gcp_gs_example]

# [START azure_abfs_example]
# azure_abfs_example = DbtTaskGroup(
# group_id="azure_abfs_example",
# project_config=ProjectConfig(
# manifest_path="abfs://cosmos-manifest-test/manifest.json",
# manifest_conn_id="azure_abfs_conn",
# # `manifest_conn_id` is optional. If not provided, the default connection ID `wasb_default` is used.
# project_name="jaffle_shop",
# ),
# profile_config=profile_config,
# render_config=render_config,
# execution_config=execution_config,
# operator_args={"install_deps": True},
# )
azure_abfs_example = DbtTaskGroup(
group_id="azure_abfs_example",
project_config=ProjectConfig(
manifest_path="abfs://cosmos-manifest-test/manifest.json",
manifest_conn_id="azure_abfs_conn",
# `manifest_conn_id` is optional. If not provided, the default connection ID `wasb_default` is used.
project_name="jaffle_shop",
),
profile_config=profile_config,
render_config=render_config,
execution_config=execution_config,
operator_args={"install_deps": True},
)
# [END azure_abfs_example]

post_dbt = EmptyOperator(task_id="post_dbt")

(pre_dbt >> local_example >> aws_s3_example >> gcp_gs_example >> post_dbt)
# TODO: re-enable the following
# (pre_dbt >> local_example >> aws_s3_example >> gcp_gs_example >> azure_abfs_example >> post_dbt)
(pre_dbt >> local_example >> aws_s3_example >> gcp_gs_example >> azure_abfs_example >> post_dbt)


cosmos_manifest_example()
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ amazon = [
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
]
google = ["apache-airflow-providers-google>=10.17.0"]
microsoft = ["apache-airflow-providers-microsoft-azure"]
microsoft = ["apache-airflow-providers-microsoft-azure>=8.5.0"]
tatiana marked this conversation as resolved.
Show resolved Hide resolved
all = [
"astronomer-cosmos[dbt-all]",
"astronomer-cosmos[openlineage]",
Expand All @@ -95,7 +95,7 @@ aws_eks = [
"apache-airflow-providers-amazon>=8.0.0",
]
azure-container-instance = [
"apache-airflow-providers-microsoft-azure>=8.4.0",
"apache-airflow-providers-microsoft-azure>=8.5.0",
]
gcp-cloud-run-job = [
"apache-airflow-providers-google>=10.11.0",
Expand Down Expand Up @@ -187,7 +187,7 @@ dependencies = [
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
"apache-airflow-providers-cncf-kubernetes>=5.1.1",
"apache-airflow-providers-google>=10.17.0",
"apache-airflow-providers-microsoft-azure",
"apache-airflow-providers-microsoft-azure>=8.5.0",
"msgpack",
"openlineage-airflow",
"pydantic>=1.10.0",
Expand Down
10 changes: 9 additions & 1 deletion scripts/test/pre-install-airflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ elif [ "$AIRFLOW_VERSION" = "2.7" ] ; then
else
uv pip install "apache-airflow-providers-amazon[s3fs]" --constraint /tmp/constraint.txt
uv pip install "apache-airflow-providers-cncf-kubernetes" --constraint /tmp/constraint.txt

# The Airflow 2.9 constraints file at
# https://raw.githubusercontent.com/apache/airflow/constraints-2.9.0/constraints-3.11.txt
# specifies apache-airflow-providers-google==10.16.0. However, our CI setup uses a Google connection without a token,
Expand All @@ -52,7 +53,14 @@ else
# we are using apache-airflow-providers-google>=10.17.0 and skipping constraints installation, as the specified
# version does not meet our requirements.
uv pip install "apache-airflow-providers-google>=10.17.0"
uv pip install apache-airflow-providers-microsoft-azure --constraint /tmp/constraint.txt

# The Airflow 2.8 constraints file at
# https://raw.githubusercontent.com/apache/airflow/constraints-2.8.0/constraints-3.11.txt
# specifies apache-airflow-providers-microsoft-azure==8.4.0. However, our Azure connection setup in the CI,
# previously led to authentication issues with this version. This issue got resolved in
# apache-airflow-providers-microsoft-azure==8.5.0. Hence, we are using apache-airflow-providers-microsoft-azure>=8.5.0
# and skipping installation with constraints, as the specified version does not meet our requirements.
uv pip install "apache-airflow-providers-microsoft-azure>=8.5.0"
fi

rm /tmp/constraint.txt
Expand Down