Repository navigation
feat(issues): Add a same_title type to the related issues endpoint - #131717
Merged
Merged
Conversation
/related/?type=same_title returns error issues in the same project whose events in the last 14 days have exactly the same title as the issue's event, most recently seen first. It runs the issue stream's title filter as an issue search, like the contributing type, so it checks every recent issue rather than a fixed sample.
Christinarlong
marked this pull request as ready for review
November 18, 2026 23:51
scttcper
approved these changes
Nov 19, 2026
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.
Add back the same title matching to be removed in #131388 to the new related issues endpoint.
The matching methodology does differ a bit tho. Instead of grabbing the last 100 issues from postgres and then doing exact title comparisons on each. This approach queries snuba snuba instead for the exact title from any event in the past 14d and we're now only doing this process for error issues.
AI Overview
What?
GET /organizations/{org}/issues/{id}/related/?type=same_titlereturns error issues in the same project whose events have exactly the same title as this issue's event (the latest, or the one passed ineventId):{ "data": [{"issue": {"shortId": "PUMP-STATION-2", "...": "..."}, "relations": [{"type": "same_title"}]}], "meta": {"types": [{ "type": "same_title", "status": "ok", "eventId": "60fc17404bf4445c81675be939ef74d6", "title": "ValueError: invalid literal for int() with base 10: 'abc'" }]} }It searches the last 14 days, most recently seen first, up to
limit. Non-error issues getnot_applicable.Why?
Grouping splits errors by stack trace, so one cause reached from several places, or one outage seen by several callers, becomes several issues with the same title.
similar_stacktracemisses these by design, andsame_traceonly finds them when they share a trace. The oldsame_root_causetype of/related-issues/(removed in #131388) did this, but only compared the stored titles of a project's 100 oldest issues.Rollout and failure modes
typenow run it too. Types run one after another, so that adds one issue search.unavailable, and a 503 only when it's the only type requested.Notes
contributing.py: an issue search with the same referrer,SnubaErrormapped tounavailable, and a meta entry built likesame_trace's. The new logic is the search filter insame_title.py:issue.category:errorthrough the issue search parser, plus atitlefilter built withuse_raw_value, so titles need no escaping and a*in a title isn't a wildcard.ChunkLoadError) bounded. Worth widening later?🤖 Generated with Claude Code