Skip to content

feat(snapshots): Follow the server-selected objectstore usecase - #3408

Open
NicoHinderling wants to merge 5 commits into
masterfrom
feat/snapshots-objectstore-usecase
Open

NicoHinderling wants to merge 5 commits into
masterfrom
feat/snapshots-objectstore-usecase

Conversation

@NicoHinderling

@NicoHinderling NicoHinderling commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Snapshot uploads now request usecase=auto and build their Objectstore session from the usecase returned by the server rather than hardcoding preprod. 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 into preprod_snapshots without 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 for preprod_snapshots, explicit preprod, 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_snapshots in Objectstore before deploying the backend prerequisite and enable the option only after the backend rollout. Older CLI releases keep writing to preprod and remain readable through fallback reads.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2053b7d

@NicoHinderling
NicoHinderling marked this pull request as ready for review September 11, 2026 21:02
@NicoHinderling

Copy link
Copy Markdown
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 NicoHinderling changed the title feat(snapshots): Upload images under the snapshots objectstore usecase feat(snapshots): Follow the server-selected objectstore usecase Sep 14, 2026
@NicoHinderling
NicoHinderling force-pushed the feat/snapshots-objectstore-usecase branch from 3990dab to 2053b7d Compare September 14, 2026 18:28
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.
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.

1 participant