-
Type: Story
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
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.
- is depended on by
-
COMPASS-4806 Include API version in Export to Language
- Needs Triage
-
COMPASS-4809 Add versioned API connectivity test
- Closed
- related to
-
VSCODE-206 Minimal Support for Stable API in VS Code extension
- Open
-
COMPASS-4805 Attempt 4.0 driver update
- Closed
-
NODE-3191 Port Versioned API to 3.7
- Closed