ref(seer): Generalize Night Shift run models - #124301
Merged
Merged
Conversation
Reuse Night Shift's tables for shared workflow history and track result completion through feature delivery. Preserve existing tables and dispatch timestamps during rollout.
trevor-e
marked this pull request as ready for review
September 14, 2026 18:09
trevor-e
commented
Sep 14, 2026
| __relocation_scope__ = RelocationScope.Excluded | ||
|
|
||
| run = FlexibleForeignKey( | ||
| "seer.SeerWorkflowRun", on_delete=models.CASCADE, related_name="executions" |
Member
Author
There was a problem hiding this comment.
Renamed this to executions since shards caused some confusion.
NicoHinderling
approved these changes
Sep 14, 2026
wedamija
approved these changes
Sep 14, 2026
wedamija
left a comment
Member
There was a problem hiding this comment.
migration lgtm, just a state no-op
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Custom state/database change combination
--
-- (no-op) |
This was referenced Sep 14, 2026
trevor-e
added a commit
that referenced
this pull request
Sep 14, 2026
Adds flag-gated manual monitor scans through POST on the existing Seer workflows endpoint. Each scan creates a `SeerWorkflowRun` and one execution linked to its Seer feature run. History queries the shared workflow table alongside Night Shift, with project-access filtering for monitor findings. Seer callback delivery parses the response and stores findings and completion status in `SeerAgentRun.extras`. The API returns the workflow ID separately from the Seer UUID used by Explorer links. Night Shift keeps its specialized issue-result records. Uses the workflow models introduced in #124301. The Seer registration is getsentry/seer#8151. Land this backend before the frontend PR, #123978.
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.
Generalize
SeerNightShiftRunandSeerNightShiftRunShardintoSeerWorkflowRunandSeerWorkflowRunExecutionso other workflows can reuse the invocation and execution records. Move them into the workflow models module and update their references and reverse relationships.One state-only migration preserves the existing database tables, columns, and IDs. Night Shift keeps its specialized issue-result records, API responses, dispatch/completion behavior, and feature-delivery contract. This prepares the models for monitor cleanup (#123966).