mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Load executor plugin declarations concurrently (#33423)
## Why MCP server and app connector declarations live in separate executor-owned files. Reading them sequentially makes remote environments pay the latency of both reads. ## What changed Load both declaration files concurrently while preserving independent error handling for each result. GitOrigin-RevId: 067e6d1677987ba52200b759a55cec6129575d4b
This commit is contained in:
@@ -87,7 +87,14 @@ impl SelectedExecutorPluginMcpContributor {
|
||||
};
|
||||
let metadata = match plugin {
|
||||
Some(plugin) => {
|
||||
let servers = self.mcp_provider.load(&plugin).await.unwrap_or_else(|err| {
|
||||
// MCP server declarations and app connector declarations are separate
|
||||
// executor-owned files. Read them together so a remote environment only
|
||||
// pays for the slower read instead of both reads back-to-back.
|
||||
let (servers, connector_declarations) = tokio::join!(
|
||||
self.mcp_provider.load(&plugin),
|
||||
self.connector_provider.load(&plugin)
|
||||
);
|
||||
let servers = servers.unwrap_or_else(|err| {
|
||||
tracing::warn!(
|
||||
selected_root = selected_root.id,
|
||||
error = %err,
|
||||
@@ -95,10 +102,7 @@ impl SelectedExecutorPluginMcpContributor {
|
||||
);
|
||||
Vec::new()
|
||||
});
|
||||
let connector_ids = self
|
||||
.connector_provider
|
||||
.load(&plugin)
|
||||
.await
|
||||
let connector_ids = connector_declarations
|
||||
.unwrap_or_else(|err| {
|
||||
tracing::warn!(
|
||||
selected_root = selected_root.id,
|
||||
|
||||
Reference in New Issue
Block a user