Skip to content

Commit 5314217

Browse files
authored
allow long client version in service version check' (#61)
Only consider the first two fields in the client version. Without this change the service will report that the version is a bad format, which is not necessary in this case.
1 parent 7a7801e commit 5314217

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/cuopt_server/cuopt_server/utils/job_queue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def check_client_version(client_vers):
109109
if client_vers == "custom":
110110
return []
111111
cv = client_vers.split(".")
112-
if len(cv) != 3:
112+
if len(cv) < 2:
113113
logging.warn("Client version missing or bad format")
114114
return [
115115
f"Client version missing or not the current format. "
@@ -118,7 +118,7 @@ def check_client_version(client_vers):
118118
"if this is a custom client."
119119
]
120120
else:
121-
cmajor, cminor, _ = cv
121+
cmajor, cminor = cv[:2]
122122
matches = (cmajor, cminor) == (major, minor)
123123
if not matches:
124124
logging.warn(f"Client version {cmajor}.{cminor} does not match")

0 commit comments

Comments
 (0)