Skip to content

chore(codeowners): Remove stale entries and add missing assignments#110176

Open
mrduncan wants to merge 3 commits intomasterfrom
mrduncan/remove-stale-codeowners
Open

chore(codeowners): Remove stale entries and add missing assignments#110176
mrduncan wants to merge 3 commits intomasterfrom
mrduncan/remove-stale-codeowners

Conversation

@mrduncan
Copy link
Member

@mrduncan mrduncan commented Mar 7, 2026

Changes:

  1. Remove 10 entries for deleted files/dirs and update 11 entries for files/dirs that were moved.
  2. Fix some easy missing ownership assignments
  3. Fix shadowed entries where a later ownership assignment prevented an earlier one from ever applying

The changes are more easily reviewable on a commit by commit basis.

Remove 10 entries for deleted files/dirs and update 11 entries for
files/dirs that were moved.

Removed (deleted from codebase):
- /src/sentry/search/events/datasets/metrics_layer.py (removed in #108755)
- /src/sentry/utils/relocation.py (removed in #101738)
- requirements*.txt (removed in #97627, uv migration)
- babel.config.* (removed in #93303, jest 30 migration)
- jest-balance.json (never existed as tracked file)
- /src/sentry/api/endpoints/user_social_identity* (removed in #77231)
- /src/sentry/tasks/check_new_issue_threshold_met.py (removed in #97894)
- /tests/sentry/tasks/test_backfill_seer_grouping_records.py (removed in #102364)
- /tests/sentry/tasks/test_check_new_issue_threshold_met.py (removed in #97894)
- /src/sentry/api/endpoints/check_am2_compatibility.py (removed in #104288)

Updated (moved to new locations):
- event_reprocessable.py → /src/sentry/issues/endpoints/ (#97900)
- organization_event_details.py → /src/sentry/issues/endpoints/ (#97428)
- /static/app/{components,views}/codecov/ → .../prevent/ (#97485)
- organizationoption.py → models/options/organization_option.py (#31615)
- projectoption.py → models/options/project_option.py (#31615)
- useroption.py → users/models/user_option.py (#76231)
- organization_projects_experiment.py → /src/sentry/core/endpoints/ (#97407)
- release_threshold*.py → release_thresholds/ directory (#57085)
- test_organization_projects_experiment.py → /tests/sentry/core/endpoints/ (#97407)
- test_scim*.py → /tests/sentry/core/endpoints/scim/ (core migration)
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 7, 2026
@mrduncan mrduncan marked this pull request as ready for review March 7, 2026 00:15
@mrduncan mrduncan requested a review from a team as a code owner March 7, 2026 00:15
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Backend Test Failures

Failures on cfb70f1 in this run:

tests/sentry/api/test_api_owners.py::APIOwnersTestCase::test_api_owner_is_a_valid_code_ownerlog
tests/sentry/api/test_api_owners.py:22: in test_api_owner_is_a_valid_code_owner
    assert owner.value in self.teams
E   AssertionError: assert 'revenue' in {'alerts-create-issues', 'alerts-notifications', 'codecov', 'coding-workflows', 'crons', 'dashboards', ...}
E    +  where 'revenue' = <ApiOwner.BILLING: 'revenue'>.value
E    +  and   {'alerts-create-issues', 'alerts-notifications', 'codecov', 'coding-workflows', 'crons', 'dashboards', ...} = <tests.sentry.api.test_api_owners.APIOwnersTestCase testMethod=test_api_owner_is_a_valid_code_owner>.teams

@mrduncan mrduncan marked this pull request as draft March 7, 2026 00:32
Assign ownership to 7 directories that had no CODEOWNERS coverage:

- /src/sentry/rules/ → @getsentry/alerts-notifications (111 files)
- /src/sentry/middleware/integrations/ → @getsentry/ecosystem (39 files)
- /src/sentry/explore/ → @getsentry/explore (31 files)
- /src/sentry/lang/java/ → @getsentry/ingest (16 files)
- /src/sentry/lang/javascript/ → @getsentry/ingest (15 files)
- /src/sentry/billing/ → @getsentry/revenue (13 files)
- /src/sentry/debug_files/ → @getsentry/ingest (12 files)
@mrduncan mrduncan changed the title chore: Clean up stale CODEOWNERS entries chore(codeowners): Remove stale entries and add missing assignments Mar 7, 2026
CODEOWNERS uses last-match-wins semantics. Several entries were being
silently overridden by broader patterns appearing later in the file.

Key fixes:
- Remove `/src/sentry/api/endpoints/` catch-all (@getsentry/issue-workflow)
  which was shadowing 36 specific endpoint ownership entries for ingest,
  data-browsing, security, enterprise, profiling, explore, and other teams
- Move Flags section (replay-frontend/backend) below Issues section so
  issueDetails/ and issues/** overrides apply correctly
- Move Frontend section earlier so it doesn't get shadowed
- Move event_reprocessable.py into Issues overrides section
- Remove shadowed codecov-merge entries (superseded by coding-workflows)
- Remove other entries made redundant by broader patterns
@mrduncan mrduncan marked this pull request as ready for review March 7, 2026 01:28
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.

1 participant