Skip to content

fix(connectors): apply db-rest host swap to Test connection#341

Merged
keysersoft merged 1 commit into
mainfrom
keysersoft/db-rest-test-swap
Jun 15, 2026
Merged

fix(connectors): apply db-rest host swap to Test connection#341
keysersoft merged 1 commit into
mainfrom
keysersoft/db-rest-test-swap

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Follow-up to #338/#340. The 'Test connection' / health-check path used the raw stored base URL (v6.db.transport.rest, public, currently 503) instead of the internal db-rest the connector actually uses at runtime — so a working connector showed a failing test. Extract the swap into a shared resolveInternalDbRestUrl util used by both DynamicMcpTools and ConnectorsService.testConnection.

The Deutsche Bahn connector stores the public base URL (v6.db.transport.rest)
and the tool-execution path swaps it to the internal db-rest in cloud. But the
'Test connection' / health-check path used the raw stored base URL, so it hit
the public (503-prone) endpoint instead of the real internal one — showing a
failure for a connector that actually works.

Extract the swap into a shared resolveInternalDbRestUrl util and use it in both
DynamicMcpTools and ConnectorsService.testConnection. Move the unit test to the
util (drop the now-obsolete dynamic-mcp-tools.spec).
): string {
const internal = env.DB_REST_INTERNAL_URL;
const isCloud = (env.DEPLOYMENT_MODE || '') === 'cloud';
if (internal && isCloud && baseUrl.startsWith(PUBLIC_DB_REST)) {
@keysersoft keysersoft merged commit 8ef6d7d into main Jun 15, 2026
11 of 12 checks passed
@keysersoft keysersoft deleted the keysersoft/db-rest-test-swap branch June 15, 2026 15:43
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants