[COMPASS-4417] Minimal Support for Stable API in Compass Created: 15/Sep/20  Updated: 06/Nov/23

Status: Needs Triage
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Major - P3
Reporter: Jessica Sigafoos Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-4806 Include API version in Export to Lang... Needs Triage
is depended on by COMPASS-4809 Add versioned API connectivity test Closed
Related
related to VSCODE-206 Minimal Support for Stable API in VS ... Open
related to COMPASS-4805 Attempt 4.0 driver update Closed
related to NODE-3191 Port Versioned API to 3.7 Closed
Epic Link: COMPASS-4416

 Description   

For Compass, we modify the connection mechanism to try not specifying an API version, and fall back to specifying API version 1 if the server indicates that using the versioned API is required. Whether a server requires an API version is cached along with the other server metadata we store. If the cache indicates that a server requires (or does not require) an API version, and a new connection attempt indicates that the cached server state is incorrect, the reverse logic is applied.

From a technical perspective, the situation of connecting to a server that requires an API version can currently best be detected through server heartbeat events, until DRIVERS-1619 is done. This can happen in a way that is similar to how we bail out early in those cases in mongosh, e.g. https://github.com/mongodb-js/mongosh/blob/f1d40bbac736ed7b8998491c2511f5809c17efe8/packages/service-provider-server/src/cli-service-provider.ts#L140-L157. The reverse situation can be detected by running e.g. collection.find() on a dummy collection.

Feel free to coordinate this with the implementation in VSCode and share code if appropriate.


Generated at Wed Feb 07 22:36:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.