Skip to content

Document object storage configuration distributed by frontend - #2136

Draft
bobheadxi wants to merge 4 commits into
mainfrom
robert/object-storage-frontend-config
Draft

bobheadxi wants to merge 4 commits into
mainfrom
robert/object-storage-frontend-config

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Updates the object storage page for sourcegraph/sourcegraph#11843, where frontend distributes the Sourcegraph bucket configuration (SOURCEGRAPH_UPLOAD_*) to the other services.

Merge after sourcegraph/sourcegraph#11843 ships. The page describes behavior from that PR.

Changes

  • Sourcegraph bucket: the bucket is required (matching the notification wording in #11843). A new "Configure frontend" section says to set SOURCEGRAPH_UPLOAD_* on frontend, which services follow frontend's configuration, that a service setting SOURCEGRAPH_UPLOAD_BACKEND uses its own environment instead, and that services restart on their own when frontend's configuration changes. How services behave while connected to an older frontend during an upgrade is left to the #11843 changelog entry.
  • Credentials: only static credentials are distributed (AWS access keys, GCS credentials file contents). The GCS and S3 subsections say that with Workload Identity or IAM roles each service needs access, and that ..._CREDENTIALS_FILE must be mounted at the same path in every service.
  • Legacy: the Code Graph Indexes and Search Job results sections collapse into one "Legacy per-feature buckets" section, describing how Sourcegraph routes legacy stores left on blobstore into the Sourcegraph bucket (when it uses S3 or GCS) and keeps legacy stores on S3 or GCS as they are. The old anchors (#code-graph-indexes, #search-job-results and their subsections) are kept as <span id> aliases, since other pages and the product link to them.
  • Kubernetes: the Helm instructions say to set the variables on frontend instead of six services.

Corrections found while checking against the code: SOURCEGRAPH_UPLOAD_GCP_PROJECT_ID is optional unless SOURCEGRAPH_UPLOAD_MANAGE_BUCKET=true, syntactic-code-intel-worker also reads PRECISE_CODE_INTEL_UPLOAD_*, and the legacy section no longer says SOURCEGRAPH_UPLOAD_GCP_PROJECT_ID is required for the Code Graph Indexes bucket.

Test plan

  • pnpm run check links --check-anchors --check-self-links against the merge-base baseline: no new dead links.
  • Spelling, example hostnames, and duplicated content checks on the diff: no findings.
  • Rendered the page with pnpm dev; all old anchors exist on the page.

Set SOURCEGRAPH_UPLOAD_* on frontend only, describe which credentials
other services resolve themselves, and collapse the Code Graph Indexes
and Search Job results buckets into one legacy section that keeps the
old anchors.

Amp-Thread-ID: https://ampcode.com/threads/T-89958f81-b007-4f8c-a126-ccbd54c551fc
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Nov 5, 2026 4:57pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Direct preview links to pages changed in this PR:

@github-actions

This comment has been minimized.

Services restart on their own when frontend's configuration changes, so
admins don't need to sequence variable changes around an upgrade.

Amp-Thread-ID: https://ampcode.com/threads/T-89958f81-b007-4f8c-a126-ccbd54c551fc
Co-authored-by: Amp <amp@ampcode.com>
multi-node environment.
</Callout>
- `S3` or `GCS`: the feature keeps using its own bucket, configured by its own variables.
- `Blobstore` (the default): if the Sourcegraph bucket uses S3 or GCS, the feature stores its objects in the Sourcegraph bucket, under a key prefix named after its `BUCKET` variable (`lsif-uploads/` or `search-jobs/` by default). If the Sourcegraph bucket also uses blobstore, the feature keeps its own blobstore bucket.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing. Customers don't want / need to know about the internal storage architecture of our blobstore container.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. In a24edca I dropped the sentence about which blobstore bucket a feature uses when the Sourcegraph bucket is also on blobstore. The bullet now just says the feature stores its objects in the Sourcegraph bucket.

I kept the key prefix (lsif-uploads/ or search-jobs/), but only for S3 or GCS. In that case the objects end up in the customer's own bucket, and admins need the prefix to find them or to scope lifecycle rules and IAM policies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amp you need to stfu haha this isn't ready for review!

multi-node environment.
</Callout>
- `S3` or `GCS`: the feature keeps using its own bucket, configured by its own variables.
- `Blobstore` (the default): the feature stores its objects in the Sourcegraph bucket. On S3 or GCS, they are under a key prefix named after the feature's `BUCKET` variable: `lsif-uploads/` or `search-jobs/` by default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, I'm not sure if the confusing part is the docs, or the product's behaviour.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of each. The product part: on a legacy feature, BACKEND=Blobstore, which is also the default, doesn't mean "use blobstore". It means "follow the Sourcegraph bucket" (resolveLegacyCompatStorage in internal/object/sourcegraphobjects/backcompat.go). The docs can't change that, but they don't need to repeat it.

In 2684f44 the bullets are replaced by one rule, written from what the admin configured: a feature keeps its own bucket if its BACKEND is S3 or GCS, and otherwise uses the Sourcegraph bucket. The page no longer mentions Blobstore as a value here. The key prefix sentence stays, now scoped to "when the Sourcegraph bucket is on S3 or GCS".

This branch was successfully deployed

1 active deployment
Preview — 2684f44a Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants