fix(snapshots): Use org/project-scoped object keys for snapshot uploads#3186
Merged
fix(snapshots): Use org/project-scoped object keys for snapshot uploads#3186
Conversation
Contributor
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Fixes
- Use org/project-scoped object keys for snapshot uploads ([#3186](https://github.com/getsentry/sentry-cli/pull/3186))If none of the above apply, you can opt out of this check by adding |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
NicoHinderling
approved these changes
Mar 4, 2026
528e76d to
805e229
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
805e229 to
effb34b
Compare
Member
Author
|
Same as #3185 (comment), merging this to unblock and I can explain tomorrow @szokeasaurusrex |
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.
Changes the objectstore key format from
{hash}to{org_id}/{project_id}/{hash}for snapshot image uploads.This is needed because the the ProjectPreprodArtifactImageEndpoint https://github.com/getsentry/sentry/blob/948dfedb37bd20bda491a233568f5e711899368a/src/sentry/preprod/api/endpoints/project_preprod_artifact_image.py expects this format, including org and project id in the key, not just the hash.
That endpoint is also used by app icons which were using roughly the same format, so we cannot easily change it.
The org and project IDs are extracted from the objectstore scopes that are already provided in the upload options, with explicit validation that both are present.
This creates an implicit contract on the snapshots upload options endpoint, requiring it to always return organization and project IDs as scopes in the ObjectstoreUploadOptions struct.
This is not ideal, but in practice this should always be the case and there's no logical reason for that to change over time. It would be a breaking change for anything else that needs to read or write the snapshots.