feat(preprod): Read app icons from the size-analysis usecase - #124328
Conversation
8bf7418 to
1220e9b
Compare
| # TODO: On January 1, 2027, remove the preprod fallback for app icons. | ||
| result = get_session(UsecaseId.PREPROD, project).get(object_key) | ||
| else: | ||
| result = get_snapshot_storage(project).get(object_key) |
There was a problem hiding this comment.
this it a little unintuitive but get_snapshot_storage will first check the preprod_snapshots use case and if it's not there it will fall back to preprod
so between this completing deployment and the frontend one not out yet , app icon requests will go through get_snapshot_storage but will still work thanks to this fallback
once the FE PR deploys, it will specify is_app_icon and those size requests wont go through get_snapshot_storage anymore
| @@ -90,6 +90,7 @@ class UsecaseId(Enum): | |||
| PROFILE_ATTACHMENTS = "profile_attachments" | |||
| PREPROD = "preprod" | |||
There was a problem hiding this comment.
Might be good to add a #Deprecated comment on this one just to make sure people/agents don't accidentally use it
| if is_app_icon: | ||
| result = get_session(UsecaseId.PREPROD_SIZE, project).get(object_key) | ||
| if result is None: | ||
| # TODO: On January 1, 2027, remove the preprod fallback for app icons. |
There was a problem hiding this comment.
I'd add a metric and/or log here to let us know how often this is being set as PREPROD so we can have insight into this when we remove
Also track in linear so we don't forget to delete it 😉
There was a problem hiding this comment.
Track completed size-icon and snapshot fallback reads by outcome for the health dashboard. Mark the shared preprod usecase deprecated while preserving migration compatibility. Refs EME-1313
e2ab7e5 to
c4cf5e6
Compare
…4330) Makes the shared image endpoint's request type explicit throughout the preprod UI. App icons send `image_type=preprod_size_app_icon`; snapshot screenshots and diff masks send `image_type=preprod_snapshots`. Snapshot URL construction is shared across the normal image helper and both diff-mask render paths, while preserving the encoded `filename` parameter used by Save Image As. Backend support is stacked as #124194 → #124328 and should deploy first. The endpoint uses the shared snapshot reader for snapshots and untyped legacy requests, and a separate size-icon reader for `preprod_size_app_icon`; it never interprets image-ID prefixes. Deploy this frontend before getsentry/launchpad#684 switches app-icon writes. Cached clients that omit `image_type` can still miss icons stored only in `preprod_size` until refreshed. This PR changes only frontend requests, not storage or retention policies.
Adds
UsecaseId.PREPROD_SIZE(preprod_size) and explicitimage_typehandling in the shared image endpoint. Uses the shared snapshot reader introduced by #124194, now onmaster.preprod_size_app_icon: readpreprod_size, thenpreprodif missing.preprod_snapshots: delegate toget_snapshot_storage, preserving its two-namespace reader.image_type: use the shared snapshot reader for legacy requests. IDs remain opaque; no prefix selects a reader.The independent #124210 controls the snapshot reader's primary/write usecase. The reader defaults to
preprodfirst; when that option is enabled, it triespreprod_snapshotsfirst and falls back topreprod. This PR neither enables that option nor resolves its outstanding rollout blocker.Both size-icon fallback reads and snapshot GET/HEAD fallback reads emit
preprod.objectstore.fallbacklogs with the reader'simage_type,operation, andfoundresult for the Preprod Health dashboard. The logs count completed secondary reads, not primary hits or storage errors; the snapshot secondary namespace depends on the write option. MarksUsecaseId.PREPRODdeprecated for new code while retaining migration compatibility. Cleanup is tracked in EME-1313, and both January 1, 2027 TODOs remain.Companion frontend: #124330. Companion writer: getsentry/launchpad#684. Confirm the Objectstore expiration safeguards from getsentry/ops#23486 are deployed, deploy the shared reader and this backend change, then deploy the frontend before switching Launchpad writes. Cached clients that omit
image_typecan still miss icons stored only inpreprod_sizeuntil refreshed; the default reader does not infer icon type from IDs.