The current "name" thing is not used anywhere for subscriptions - all internal capabilities and APIs depend use the UUID, and Enterprise Portal will use the UUID as well. This change replaces all name/IDs with the UUID, prefixed in Enterprise Portal format, as we prepare to launch Enterprise Portal in more places (such as Cody Analytics: https://linear.app/sourcegraph/issue/CORE-101). This is particularly relevant for Cody Analytics so I can document how to find the UUID in a way that isn't "get it from the URL". It's not super beautiful in the subscriptions list, but as we progress on the migration to Enterprise Portal I plan to replace the ID in the list with "Display name", which is a first-class citizen in Enterprise Portal. ## Test plan <img width="953" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/23356519/30c4ae6b-e50b-485c-a2c8-e4ab6445fc01">  |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| bookmarklet | ||
| dev | ||
| dist | ||
| src | ||
| tests-examples | ||
| .bazelignore | ||
| .eslintignore | ||
| .stylelintrc.json | ||
| BUILD.bazel | ||
| bundlesize.config.js | ||
| package.json | ||
| README.md | ||
| statoscope | ||
| tsconfig.json | ||
| vitest.config.ts | ||
Web Application
Local development
Use sg CLI tool to configure and start local development server. For more information check out the sg documentation.
Our local development server runs by starting both a Caddy HTTPS server and a Node HTTP server. We then can reverse proxy requests to the Node server to serve client assets under HTTPS.
Configuration
Environment variables important for the web server:
WEB_BUILDER_SERVE_INDEXshould be set totrueto enable serving of an index page.SOURCEGRAPH_API_URLis used as a proxied API url. By default it points to the https://k8s.sgdev.org.
It's possible to overwrite these variables by creating sg.config.overwrite.yaml in the root folder and adjusting the env section of the relevant command.
Development server
sg start web-standalone
Public API
To use a public API that doesn't require authentication for most of the functionality:
SOURCEGRAPH_API_URL=https://sourcegraph.com sg start web-standalone
Production server
sg start web-standalone-prod
Web app should be available at https://${SOURCEGRAPH_HTTPS_DOMAIN}:${SOURCEGRAPH_HTTPS_PORT}. Build artifacts will be served from <rootRepoPath>/client/web/dist.
Note: If you are unable to use the above commands (e.g. you can't install Caddy), you can use sg run web-standalone-http instead. This will start a development server using only Node, and will be available at http://localhost:${SOURCEGRAPH_HTTP_PORT}.
API proxy
In both environments, server proxies API requests to SOURCEGRAPH_API_URL provided as the .env variable.