fix(issues): Prefer project repositories for code mapping - #123093
Draft
scttcper wants to merge 3 commits into
Draft
fix(issues): Prefer project repositories for code mapping#123093scttcper wants to merge 3 commits into
scttcper wants to merge 3 commits into
Conversation
Automatic code mapping scanned every repository the installation could see, including files already covered by an active mapping. That was wasteful and gave unrelated organization repositories the same weight as repositories linked to the project. Skip covered frames, search linked repositories first, and fall back to organization-wide discovery when none match. Keep Java discovery running when it still needs to rebuild a derived in-app rule. Preserve repository identity so identical paths in two linked repositories remain ambiguous instead of picking one. Co-Authored-By: Codex <noreply@openai.com>
Filename-only matches create broad empty stack roots. Do not let automatically generated ones suppress discovery for unrelated frames, while keeping manually configured empty roots authoritative. Co-Authored-By: Codex <noreply@openai.com>
Leave short comments around the Java exception, repository ordering, and ambiguity handling. Co-Authored-By: Codex <noreply@openai.com>
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.
Automatic code mapping was searching every repository an organization's GitHub installation could see before checking whether the project already had a working mapping. That meant extra tree requests, and repositories unrelated to the project were considered alongside repositories already linked to it.
This checks active project mappings first and skips files they already cover. If discovery is still needed, it searches active repositories linked to the project through
ProjectRepository(sentry_projectrepository) first, then falls back to the full organization repository list when none match.When the same file exists in multiple linked repositories, it stays ambiguous instead of picking one. Java still performs discovery when it needs to rebuild a missing derived in-app rule.