-
Notifications
You must be signed in to change notification settings - Fork 201
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
Fix example_cosmos_dbt_build.py
DAG failure
#1568
Milestone
Comments
tatiana
pushed a commit
that referenced
this issue
Feb 27, 2025
closes: #1564 **Fix unit test error** ``` tests/operators/_asynchronous/test_bigquery.py:6: in <module> from airflow.providers.google.cloud.operators.bigquery import BigQueryInsertJobOperator ../../../.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.12-2.9/lib/python3.12/site-packages/airflow/providers/google/cloud/operators/bigquery.py:32: in <module> from airflow.providers.common.sql.operators.sql import ( # type: ignore[attr-defined] # for _parse_boolean ../../../.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.12-2.9/lib/python3.12/site-packages/airflow/providers/common/sql/operators/sql.py:29: in <module> from airflow.providers.common.sql.hooks.sql import DbApiHook, fetch_all_handler, return_single_query_results ../../../.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.12-2.9/lib/python3.12/site-packages/airflow/providers/common/sql/hooks/sql.py:37: in <module> from methodtools import lru_cache E ModuleNotFoundError: No module named 'methodtools' ``` **Disable DAG example_cosmos_dbt_build.py in CI because of error** ``` [2025-02-26 13:13:41,578] {taskinstance.py:1851} ERROR - Task failed with exception Traceback (most recent call last): File "/home/runner/work/astronomer-cosmos/astronomer-cosmos/cosmos/operators/base.py", line 278, in execute self.build_and_run_cmd(context=context, cmd_flags=self.add_cmd_flags()) File "/home/runner/work/astronomer-cosmos/astronomer-cosmos/cosmos/operators/local.py", line 708, in build_and_run_cmd result = self.run_command( File "/home/runner/work/astronomer-cosmos/astronomer-cosmos/cosmos/operators/local.py", line 556, in run_command self.handle_exception(result) File "/home/runner/work/astronomer-cosmos/astronomer-cosmos/cosmos/operators/local.py", line 229, in handle_exception_dbt_runner return dbt_runner.handle_exception_if_needed(result) File "/home/runner/work/astronomer-cosmos/astronomer-cosmos/cosmos/dbt/runner.py", line 113, in handle_exception_if_needed raise CosmosDbtRunError(f"dbt invocation completed with errors: {error_message}") cosmos.exceptions.CosmosDbtRunError: dbt invocation completed with errors: relationships_orders_customer_id__customer_id__ref_customers_: Database Error in test relationships_orders_customer_id__customer_id__ref_customers_ (models/schema.yml) relation "public.orders" does not exist LINE 13: from "***"."public"."orders" ^ compiled code at target/run/altered_jaffle_shop/models/schema.yml/relationships_orders_customer_id__customer_id__ref_customers_.sql ``` Created a follow-up issue: #1568 to enable DAG example_cosmos_dbt_build.py
This consistently fails for Airflow <= 2.7, but I suspect the DB might be getting deleted. I have created PR: #1573 to enable this DAG in CI for Airflow >=2.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PR: #1567 Disable DAG example_cosmos_dbt_build.py in CI because it's failing weirdly.
https://github.com/astronomer/astronomer-cosmos/actions/runs/13560024340/job/37901353341?pr=1567
The text was updated successfully, but these errors were encountered: