Repository navigation
refactor(env): reach pgweb and db-mcp only through the gateway's /svc routes - #823
Open
andrewpark-scaleai wants to merge 2 commits into
Open
andrewpark-scaleai wants to merge 2 commits into
andrewpark-scaleai wants to merge 2 commits into
Conversation
andrewpark-scaleai
force-pushed
the
andrewpark/gateway-only-console-ports
branch
from
November 19, 2026 20:22
fc74893 to
572b192
Compare
andrewpark-scaleai
marked this pull request as ready for review
November 20, 2026 16:52
… routes The VM path exposes only the gateway's port, the compose file publishes no port for pgweb or db-mcp, and the container path creates their sandboxes with expose_externally=False. DeployedGateway drops db_web_url and db_mcp_url, so new records name the consoles only at db_web_gateway_url and db_mcp_gateway_url. DeployedGatewayEnv still reads both from older records for one release.
andrewpark-scaleai
force-pushed
the
andrewpark/gateway-only-console-ports
branch
from
November 20, 2026 17:14
572b192 to
60abc26
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order for this group:
Why
After #821, the gateway serves pgweb and db-mcp at
/svc/. This PR makes that the only way in, so deploys expose one port (the gateway's) and records carry one set of console URLs.What changed
env-networkstill reach them.expose_externally=False, as it already does for other sidecars.DeployedGatewaydropsdb_web_urlanddb_mcp_url, so no deploy writes them.DeployedGatewayEnvstill reads them from older records for one release.Blast Radius
db_web_urlordb_mcp_urlgets None on a new deploy's record. Every one must move todb_web_gateway_url/db_mcp_gateway_urlfirst.Verification
create_vmgets only the gateway and sidecar ports.tst/unit/env/test_env.pyloads a record from an older deploy.tst/unit/env,tst/unit/providersandtst/unit/clipass.ruff check src tstpasses.modal_vm: the consoles answer through the gateway with the token.

Confidence Score: 5/5
The reviewed changes appear safe to merge once the stated rollout requirements are met.Summary
Database consoles now use the gateway’s
/svcroutes instead of direct public ports.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Client[Console client with control token] --> Gateway[Gateway public port] Gateway -->|/svc/pgweb/| Pgweb[Private pgweb] Gateway -->|/svc/db-mcp/mcp| DbMcp[Private db-mcp]Reviews (7) · Last reviewed commit: "test(env): name the gateway and sidecar ..." · Reviewed by Greptile