From e8e58d86bfee8bbcc1bcee635667133c118967fd Mon Sep 17 00:00:00 2001 From: mctl-deploy Date: Thu, 7 May 2026 08:40:10 +0200 Subject: [PATCH] fix(labs/openclaw): correct env-substitution syntax (\${VAR} not __VAR__) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #148 used __TRADING_DATA_URL__ / __TRADING_DATA_TOKEN__ as env-var placeholders by analogy with the existing coinglass entry. Pod logs after deploy showed the bridge failing every ~30 s with: [bundle-mcp] failed to start server "trading-data" (node /scripts/...): McpError: MCP error -32603: Failed to parse URL from __TRADING_DATA_URL__ Reading mctl-openclaw src/config/env-substitution.test.ts confirms the real syntax is bash-style \${VAR}. The __NAME__ pattern in coinglass' own entry is just a literal string that the coinglass bridge hasn't been actually consuming as the API key — it only worked-by-accident either because the operator never relied on coinglass-MCP tools (skill snapshots use Binance + OKX inline REST, not coinglass MCP for CVD), or because of a separate fallback path. Switch trading-data to \${TRADING_DATA_URL} / \${TRADING_DATA_TOKEN}. The pod env block in this same chart already exposes TRADING_DATA_URL as a literal string, and TRADING_DATA_TOKEN comes from the labs-trading-data-client envFrom secret — both end up in pod env at boot, openclaw substitutes from pod env into mcp.servers..env at config load, and the bridge spawned process gets the resolved values. Pod will Recreate to reload openclaw.json. After recreate the bridge should handshake successfully and the next /eth ETH call will populate cvd_24h.per_exchange.{bybit, bitget}. --- platform-gitops/services/labs/openclaw/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform-gitops/services/labs/openclaw/values.yaml b/platform-gitops/services/labs/openclaw/values.yaml index 23a476370..12fa42f0c 100644 --- a/platform-gitops/services/labs/openclaw/values.yaml +++ b/platform-gitops/services/labs/openclaw/values.yaml @@ -1546,8 +1546,8 @@ configMaps: "command": "node", "args": ["/scripts/trading-data-mcp-proxy.js"], "env": { - "TRADING_DATA_URL": "__TRADING_DATA_URL__", - "TRADING_DATA_TOKEN": "__TRADING_DATA_TOKEN__" + "TRADING_DATA_URL": "${TRADING_DATA_URL}", + "TRADING_DATA_TOKEN": "${TRADING_DATA_TOKEN}" } } }