Repository navigation
Add migrator to the outbound HTTP proxy example - #975
Merged
Merged
Conversation
migrator's drift, upgrade, and downgrade commands call releaseregistry.sourcegraph.com and storage.googleapis.com before touching the databases. Route them through the proxy alongside frontend and worker.
bobheadxi
approved these changes
Oct 21, 2026
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.
Why
migratorwas left out of theoutbound-http-proxyexample on the assumption that it only talks to Postgres. It does not. On currentmainof sourcegraph/sourcegraph, thedrift,upgrade, anddowngradecommands each run, before touching the databases:isAirgapped:HEAD https://storage.googleapis.com/sourcegraph-assets/migrations/drift/...(3 s timeout)checkForMigratorUpdate:GET https://releaseregistry.sourcegraph.com/v1/releases/sourcegraph/latest(3 s timeout). If a newer migrator exists and-ignore-migrator-updateis not set, migrator exits 1.driftalso fetches the expected schema fromstorage.googleapis.comwhen it is not baked into the image.All of these go through Go's
http.DefaultClient, soHTTP_PROXY/HTTPS_PROXY/NO_PROXYapply.The default
upcommand makes none of these calls.What
Add
migratorto the example override with the same*proxy-env-varsanchor as frontend and worker, with a comment saying which commands reach out and where.Test plan
helm template sg charts/sourcegraph -f charts/sourcegraph/examples/outbound-http-proxy/override.yaml: themigratorinitContainer rendersHTTP_PROXY,HTTPS_PROXY,NO_PROXYand keepsDEPLOY_TYPE=helmand allPG*varshelm lintwith the override: clean./scripts/helm-docs.sh: no README changes