-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
chore(iswf): Updates deletion and remaining task decorators to taskbroker retries #115029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e03732d
7f14f41
2a171e2
453057f
799d45c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,18 +10,18 @@ | |
| from sentry.models.projectownership import ProjectOwnership | ||
| from sentry.notifications.notifications.codeowners_auto_sync import AutoSyncNotification | ||
| from sentry.silo.base import SiloMode | ||
| from sentry.tasks.base import instrumented_task, retry | ||
| from sentry.tasks.base import instrumented_task | ||
| from sentry.taskworker.namespaces import issues_tasks | ||
|
|
||
|
|
||
| @instrumented_task( | ||
| name="sentry.tasks.code_owners_auto_sync", | ||
| namespace=issues_tasks, | ||
| retry=Retry(times=3, delay=60), | ||
| retry=Retry(times=3, delay=60, on=(Commit.DoesNotExist,)), | ||
| processing_deadline_duration=60, | ||
| silo_mode=SiloMode.CELL, | ||
| silenced_exceptions=(Commit.DoesNotExist,), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Retry only on DoesNotExist silently discards all other errorsMedium Severity The Reviewed by Cursor Bugbot for commit 799d45c. Configure here. |
||
| ) | ||
| @retry(on=(), on_silent=(Commit.DoesNotExist,)) | ||
| def code_owners_auto_sync(commit_id: int, **kwargs: Any) -> None: | ||
| from django.db.models import BooleanField, Case, Exists, OuterRef, Subquery, When | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead
RetryTaskclass after retry migrationLow Severity
The
RetryTaskexception class is now unused dead code. It was previously referenced inRetry(on=(RetryTask,)), but this change replaced that withRetry(on=(Exception,)). The class definition remains, and the TODO comment on line 145 — "raise RetryTask when appropriate" — is now stale and misleading, since withon=(Exception,)there's no reason to raise a specificRetryTasksubclass for retry purposes.Additional Locations (1)
src/sentry/deletions/tasks/nodestore.py#L144-L145Reviewed by Cursor Bugbot for commit 2a171e2. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module local
RetryTaskdoes look unused.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove that in a follow up 😁