-
Notifications
You must be signed in to change notification settings - Fork 169
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
Remove rust dependency from Cosmos #530
Comments
….1 (#526) Fix the following issue, that was reported in [slack](https://apache-airflow.slack.com/archives/C059CC42E9W/p1694212778764869) by a user named Sai: "After upgrading to cosmos 1.1, I see the below error in Airflow logs. I don't have any OpenLineage integrations. Is there a way to stop emitting this error?" ``` [2023-09-08, 22:28:07 UTC] {taskinstance.py:1318} INFO - Marking task as SUCCESS. dag_id=high_freq_core_dbt, task_id=dbt_front.daily_company_user_metrics.daily_company_user_metrics_run, execution_date=20230908T183000, start_date=20230908T222730, end_date=20230908T222807 [2023-09-08, 22:28:07 UTC] {manager.py:61} ERROR - Failed to extract metadata 'TaskInstance' object has no attribute 'openlineage_events_completes' task_type=DbtRunLocalOperator airflow_dag_id=high_freq_core_dbt task_id=dbt_front.daily_company_user_metrics.daily_company_user_metrics_run airflow_run_id=scheduled__2023-09-08T18:30:00+00:00 Traceback (most recent call last): File "/home/airflow/python-venvs/data-pipelines/lib/python3.10/site-packages/openlineage/airflow/extractors/manager.py", line 45, in extract_metadata task_metadata = extractor.extract_on_complete(task_instance) File "/home/airflow/python-venvs/data-pipelines/lib/python3.10/site-packages/openlineage/airflow/extractors/base.py", line 116, in extract_on_complete return self._get_openlineage_facets( File "/home/airflow/python-venvs/data-pipelines/lib/python3.10/site-packages/openlineage/airflow/extractors/base.py", line 124, in _get_openlineage_facets facets: OperatorLineage = get_facets_method(*args) File "/home/airflow/python-venvs/data-pipelines/lib/python3.10/site-packages/cosmos/operators/local.py", line 318, in get_openlineage_facets_on_complete for completed in task_instance.openlineage_events_completes: AttributeError: 'TaskInstance' object has no attribute 'openlineage_events_completes' ``` The issue was reported to happen using: * Airflow version: v2.5.1 * dbt version: 1.5.1 * without any intentional setup of OpenLineage Since the issue was reported, I learned that `get_openlineage_facets_on_complete` is called even if `execute` fails because `get_openlineage_facets_on_failure` is not currently implemented. Closes: #530 (Rust dependency issue reported)
We identified that the user was running Cosmos on Windows, and in these cases, the openlineage-sql library, which is a dependency of openlineage-integration-comon, didn't have a pre-compiled Rust for it. |
For now, we removed openlineage-integration-comon as a requirement of Cosmos. We can review once/if OpenLineage/OpenLineage#2110 is implemented. As discussed in Slack, there is no Airflow Window support) yet, but things may change. We know many dbt users develop on Windows, and from a Cosmos perspective, we can support this user-journey, where possible. |
To install Cosmos, users must install Rust as part of the recently introduced
openlineage-integration-common
package dependency, even if they don't opt to use openlineage.The user ES reported this bug in the Slack channel:
https://apache-airflow.slack.com/archives/C059CC42E9W/p1694525966501819
"Hi
gives me:
The text was updated successfully, but these errors were encountered: