Generated by AI agent: route portal extension-pages.json at console, not localhost - #4803
Open
Brandoffsky wants to merge 1 commit into
Open
Generated by AI agent: route portal extension-pages.json at console, not localhost#4803Brandoffsky wants to merge 1 commit into
Brandoffsky wants to merge 1 commit into
Conversation
RemotePortalConfigService.FetchRemotePortalConfig hardcoded
`http://localhost:4950/` + `/extension-pages.json`, so every consumer of the
remote mount-site catalog 404'd against a service that is not running. This
blocks `portal extension list-extension-options`, `project new
portal-extension`, `portal extension add-microservice`, and `portal
open-extension` -- including when driven over MCP (`beam mcp serve`).
Route through PortalCommand.GetPortalBaseUrl(args, PortalType.Console), which
maps {env}.api.beamable.com -> {env}.console.beamable.com. This matches the
sibling call already using PortalType.Console at
BeamoLocalSystem_PortalExtension.cs:234.
Note the plan doc (cli/projects/portal-extension-tests-plan.md:38) shows the
bare GetPortalBaseUrl(args) -- that is the LegacyPortal default and resolves
to portal.beamable.com, which 404s (NoSuchKey). The plan predates the console
split; Console is the correct variant.
Verified 2026-08-13:
dev.console.beamable.com/extension-pages.json 200, valid mountSites
staging.console.beamable.com/extension-pages.json NXDOMAIN
console.beamable.com/extension-pages.json 404
Only dev publishes the catalog today. That is non-fatal -- the fetch already
catches, warns, and returns an empty config so locally-discovered mount sites
still surface -- but the remote catalog stays unavailable on staging/prod
until console publishes the file there. That is a hosting-side gap, not a CLI
one.
Also corrects the stale docstring on RemotePortalConfiguration, which still
pointed at portal.beamable.com.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Lightbeam link |
Open
1 task
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.
Ticket
https://disruptorbeam.atlassian.net/browse/BEAM-XXXX
Brief Description
RemotePortalConfigService.FetchRemotePortalConfighardcodes the mount-site catalog URL:This is an unreleased regression, not a live outage. The released CLI (7.2.2) derives the URL from the target host, so
portal extension *works today against a dev realm. The hardcode is onmainonly — shipping it would fetch the catalog fromlocalhost:4950for every realm, for every developer, regardless of what they're pointed at.Three reasons that's worse than it looks:
It fails silently.
FetchRemotePortalConfigcatches, warns, and returns an emptyRemotePortalConfiguration(). Soportal extension list-extension-optionswould report no mount options with nothing user-visible explaining why — only a log line.project new portal-extension,portal extension add-microserviceandportal open-extensiondegrade the same way. A hard failure would at least be noticed.It makes
--portal-urlinert.GetPortalBaseUrlconsults thePortalUrlOptionoverride first; a literal string never does. So while the URL is hardcoded, the documented escape hatch for pointing the CLI at a locally-running portal does nothing — the code is local-only, not local-first.Consistency.
BeamoLocalSystem_PortalExtension.csalready callsGetPortalBaseUrl(..., PortalType.Console)for the sibling path. Two call sites for the same catalog currently disagree.Notes
On the
PortalTypechoice. Both derivations serve the catalog for a dev realm, soConsoleis a direction/consistency call rather than a correctness one. Measured against/extension-pages.json:dev.api.beamable.com—Consoledev.console.beamable.comdev.api.beamable.com—LegacyPortaldev-portal.beamable.comapi.beamable.com—Consoleconsole.beamable.comapi.beamable.com—LegacyPortalportal.beamable.comWorth correcting an earlier version of this description: it claimed the
LegacyPortaldefault "resolves toportal.beamable.comand 404s". That is true for prod only. The substitution isReplace("dev.", "dev-").Replace("api", "portal"), so a dev host yieldsdev-portal.beamable.com, which serves.Consoleis preferred here for consistency with the sibling call site and because the console host is where this is heading — not because Legacy is broken.Prod does not publish the catalog under either name. That is a hosting-side gap rather than a CLI one, and worth routing to whoever owns console deploys; it is unchanged by this PR.
Also corrects the stale docstring on
RemotePortalConfiguration, which still pointed atportal.beamable.com.Checklist
Testing
No new tests.
FetchRemotePortalConfigis a private static whose behaviour is a live HTTP fetch, with no existing coverage.Verified by
dotnet build cli/cli.csproj(0 errors), the endpoint checks in the table above, and end-to-end throughbeam mcp servefrom an external consumer (Wingman coding mode,beamable/BeamableAPI#701) — which is where the silent-empty-config failure mode was observed, and which passes--portal-urlthrough for local-portal development once this lands.