feat(seer): Scaffold Night Shift settings section#113696
Closed
chromy wants to merge 9 commits intochromy/2026-04-21-nightshift-settings-backendfrom
Closed
feat(seer): Scaffold Night Shift settings section#113696chromy wants to merge 9 commits intochromy/2026-04-21-nightshift-settings-backendfrom
chromy wants to merge 9 commits intochromy/2026-04-21-nightshift-settings-backendfrom
Conversation
…ame) (#113626) Update settings pages to better colocate filters alongside the components they are controlling or rendering Fix DE-1182 --------- Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
ref STREAM-882 ## Summary - Bump taskbroker-client minimum version from 0.1.8 to 0.1.9 - Add `<1` upper bound to exclude erroneous version 26.5.0 which has wrong version scheme colliding with calver (May 2026 = 26.5.x) ## Test plan - CI should pass with the new dependency constraint 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
\`sentry.models.group.GroupStatus\` is a plain class whose members are ints (\`RESOLVED = 1\`, \`IGNORED = 2\`, etc.) — not an enum. Callers of the functions below all pass ints, and the in-function \`==\` comparisons (\`group_status == GroupStatus.RESOLVED\`) are int-vs-int. But the parameters were annotated as \`GroupStatus\`, i.e. \"instance of GroupStatus\", which is never what the callers pass. Under \`strict_equality = true\` the comparisons become semantically unreachable (instance-of-class never equals int). Stricter mypy reports them as \`[unreachable]\`. Change the annotations to \`int\` to match actual usage: - \`fetch_alert_threshold\` - \`fetch_resolve_threshold\` - \`AlertContext.from_workflow_engine_models\` - \`MetricAlertNotificationMessageBuilder.build_alert_context\` No runtime behavior change. Prep for the mypy 1.20 upgrade (#113419). Safe under 1.19.1. Agent transcript: https://claudescope.sentry.dev/share/wKKwnZeeYc-V3zQbolQDCON52n93vyqkCmPrIs_kbnI
Needed to be somewhat careful to avoid cycles, since we're deleting both ways. Fixes ISWF-2506. Also addresses a root cause of ISWF-2302.
…#113627) This is a step towards allowing us to cache disabled Detectors, which can make our cache useful in more contexts (such as for Uptime).
…#113616) Fix the `get_metric_metadata` RPC handler to use `count(value)` instead of zero-arg `count()` in its tracemetrics query. The `tracemetrics` dataset parser requires `count()` to take an attribute argument. Zero-arg `count()` parse-fails at the events layer with `status=400 body={'detail': 'Invalid number of arguments for count, was expecting 1 arguments', 'code': 'parse_error'}`. Every call to this handler since it was merged in #113462 has been returning `events_query_failed` — the Seer assisted-query metrics agent has never once received real candidates from this tool and has been silently falling back to `get_field_values` probes instead. The bug wasn't caught because the existing tests mocked `sentry.api.client` wholesale and never exercised the real parser. This PR also adds `TestGetMetricMetadataIntegration`, which persists real `TraceItem`s and hits the handler end-to-end via `TraceMetricsTestCase` — this is the shape of test that would have caught the original bug, and will catch future regressions in the aggregate-function shape. While here, the `ApiError` catch block now attaches `status_code` and a 500-char body prefix to its `logger.exception` extras so future flakes are debuggable from logs without a new deploy cycle. Reproduction (before this PR, on prod): ``` POST /api/0/organizations/1/seer-rpc/get_metric_metadata/ {"args": {"org_id": 1, "project_ids": [1], "name_substrings": ["storage.put.size"], "stats_period": "7d", "limit": 20}} ``` returns `{"candidates": [], "has_more": false, "error": "events_query_failed"}` on every substring, 25/25 tries. After this PR the same request returns populated candidates. Refs #113462 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
Add a new "Night Shift" section to the project-level Autofix settings page with an enable toggle, a model picker, and a "Run Now" button. None of the controls are wired to the backend yet — this is UI scaffolding so later changes can layer on persistence and the real test-run action without re-laying out the page. The section is gated behind the organizations:seer-night-shift feature flag (exposed to the UI in 93556ac) via the Feature component. Co-Authored-By: Claude <noreply@anthropic.com> Agent transcript: https://claudescope.sentry.dev/share/q8-tQCv6rVXlowTzKrlbB_WsXutoe8wfi0_7ZgOwZIU
13a3280 to
5c4f959
Compare
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.
No description provided.