feat(preprod): Add snapshot_status search field with comparison state filters#115580
Merged
mtopo27 merged 2 commits intoMay 14, 2026
Conversation
… filters Add a `snapshot_status` search field (replacing `approval_status`) with support for filtering by all snapshot comparison states: base, no_base, pending, processing, and failed, in addition to the existing approval values. This unifies all Status column badge values under a single searchable field. Refs EME-1147 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment on lines
65
to
71
| allowed_keys={ | ||
| "app_id", | ||
| "app_name", | ||
| "approval_status", | ||
| "snapshot_status", | ||
| "build_configuration_name", | ||
| "build_number", | ||
| "build_version", |
Contributor
There was a problem hiding this comment.
Bug: The frontend allows searching by approval_status, but the backend no longer supports this key, causing search queries to fail.
Severity: MEDIUM
Suggested Fix
Remove 'approval_status' from the SNAPSHOT_ALLOWED_KEYS constant in static/app/components/preprod/constants.ts to align the frontend's autocomplete suggestions with the backend's supported search keys.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/sentry/preprod/artifact_search.py#L65-L71
Potential issue: The backend change removes `approval_status` from the list of allowed
search keys in `artifact_search.py`. However, the frontend constant
`SNAPSHOT_ALLOWED_KEYS` in `static/app/components/preprod/constants.ts` was not updated
and still includes `'approval_status'`. This causes the UI to offer `approval_status` as
a search autocomplete option. When a user selects this option, the resulting search
query will be rejected by the backend with an `InvalidSearchQuery` error.
Also affects:
static/app/components/preprod/constants.ts:45
Did we get this right? 👍 / 👎 to inform future reviews.
NicoHinderling
approved these changes
May 14, 2026
mtopo27
added a commit
that referenced
this pull request
May 14, 2026
) Add `snapshot_status` to the frontend search bar for snapshots, completing the frontend half of the `approval_status` → `snapshot_status` search rename. **New search field with all comparison states** `snapshot_status` is now searchable in the snapshot view with values: `approved`, `auto_approved`, `base`, `failed`, `no_base`, `pending`, `processing`, `requires_approval`. This matches the backend values added in #115580. **Hidden in general Explore UI** The field is added to `HIDDEN_PREPROD_ATTRIBUTES` so it only appears in the snapshot-specific search bar (via `SNAPSHOT_ALLOWED_KEYS`), not in the general Explore interface. Refs EME-1147
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.
Replaces the
approval_statussearch field withsnapshot_status, adding support for filtering by all snapshot comparison states visible in the Status column:base,no_base,pending,processing,failed, plus the existing approval values (approved,auto_approved,requires_approval).New comparison state filters
basematches main-branch builds (nobase_shaon the commit comparison).no_basematches PR builds where the base artifact hasn't been found (combines thewaiting_for_baseandno_base_buildUI states into one searchable value).pending,processing, andfailedfilter byPreprodSnapshotComparison.Statedirectly.Breaking change:
approval_statusis removed. Usesnapshot_statusinstead — the three approval values are unchanged.Refs EME-1147