Skip to content

Conversation

@shashjar
Copy link
Member

This PR implements a double read from EAP of the top 5 issues by event count.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 26, 2025
@shashjar shashjar requested review from a team and thetruecpaul December 29, 2025 21:33
@shashjar shashjar marked this pull request as ready for review December 29, 2025 21:34
@shashjar shashjar requested review from a team as code owners December 29, 2025 21:34
@shashjar shashjar removed request for a team December 29, 2025 21:34
) -> list[dict[str, Any]]:
"""EAP implementation: Given a list of issue group ids, return a sublist of the top 5 ordered by event count"""
organization = Organization.objects.get(id=project.organization_id)
now = datetime.now(tz=timezone.utc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This appears to technically be different from the Snuba implementation, which doesn't specify a timezone. (Though that might get set somewhere in the Snuba framework?)

end=now,
organization=organization,
projects=[project],
environments=[],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think environments is an empty list by default

"integrations.pr_comment.get_top_5_issues_by_count"
):
eap_results = self._get_top_5_issues_by_count_eap(issue_ids, project)
results = EAPOccurrencesComparator.check_and_choose(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can you add resonable-match and null-result here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure that reasonable-match makes complete sense here, since the difference in retention could mean that there's no overlap in the highest-count group IDs (although I'm not sure whether this would be common or not)

@shashjar shashjar merged commit 301984c into master Jan 5, 2026
65 checks passed
@shashjar shashjar deleted the double-read-top-5-issues-by-count-from-eap branch January 5, 2026 20:06
cathteng pushed a commit that referenced this pull request Jan 5, 2026
…s by event count (#105460)

This PR implements a double read from EAP of the top 5 issues by event
count.
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.

3 participants