Skip to content

Commit 10ab6f8

Browse files
NiallEgansusodapop
authored andcommitted
Cross version testing
* Bump down the version bound and convert the spark jobs into multi-dbr jobs
1 parent fc62545 commit 10ab6f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmdexec/clients/python/src/databricks/sql/thrift_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ def attempt_request(attempt):
284284
def _check_protocol_version(self, t_open_session_resp):
285285
protocol_version = t_open_session_resp.serverProtocolVersion
286286

287-
if protocol_version < ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V3:
287+
if protocol_version < ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V2:
288288
raise OperationalError("Error: expected server to use a protocol version >= "
289-
"SPARK_CLI_SERVICE_PROTOCOL_V3, "
289+
"SPARK_CLI_SERVICE_PROTOCOL_V2, "
290290
"instead got: {}".format(protocol_version))
291291

292292
def _check_initial_namespace(self, catalog, schema, response):

cmdexec/clients/python/tests/test_thrift_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def test_bad_protocol_versions_are_rejected(self, tcli_service_client_cass):
108108
ttypes.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V9,
109109
ttypes.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10,
110110
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V1,
111-
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V2,
112111
]
113112

114113
for protocol_version in bad_protocol_versions:
@@ -125,8 +124,9 @@ def test_bad_protocol_versions_are_rejected(self, tcli_service_client_cass):
125124
def test_okay_protocol_versions_succeed(self, tcli_service_client_cass):
126125
t_http_client_instance = tcli_service_client_cass.return_value
127126
good_protocol_versions = [
127+
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V2,
128128
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V3,
129-
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V4,
129+
ttypes.TProtocolVersion.SPARK_CLI_SERVICE_PROTOCOL_V4
130130
]
131131

132132
for protocol_version in good_protocol_versions:

0 commit comments

Comments
 (0)