Skip to content

feat(commits): Cache calls to compare-commits

6b1a01d
Select commit
Loading
Failed to load commit list.
Merged

feat(releases): Cache calls to compare-commits #112494

feat(commits): Cache calls to compare-commits
6b1a01d
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: sentry-backend-bugs completed Apr 8, 2026 in 1m 7s

1 issue

sentry-backend-bugs: Found 1 issue (1 high)

High

Variable shadowing causes AttributeError: 'str' object has no attribute 'compare_commits' - `src/sentry/tasks/commits.py:98`

On line 98, provider = repo.provider reassigns the provider parameter to a string (the repository's provider field, e.g., "integrations:github"). Later, lines 120-123 call provider.compare_commits(...) which will fail with AttributeError because strings don't have a compare_commits method. This will crash every call to fetch_compare_commits that results in a cache miss.

Also found at:

  • src/sentry/tasks/commits.py:247-256

Duration: 1m 2s · Tokens: 191.7k in / 3.5k out · Cost: $0.36 (+extraction: $0.00, +merge: $0.00, +fix_gate: $0.00)

Annotations

Check failure on line 98 in src/sentry/tasks/commits.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: sentry-backend-bugs

Variable shadowing causes AttributeError: 'str' object has no attribute 'compare_commits'

On line 98, `provider = repo.provider` reassigns the `provider` parameter to a string (the repository's provider field, e.g., `"integrations:github"`). Later, lines 120-123 call `provider.compare_commits(...)` which will fail with `AttributeError` because strings don't have a `compare_commits` method. This will crash every call to `fetch_compare_commits` that results in a cache miss.

Check failure on line 256 in src/sentry/tasks/commits.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: sentry-backend-bugs

[N57-GFA] Variable shadowing causes AttributeError: 'str' object has no attribute 'compare_commits' (additional location)

On line 98, `provider = repo.provider` reassigns the `provider` parameter to a string (the repository's provider field, e.g., `"integrations:github"`). Later, lines 120-123 call `provider.compare_commits(...)` which will fail with `AttributeError` because strings don't have a `compare_commits` method. This will crash every call to `fetch_compare_commits` that results in a cache miss.