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 GCP remote manifest task #1332

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions dev/dags/cosmos_manifest_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ def cosmos_manifest_example() -> None:
# [END aws_s3_example]

# [START gcp_gs_example]
# gcp_gs_example = DbtTaskGroup(
# group_id="gcp_gs_example",
# project_config=ProjectConfig(
# manifest_path="gs://cosmos_remote_target/manifest.json",
# manifest_conn_id="gcp_gs_conn",
# # `manifest_conn_id` is optional. If not provided, the default connection ID `google_cloud_default` is used.
# project_name="jaffle_shop",
# ),
# profile_config=profile_config,
# render_config=render_config,
# execution_config=execution_config,
# operator_args={"install_deps": True},
# )
gcp_gs_example = DbtTaskGroup(
group_id="gcp_gs_example",
project_config=ProjectConfig(
manifest_path="gs://cosmos_remote_target/manifest.json",
manifest_conn_id="gcp_gs_conn",
# `manifest_conn_id` is optional. If not provided, the default connection ID `google_cloud_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 gcp_gs_example]

# [START azure_abfs_example]
Expand All @@ -104,7 +104,7 @@ def cosmos_manifest_example() -> None:

post_dbt = EmptyOperator(task_id="post_dbt")

(pre_dbt >> local_example >> aws_s3_example >> 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)

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ openlineage = ["openlineage-integration-common!=1.15.0", "openlineage-airflow"]
amazon = [
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
]
google = ["apache-airflow-providers-google"]
google = ["apache-airflow-providers-google>=10.17.0"]
microsoft = ["apache-airflow-providers-microsoft-azure"]
all = [
"astronomer-cosmos[dbt-all]",
Expand Down Expand Up @@ -186,7 +186,7 @@ dependencies = [
"aenum",
"apache-airflow-providers-amazon[s3fs]>=3.0.0",
"apache-airflow-providers-cncf-kubernetes>=5.1.1",
"apache-airflow-providers-google>=10.11.0",
"apache-airflow-providers-google>=10.17.0",
"apache-airflow-providers-microsoft-azure",
"msgpack",
"openlineage-airflow",
Expand Down
9 changes: 8 additions & 1 deletion scripts/test/pre-install-airflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ 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
uv pip install "apache-airflow-providers-google>=10.11.0" --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,
# which previously led to authentication issues when the token was None. This issue was resolved in PR
# https://github.com/apache/airflow/pull/38102 and fixed in apache-airflow-providers-google==10.17.0. Consequently,
# 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
fi

Expand Down