-
Notifications
You must be signed in to change notification settings - Fork 26
Fix failing Databricks tests #292
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
Conversation
Following tests for Databricks are failing and observed in a non-related PR: #290 1. test_databricks_submit_run_operator_async 2. test_databricks_run_now_operator_async The reason for failure is that the execute method called in these tests is trying to push an XCOM against task instance 'ti' of the context. Previously, context was an empty dictionary missing the 'ti' key. We now are using the create_context utility to generate a context object which includes the 'ti' key against which the XCOM is getting pushed.
I observed Databricks tests failing as part of this PR: #290 and hence created a separate issue and PR to fix these here. Once this is merged to main, I will get these changes into my branch. |
Codecov Report
@@ Coverage Diff @@
## main #292 +/- ##
=======================================
Coverage 96.61% 96.61%
=======================================
Files 53 53
Lines 2834 2834
=======================================
Hits 2738 2738
Misses 96 96 Continue to review full report at Codecov.
|
By default, the value of When |
Yes, weird why it's failing only in my PR: https://app.circleci.com/pipelines/github/astronomer/astronomer-providers/1445/workflows/6a04ddcb-3480-4f37-b321-0e735af0f7a4/jobs/4527 But, I believe, we need this fix anyway, right @pankajastro ? |
wait, In my local airflow code I can see the default value for do_xocm_push param is false but in airflow main, I see it is true https://github.com/apache/airflow/blob/main/airflow/providers/databricks/operators/databricks.py#L315 @kaxil @phanikumv |
Ideally the behaviour should be same as that of apache airflow |
Looks like it was changed recently - apache/airflow#22541 on the main branch of Airflow which is also released as part of databircks provider 2.6.0 - https://airflow.apache.org/docs/apache-airflow-providers-databricks/stable/index.html#id1 |
Yes, we are having this issue because of airflow databricks operator behaviour change. But, because of this change, there will be a backward compatibility issue for others also. |
I think in general for Airflow, most places I see the value set to True. Irrespective of the value, I believe we should have the fix in this PR for the tests by creating the needed context. Please let me know if you have alternative thoughts. |
Following tests for Databricks are failing and observed in a non-related PR: #290
The reason for failure is that the execute method called in these
tests is trying to push an XCOM against task instance 'ti' of
the context. Previously, context was an empty dictionary missing
the 'ti' key. We now are using the create_context utility to
generate a context object which includes the 'ti' key against which
the XCOM is getting pushed.
Closes: #291