feat(const): point the hub at another codev-backend with CODEV_BACKEND_URL - #258
Merged
Conversation
…D_URL Testing a codev-backend change end-to-end meant editing the baked BACKEND_URL and remembering to put it back — and a localhost URL that slips into a commit points every user's hub at their own machine, which is a silent, total sign-in outage. Unset, the baked URL is what ships, so this is inert in every real install. SSO is deliberately not overridable: a locally-run backend still verifies tokens against the real provider, so the login flow has to mint a real one. Only the exchange moves.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Adds an env override so a developer can point CoDev Hub at a
codev-backendrunning somewhere else — a local one (bun devin that repo serveshttp://127.0.0.1:8787), or a staging deploy.Why an override rather than editing the URL
Testing a backend change end-to-end previously meant editing the baked
BACKEND_URLand remembering to put it back. A127.0.0.1that slips into a commit points every user's hub at their own machine — a silent, total sign-in outage, and one that would look like a network problem rather than a bad release. Unset, this is inert: the baked URL is exactly what ships.SSO is deliberately not overridable
Only the exchange moves. A locally-run backend still verifies tokens against the real
SSO_USERINFO_URL, so the login flow has to mint a genuine token from the real provider — pointing SSO at localhost would just break sign-in.Usage
Export it before running the hub from this checkout, then drive the flows that hit the backend (
codevhub install,codevhub config,codevhub model):export CODEV_BACKEND_URL=http://127.0.0.1:8787Note that an npm-installed
codevhubwill still read the baked URL, so this is for running out of the repo.Pairs with the same override in CoDev Code (quickbeard/codev-code#329), so both clients can be aimed at one backend for a single test run.
bun run typecheckclean.