feat(snapshots): Follow the server-selected objectstore usecase - #3408
Merged
Merged
Conversation
Contributor
|
NicoHinderling
marked this pull request as ready for review
September 11, 2026 21:02
NicoHinderling
requested review from
a team and
szokeasaurusrex
as code owners
September 11, 2026 21:02
Contributor
Author
|
Closing: the server side will move size-analysis content to a separate objectstore usecase instead, so snapshots keep using preprod and no CLI change is needed. |
Request usecase=auto so the server picks the usecase from its own config, leaving future usecase changes entirely server-side.
Exercise authenticated batch checks and uploads for preprod_snapshots and preprod, including the legacy response without a usecase. Keep the changelog entry unreleased.
NicoHinderling
force-pushed
the
feat/snapshots-objectstore-usecase
branch
from
September 14, 2026 18:28
3990dab to
2053b7d
Compare
pull Bot
pushed a commit
to BoomchainLabs/sentry
that referenced
this pull request
Sep 14, 2026
…etsentry#124194) Prepares snapshot storage to move from the shared `preprod` Objectstore usecase into `preprod_snapshots`. This PR registers the new usecase and adds cross-usecase reads, HEAD checks, and deletes through `SnapshotStorage`. Writes remain on `preprod`, so this deploy does not move stored content or change the write destination. The fallback metric records when reads use the secondary usecase. The upload-options endpoint also accepts `usecase=auto` and echoes the chosen usecase in its response. Requests without the parameter keep receiving `preprod` tokens for compatibility with existing CLI releases. getsentry/sentry-cli#3408 and getsentry/cli#1587 opt into this contract; getsentry#124210 adds the default-off option that selects `preprod_snapshots` for new writes. Register `preprod_snapshots` in the Objectstore service configuration **before deploying this prerequisite**: fallback reads may access it whenever an object is missing from `preprod`. Deploy the backend stack fully before enabling the write-selection option. No content-copy migration is required; existing uploads remain readable through the fallback.
szokeasaurusrex
approved these changes
Sep 15, 2026
szokeasaurusrex
left a comment
Member
There was a problem hiding this comment.
I trust you have tested this end to end? If yes, lgtm!
pull Bot
pushed a commit
to Mu-L/sentry
that referenced
this pull request
Sep 15, 2026
…sentry#124210) Adds the default-off boolean option `preprod.snapshots.objectstore.snapshots-usecase.enabled` to select the destination for new snapshot content, using the shared storage reader introduced by getsentry#124194, now on `master`. With the option off, writes remain on `preprod`. When enabled, server-side writes (manifests, precomputed head images, comparison results, diff masks, and ZIP archives) use `preprod_snapshots`, and reads prefer that namespace before falling back to `preprod`. Upload-options requests with `usecase=auto` receive a token for the selected usecase and its name in the response; getsentry/sentry-cli#3408 and getsentry/cli#1587 use that contract for direct screenshot uploads. Requests without `usecase=auto` continue receiving `preprod` tokens even when the option is enabled. The Objectstore policy change in getsentry/ops#23486 is merged; confirm it is deployed and deploy the backend stack fully before enabling the option through sentry-options-automator. Because deduplication is scoped by usecase, upgraded clients re-upload images once after the switch; later uploads deduplicate normally. **Outstanding review blocker:** comparison outputs currently reuse artifact-pair keys. Recomputing a comparison across a usecase switch and then rolling back can read an older manifest or mask while the database describes the newer result. Before rollout, comparison generations need authoritative, generation-qualified storage references with rolling-deploy compatibility. This is a broader follow-up than cleanup; do not enable getsentry/sentry-options-automator#9713 until it is addressed.
NicoHinderling
added a commit
to getsentry/cli
that referenced
this pull request
Sep 15, 2026
Snapshot uploads now request `usecase=auto` from the upload-options endpoint and use the server's returned usecase for both HEAD deduplication checks and PUT uploads, rather than hardcoding `preprod`. This keeps Objectstore paths aligned with the minted token and lets the backend move new snapshot content into `preprod_snapshots` without another CLI change. When older servers omit `usecase`, response parsing defaults it to `preprod`, preserving the existing upload behavior. Object keys remain unchanged; because deduplication is scoped by usecase, the first upload after a server-side switch re-uploads images once. Pairs with getsentry/sentry#124194 (cross-usecase reads and the upload-options contract) and getsentry/sentry#124210 (server-controlled write selection). getsentry/sentry-cli#3408 implements the same contract in the legacy CLI; both clients are being updated. The backend option remains off by default: register `preprod_snapshots` in Objectstore before deploying the backend prerequisite, then enable the option only after the backend rollout. Older CLI releases keep writing to `preprod` and remain readable through fallback reads.
17 tasks
BYK
pushed a commit
to getsentry/sentry-mcp
that referenced
this pull request
Sep 18, 2026
Snapshot uploads now request `usecase=auto` from the upload-options endpoint and use the server's returned usecase for both HEAD deduplication checks and PUT uploads, rather than hardcoding `preprod`. This keeps Objectstore paths aligned with the minted token and lets the backend move new snapshot content into `preprod_snapshots` without another CLI change. When older servers omit `usecase`, response parsing defaults it to `preprod`, preserving the existing upload behavior. Object keys remain unchanged; because deduplication is scoped by usecase, the first upload after a server-side switch re-uploads images once. Pairs with getsentry/sentry#124194 (cross-usecase reads and the upload-options contract) and getsentry/sentry#124210 (server-controlled write selection). getsentry/sentry-cli#3408 implements the same contract in the legacy CLI; both clients are being updated. The backend option remains off by default: register `preprod_snapshots` in Objectstore before deploying the backend prerequisite, then enable the option only after the backend rollout. Older CLI releases keep writing to `preprod` and remain readable through fallback reads.
BYK
pushed a commit
to getsentry/sentry-mcp
that referenced
this pull request
Sep 23, 2026
Snapshot uploads now request `usecase=auto` from the upload-options endpoint and use the server's returned usecase for both HEAD deduplication checks and PUT uploads, rather than hardcoding `preprod`. This keeps Objectstore paths aligned with the minted token and lets the backend move new snapshot content into `preprod_snapshots` without another CLI change. When older servers omit `usecase`, response parsing defaults it to `preprod`, preserving the existing upload behavior. Object keys remain unchanged; because deduplication is scoped by usecase, the first upload after a server-side switch re-uploads images once. Pairs with getsentry/sentry#124194 (cross-usecase reads and the upload-options contract) and getsentry/sentry#124210 (server-controlled write selection). getsentry/sentry-cli#3408 implements the same contract in the legacy CLI; both clients are being updated. The backend option remains off by default: register `preprod_snapshots` in Objectstore before deploying the backend prerequisite, then enable the option only after the backend rollout. Older CLI releases keep writing to `preprod` and remain readable through fallback reads.
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.
Snapshot uploads now request
usecase=autoand build their Objectstore session from the usecase returned by the server rather than hardcodingpreprod. Both batched HEAD checks and image uploads use that session, keeping their paths aligned with the minted token. This lets the backend move new snapshot content intopreprod_snapshotswithout another CLI change.Servers that omit the response field default to
preprod, so existing Sentry versions retain their current behavior. The integration coverage exercises actual upload-options requests, authenticated Objectstore batches, and snapshot creation forpreprod_snapshots, explicitpreprod, and an omitted usecase. Object keys stay unchanged; the first upload after a usecase switch re-uploads images once because deduplication is scoped by usecase.Pairs with getsentry/sentry#124194 (cross-usecase reads and the upload-options contract) and getsentry/sentry#124210 (default-off write selection). getsentry/cli#1587 implements the same contract in the replacement CLI; both clients are being updated. Register
preprod_snapshotsin Objectstore before deploying the backend prerequisite and enable the option only after the backend rollout. Older CLI releases keep writing topreprodand remain readable through fallback reads.