Skip to content

ref(types): Add mypy types for sentry.search.snuba.executors#114994

Merged
saponifi3d merged 5 commits into
masterfrom
jcallender/typing/snuba-executors
May 20, 2026
Merged

ref(types): Add mypy types for sentry.search.snuba.executors#114994
saponifi3d merged 5 commits into
masterfrom
jcallender/typing/snuba-executors

Conversation

@saponifi3d
Copy link
Copy Markdown
Contributor

Description

As part of the backend TSC work we want to add types to everything. This PR will add types to the sentry.search.snuba.executors module.

Ticket

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 6, 2026
@saponifi3d saponifi3d force-pushed the jcallender/typing/snuba-executors branch from 6e353b3 to 5d456e9 Compare May 18, 2026 16:53
@saponifi3d saponifi3d marked this pull request as ready for review May 18, 2026 16:53
@saponifi3d saponifi3d requested review from a team as code owners May 18, 2026 16:53
Comment thread src/sentry/search/snuba/executors.py Outdated
@property
@abstractmethod
def aggregation_defs(self) -> Sequence[str] | Expression:
def aggregation_defs(self) -> Mapping[str, Any]:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be a sequence of Mapping[str, Sequence[str] | Callable] where the callable matches this signature:

def recommended_issue_platform_aggregation(
start: datetime,
end: datetime,
aggregate_kwargs: Any = None,
) -> Sequence[str]:
return _recommended_aggregation(
timestamp_column="client_timestamp", type_column="occurrence_type_id"
)

@saponifi3d saponifi3d marked this pull request as draft May 18, 2026 18:15
@saponifi3d saponifi3d force-pushed the jcallender/typing/snuba-executors branch 2 times, most recently from 57db4b1 to ee4afab Compare May 18, 2026 23:42
@saponifi3d saponifi3d marked this pull request as ready for review May 19, 2026 00:05
The aggregation_defs values are typed as Sequence[str], which does not
support the + operator. Wrap in list() before concatenating the alias.
@saponifi3d saponifi3d force-pushed the jcallender/typing/snuba-executors branch from c8102a9 to 7d5e167 Compare May 19, 2026 23:30
@saponifi3d saponifi3d merged commit 9fc3e62 into master May 20, 2026
84 checks passed
@saponifi3d saponifi3d deleted the jcallender/typing/snuba-executors branch May 20, 2026 14:55
JonasBa pushed a commit that referenced this pull request May 21, 2026
# Description
As part of the backend TSC work we want to add types to everything. This
PR will add types to the `sentry.search.snuba.executors` module.


[Ticket](https://linear.app/getsentry/issue/ENG-6457/remove-sentrysearchsnubaexecutors-from-ignore-list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants