Repository: dbt-labs/dbt-spark (language: python)

Issue:
[Bug] New test failure for `tests/functional/adapter/test_constraints.py::TestSparkIncrementalConstraintsRollback::test__constraints_enforcement_rollback`
### Current Behavior

This is a consistently failing new test. It's only failing for the `databricks_sql_endpoint` profile.

### Expected Behavior

Tests should be passing.

### Steps To Reproduce

Example run: https://github.com/dbt-labs/dbt-spark/actions/runs/8664716476/job/23780856316?pr=1006
This PR only configures `dependabot`, which should not trigger functional code changes. All other tests passed.


Discussion / hints:
Likely this is not about this specific test but with a change to how databricks/delta work. 

See this integration test for example: https://github.com/dbt-labs/dbt-spark/actions/runs/8756930079
Notice that the failing tests are different but also related to delta
> Likely this is not about this specific test but with a change to how databricks/delta work.
> 
> See this integration test for example: https://github.com/dbt-labs/dbt-spark/actions/runs/8756930079 Notice that the failing tests are different but also related to delta

Agreed, and the two started failing at the same time.

Fix patch:
diff --git a/requirements.txt b/requirements.txt
index 18ccc77fd..40335fb8a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
 pyhive[hive_pure_sasl]~=0.7.0
 requests>=2.28.1
 
-pyodbc~=5.0.1
+pyodbc~=5.0.1 --no-binary pyodbc
 sqlparams>=3.0.0
 thrift>=0.13.0
 sqlparse>=0.4.2 # not directly required, pinned by Snyk to avoid a vulnerability


Test patch:
diff --git a/test.env.example b/test.env.example
index e69f700b7..140da4042 100644
--- a/test.env.example
+++ b/test.env.example
@@ -1,13 +1,9 @@
-# Cluster ID
-DBT_DATABRICKS_CLUSTER_NAME=
-# SQL Endpoint
-DBT_DATABRICKS_ENDPOINT=
-# Server Hostname value
-DBT_DATABRICKS_HOST_NAME=
-# personal token
-DBT_DATABRICKS_TOKEN=
-# file path to local ODBC driver
-ODBC_DRIVER=
+# databricks credentials
+DBT_DATABRICKS_HOST_NAME=<{this value}.cloud.databricks.com>.cloud.databricks.com
+DBT_DATABRICKS_TOKEN=<personal token>
+DBT_DATABRICKS_CLUSTER_NAME=<sql/protocolv1/o/{not this}/{this value}>
+ODBC_DRIVER=</file/path/to/local/ODBC.driver>
+DBT_DATABRICKS_ENDPOINT=</sql/1.0/warehouses/{this value}>
 
 # users for testing 'grants' functionality
 DBT_TEST_USER_1=
diff --git a/tests/functional/adapter/test_constraints.py b/tests/functional/adapter/test_constraints.py
index 654bbdb5f..e35a13a64 100644
--- a/tests/functional/adapter/test_constraints.py
+++ b/tests/functional/adapter/test_constraints.py
@@ -316,7 +316,7 @@ def expected_error_messages(self):
             "violate the new NOT NULL constraint",
             "(id > 0) violated by row with values:",  # incremental mats
             "DELTA_VIOLATE_CONSTRAINT_WITH_VALUES",  # incremental mats
-            "NOT NULL constraint violated for column",
+            "NOT NULL constraint violated for col",
         ]
 
     def assert_expected_error_messages(self, error_message, expected_error_messages):
@@ -358,17 +358,6 @@ def models(self):
             "constraints_schema.yml": constraints_yml,
         }
 
-    @pytest.mark.skip(
-        "Databricks now raises an exception, which gets raised prior to the `expected_pass` check."
-        "See https://github.com/dbt-labs/dbt-spark/issues/1009"
-    )
-    def test__constraints_enforcement_rollback(
-        self, project, expected_color, expected_error_messages, null_model_sql
-    ):
-        super().test__constraints_enforcement_rollback(
-            project, expected_color, expected_error_messages, null_model_sql
-        )
-
 
 # TODO: Like the tests above, this does test that model-level constraints don't
 # result in errors, but it does not verify that they are actually present in