The Ownership Rules docs state:
This requires code mappings from stack trace linking to be configured first, so Sentry can map file paths between your build output and your repository.
This reads as a general prerequisite, but doesn't convey that CODEOWNERS import binds to one specific code mapping row at import/sync time. In getsentry/sentry, ProjectCodeOwners.repository_project_path_config is a unique FK to a single RepositoryProjectPathConfig, and convert_codeowners_syntax() bakes that mapping's stack/source root transform into the stored rule once, rather than resolving dynamically against the repo's current code mapping(s) at match time.
Practical implications not covered in the docs:
- If a repo has multiple code mappings, CODEOWNERS must be (re-)imported once per mapping to cover each path variant ("Import CODEOWNERS" can be run multiple times with different mappings selected).
- If a code mapping is added or changed after CODEOWNERS was imported, existing CODEOWNERS rules keep the old transform baked in and won't automatically pick up the new mapping without a re-import/re-sync.
- A mismatched or no-op mapping (e.g., empty source root) silently produces CODEOWNERS rules that don't match actual in-app frame paths, with no error surfaced to the user.
Suggest clarifying in the #code-owners section that the code mapping used for CODEOWNERS is explicitly selected during import and is not automatically kept in sync with other mappings on the same repository integration.
via simon.
--
View Junior Session [Sentry]
The Ownership Rules docs state:
This reads as a general prerequisite, but doesn't convey that CODEOWNERS import binds to one specific code mapping row at import/sync time. In
getsentry/sentry,ProjectCodeOwners.repository_project_path_configis a unique FK to a singleRepositoryProjectPathConfig, andconvert_codeowners_syntax()bakes that mapping's stack/source root transform into the stored rule once, rather than resolving dynamically against the repo's current code mapping(s) at match time.Practical implications not covered in the docs:
Suggest clarifying in the
#code-ownerssection that the code mapping used for CODEOWNERS is explicitly selected during import and is not automatically kept in sync with other mappings on the same repository integration.via simon.
--
View Junior Session [Sentry]