Skip to content

Commit 3afd9d6

Browse files
committed
fix: don't default to 'latest' runtime version client-side
`version` is an optional parameter. The backend already has logic to determine the most appropriate default value. Always passing a value from the client side prevents us from leveraging that (smarter) logic.
1 parent fea073c commit 3afd9d6

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ users may find useful:
103103
libraries like Shapely.
104104
* `version`: one of the WherobotsDB runtime versions that is available
105105
to you, if you need to pin your usage to a particular, supported
106-
WherobotsDB version. Defaults to `"latest"`.
106+
WherobotsDB version. Defaults to the latest, most-optimized version
107+
of WherobotsDB available to your subscription.
107108
* `session_type`: `"single"` or `"multi"`; if set to `"single"`, then
108109
each call to `connect()` establishes an exclusive connection to a
109110
distinct and dedicated Wherobots runtime; if set to "multi", then

wherobots/db/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
DEFAULT_RUNTIME: Runtime = Runtime.TINY
1414
DEFAULT_REGION: Region = Region.AWS_US_WEST_2
15-
DEFAULT_VERSION: str = "latest"
1615
DEFAULT_SESSION_TYPE: SessionType = SessionType.MULTI
1716
DEFAULT_READ_TIMEOUT_SECONDS: float = 0.25
1817
DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS: float = 900

wherobots/db/driver.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
DEFAULT_READ_TIMEOUT_SECONDS,
2525
DEFAULT_SESSION_TYPE,
2626
DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
27-
DEFAULT_VERSION,
2827
MAX_MESSAGE_SIZE,
2928
PARAM_STYLE,
3029
PROTOCOL_VERSION,
@@ -88,14 +87,12 @@ def connect(
8887
host = host or DEFAULT_ENDPOINT
8988
runtime = runtime or DEFAULT_RUNTIME
9089
region = region or DEFAULT_REGION
91-
version = version or DEFAULT_VERSION
9290
session_type = session_type or DEFAULT_SESSION_TYPE
9391

9492
logging.info(
95-
"Requesting %s%s runtime running %s in %s from %s ...",
93+
"Requesting %s%s runtime in %s from %s ...",
9694
"new " if force_new else "",
9795
runtime.value,
98-
version,
9996
region.value,
10097
host,
10198
)
@@ -111,7 +108,6 @@ def connect(
111108
json={
112109
"runtimeId": runtime.value,
113110
"shutdownAfterInactiveSeconds": shutdown_after_inactive_seconds,
114-
"version": version,
115111
"sessionType": session_type.value,
116112
},
117113
headers=headers,

0 commit comments

Comments
 (0)