feat(symbols): derive the upload endpoint from --base-uri - #773
Open
abelonogov-ld wants to merge 1 commit into
Open
feat(symbols): derive the upload endpoint from --base-uri#773abelonogov-ld wants to merge 1 commit into
abelonogov-ld wants to merge 1 commit into
Conversation
Uploading to any instance other than production took two flags that had to agree: --base-uri to name the instance, and --backend-url to name that same instance's observability API. The second is derivable from the first, since every instance publishes the API under a host named for it, which is how the production default was already built. --backend-url now defaults to the API of whichever instance --base-uri names, so staging is one flag. Only LaunchDarkly's own hosts are derived from: a base URI aimed at a local stack says nothing about where its observability API listens, so those keep the production default and --backend-url still overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
abelonogov-ld
enabled auto-merge (squash)
August 5, 2026 02:14
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.
Summary
Uploading symbols to anything other than production took two flags that had to agree:
--base-urito name the instance, and--backend-urlto name that same instance's observability API. Staging looked like this:The second flag is derivable from the first. Every instance publishes its observability API under a host named for the instance, which is exactly how the production default in this file was already built, so
--backend-urlnow defaults to the API of whichever instance--base-urinames and the command above loses a line.Only LaunchDarkly's own hosts are derived from. A base URI aimed at a local stack or a proxy says nothing about where its observability API listens, so those keep today's production default, and
--backend-urlstill overrides everything — which is how local development already points athttp://localhost:8082/private.Behavior for the default base URI is unchanged:
app.launchdarkly.comderives the samepri.observability.app.launchdarkly.comthe constant held. The flag's registered default moves from that constant to empty so the derivation can run;--helpnow names the production URL in the description instead.Test plan
go test ./cmd/symbols/— newTestDefaultBackendURLForcovers production, staging, a regional host, trailing slashes and whitespace, and the cases that fall back to the default (local stack, a host that merely ends in the domain name, unset, unparseable)go build ./...--base-uri https://ld-stg.launchdarkly.comand confirm they landMade with Cursor