feat(seer): Add org flags for Seer default settings#104362
Conversation
…ion (to other llms)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #104362 +/- ##
=========================================
Coverage 80.52% 80.53%
=========================================
Files 9330 9330
Lines 400731 400853 +122
Branches 25695 25695
=========================================
+ Hits 322692 322828 +136
+ Misses 77573 77559 -14
Partials 466 466 |
More skeleton for the new version of org-level Seer settings page. Project and Repo pages have the tabs navigation too, but no content yet. This page isn't functional yet, but all the buttons are places along with copywriting. I want to get the copywriting out there so it's possible for others to review/tweak it while i keep going. I also added permissions checks, so if you don't have write access everything is disabled: **The full page** <img width="1272" height="1184" alt="SCR-20251204-lyzx" src="https://github.com/user-attachments/assets/04f658a1-ad00-467d-bbcb-2c4bd00f48ce" /> **The fields, and their behaviors** | Label | Field | values | Desc | | --- | --- | --- | --- | | Auto-Trigger Fixes by Default | `org.defaultAutofixAutomationTuning` | `off` or `default` | This is a default value when users create a new project<->repo tuple. Every pair is expected to have one of these two values saved in the database | Automatic PR Creation by Default | `org. autoOpenPrs` | `true` or `false` | Same as above | Allow Delegation to Background Agents | `org.allowBackgroundAgentDelegation` | `true` or `false` | Killswitch for allowing delegation to other LLMs, See #104362 for desc, depends on backend updates | | | | | Enable Code Review by Default | `org.?` | ? | ? | Code Review Trigger | ? | ? | ? | | | | | Enable Seer Context in Alerts | `org.enableSeerEnhancedAlerts` | `true` or `false` | Changes template of some email/slack/etc messages to include llm output --------- Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> Co-authored-by: Armen Zambrano G. <44410+armenzg@users.noreply.github.com> Co-authored-by: Billy Vong <billyvg@users.noreply.github.com>
c8dcb9e to
6762887
Compare
|
🚨 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 |
1685e80 to
459b300
Compare
src/sentry/constants.py
Outdated
| # After this date APIs that are incompatible with cell routing | ||
| # will begin periodic brownouts. | ||
| CELL_API_DEPRECATION_DATE = datetime(2025, 5, 15, 0, 0, 0, tzinfo=UTC) | ||
| CELL_API_DEPRECATION_DATE = datetime(2026, 5, 15, 0, 0, 0, tzinfo=UTC) |
There was a problem hiding this comment.
Bug: Unrelated deprecation date change included in PR
The CELL_API_DEPRECATION_DATE was changed from 2025 to 2026, which is completely unrelated to the PR's purpose of adding Seer organization flags. This appears to be an accidentally included change that may have come from a different branch or commit. The change modifies a deprecation schedule for APIs incompatible with cell routing, which has nothing to do with Seer code review triggers or background agent delegation settings.
This sticks close to https://github.com/getsentry/sentry/pull/104205/files to add the fields.
allowBackgroundAgentDelegation
This is for auto-fix purposes.
So we will have to read this value ALONG with the project settings when it comes time to make LLM calls:
autoEnableCodeReview
This is for code-review
When a new repo is created on github and connect to sentry users can optionally automatically setup code review for it.
What we'll do is read this field when we first connect the github integration, or whenever we get the
create:repowebhook. If this is true then we'll mark the repo as being enabled for code review!defaultCodeReviewTriggers
This is for code-review as well.
As with the
autoEnableCodeReviewflag above, when we're automatically adding a new repo, we will also automatically copy over these settings to that new repo.We should copy over the triggers into the repo-level code-review database in all cases, even if the repo is not enabled for review. That will make it easier to toggle reviews on/off for repos, because the defaults will be setup already!