getsentry / getsentry/sentry

GitLab CODEOWNERS not automatically syncing on commits

Open
#119,705 2 comments 0 reactions 0 assignees View on GitHub
Bug Product Area: Settings - Integrations Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

### Environment

SaaS (https://sentry.io/)

### Steps to Reproduce

1. Install and configure the GitLab integration
2. Add CODEOWNERS file to a project's issue owners settings
3. Push a commit in the repository to change the CODEOWNERS file.

### Expected Result

The change in CODEOWNERS is automatically synced to Sentry ownership rules, as it is currently true for the GitHub integration.

### Actual Result

CODEOWNERS is not automatically synced.

From the initial check, the change is triggered by [process_resource_change](https://github.com/getsentry/sentry/blob/master/src/sentry/models/commitfilechange.py#L49) function called for commits in the [GitHub integration](https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/github/webhook.py#L57), but it is not used by the [GitLab integration.](https://github.com/getsentry/sentry/blob/master/src/sentry/integrations/gitlab/webhooks.py)

### Product Area

Settings - Integrations

### Link

_No response_

### DSN

_No response_

### Version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with process_resource_change in src/sentry/models/commitfilechange.py and compare the GitHub webhook at src/sentry/integrations/github/webhook.py with src/sentry/integrations/gitlab/webhooks.py. Trace how GitLab commit events are handled and verify the CODEOWNERS change path; done means a pushed GitLab CODEOWNERS change updates Sentry ownership rules automatically.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.