Skip to content

fix: wait for file system provider in McpResourceManagementService.initialize()#302295

Open
bluecontainer wants to merge 1 commit intomicrosoft:mainfrom
bluecontainer:fix/mcp-wait-for-provider
Open

fix: wait for file system provider in McpResourceManagementService.initialize()#302295
bluecontainer wants to merge 1 commit intomicrosoft:mainfrom
bluecontainer:fix/mcp-wait-for-provider

Conversation

@bluecontainer
Copy link
Copy Markdown

AbstractMcpResourceManagementService.initialize() calls populateLocalServers() which reads the mcp.json config file. In remote scenarios, the file system provider for the resource's scheme may not yet be registered, causing an ENOPRO error.

Add await whenProviderRegistered() before reading to ensure the provider is available. Add a test that verifies getInstalled() waits for the provider.

Fixes #302287

…itialize()

AbstractMcpResourceManagementService.initialize() calls populateLocalServers()
which reads the mcp.json config file. In remote scenarios, the file system
provider for the resource's scheme may not yet be registered, causing an
ENOPRO error.

Add await whenProviderRegistered() before reading to ensure the provider
is available. Add a test that verifies getInstalled() waits for the provider.
@bluecontainer
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree [company="bluecontainer"]

@bluecontainer
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

McpResourceManagementService: race condition in initialize() — reads file before provider data is available

2 participants