Add install tests for VSCode extension

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.14.0
    • Component/s: Testing
    • None
    • Developer Tools

      In our last release v1.14.0, we came across a non-trivial problem with the extension which now integrates with MongoDB MCP server. Since v1.14.0, the extension imports MCP server library and starts the server within the extension process itself.

      The problem we came across was that an extension built on Linux / MacOS hosts was not even activating on Windows hosts. We identified this only because (thankfully) Kevin uses windows and was helping in testing the extension.

      After some digging we found out that the problem was with yargs-parser module getting imported somewhere in the MCP server code and that pinning it to v21 made the error go away. This is what the release v1.14.0 contains.

      Had a discussion with Anna about this and she pointed out the error:

      yargs-parser v22 is not compatible with webpack'd modules because instead of using webpack's require, yargs-parser v22 makes use of node's require and with a static path of the file from the host where the extension was built. And because the extension was built on linux / macos host, the file url ended up being: `file:///home/something/x` which is not a correct URL for windows hosts and that is why it fails on windows

      Now there are certain off-project actions we would be taking like raising an issue with them about this and possibly update mongodb-mcp-server code to use dynamic imports instead of static imports.

      But for VSCode to not end up in surprise accidents like this, which very well might go unnoticed, we need to have at-least install tests for the built extension targeting different OS.

       

            Assignee:
            Unassigned
            Reporter:
            Himanshu Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: