Uploaded image for project: 'VS Code Extension'
  1. VS Code Extension
  2. VSCODE-206

Minimal Support for Stable API in VS Code extension

    • Type: Icon: Story Story
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      For the VSCode extension, 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 Compass and share code if appropriate.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jessica.sigafoos@mongodb.com Jessica Sigafoos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: