Skip to content

Conversation

@jasonyuezhang
Copy link
Owner

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@jasonyuezhang jasonyuezhang marked this pull request as ready for review November 14, 2025 00:28
@propel-test-bot
Copy link

propel-test-bot bot commented Nov 14, 2025

Add Early-Access Search Layer, Alert Rule-History Framework & Unified CLI Runner

This PR lays down three large foundations: (1) an Early-Access Program (EAP) search abstraction that lets opted-in projects run experimental columns and formulas; (2) a full rule-history recording pipeline that persists every alert-rule evaluation and exposes preview / analytics endpoints; and (3) a refactor of the Sentry CLI runner that introduces a presenter hierarchy for consistent UX across all commands. Together these changes unlock upcoming customer-facing features (advanced search and alert analytics) while modernising internal tooling. The change set touches ~100 files, updates most builders, processors and commands, and introduces several new packages.

Key Changes

• New sentry/search/eap package with columns, formulas, validators and utilities
• Builders (spans, metrics, discover, etc.) extended to route queries to EAP when project/org is enrolled
• Back-pressure health checks to throttle EAP traffic
• New sentry/rules/history module with models, strategy layer, preview API and project endpoints
• All rule condition/filter/action classes instrumented to emit history events
• Presenter-based CLI runner with unified output formatting; all core commands migrated
• Type hints and manager generics tightened across several Django models
• Minor integration fixes (Bitbucket, GitLab, PagerDuty, VSTS, Jira) to comply with new search & rule APIs

Affected Areas

• Search/Discover query builders
• Alert-rule processing & history recording
• CLI runner and command implementations
• Integrations touching search or rules APIs
• Django model type stubs and managers

This summary was automatically generated by @propel-code-bot

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/api_ownership_allowlist_dont_modify.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/api_publish_status_allowlist_dont_modify.py
Line: 1

@@ -1,4 +1,4 @@
from typing import Any
from typing import int, Any

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/build.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/constants.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/autofix_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/dashboard_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/discover_performance_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/discover_saved_query_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/environment_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/event_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/explore_saved_query_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/integration_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/issue_alert_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/issue_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/metric_alert_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/notification_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/organization_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/organization_member_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/ownership_examples.py
Line: 1

@@ -1,4 +1,4 @@
from typing import Any
from typing import int, Any

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/project_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/release_threshold_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/replay_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/scim_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/sentry_app_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/session_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/tags_examples.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/team_examples.py
Line: 1

@@ -3,7 +3,7 @@
import re

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

Remove invalid import: int is a built-in type and should not be imported from typing.

Context for Agents
[**Documentation**]

Remove invalid import: `int` is a built-in type and should not be imported from `typing`.

File: src/sentry/apidocs/hooks.py
Line: 3

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/examples/user_examples.py
Line: 1

@@ -34,7 +34,7 @@
from collections import defaultdict
from enum import Enum

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

Remove invalid import: int is a built-in type and should not be imported from typing.

Context for Agents
[**Documentation**]

Remove invalid import: `int` is a built-in type and should not be imported from `typing`.

File: src/sentry/apidocs/spectacular_ports.py
Line: 35

@@ -1,4 +1,4 @@
from typing import Any, get_type_hints
from typing import Any, get_type_hints, int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/extensions.py
Line: 1

@@ -5,7 +5,7 @@
import typing
from collections.abc import Generator
from contextlib import contextmanager

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

Remove invalid import: int is a built-in type and should not be imported from typing.

Context for Agents
[**Documentation**]

Remove invalid import: `int` is a built-in type and should not be imported from `typing`.

File: src/sentry/apidocs/utils.py
Line: 7

@@ -3,7 +3,7 @@
import re
from collections import OrderedDict
from collections.abc import Mapping
from typing import Any, Literal, TypedDict
from typing import Any, Literal, TypedDict, int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/hooks.py
Line: 6

@@ -1,4 +1,4 @@
from typing import Any
from typing import int, Any

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/parameters.py
Line: 1

@@ -1,3 +1,4 @@
from typing import int

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Documentation]

The typing module does not expose the built-in type "int". Remove this import.

Context for Agents
[**Documentation**]

The typing module does not expose the built-in type "int". Remove this import.

File: src/sentry/apidocs/schema.py
Line: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants