-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat(iswf): Removes retry decorator from workflow_engine tasks #114937
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
base: gv/add-new-retry-decorator-options
Are you sure you want to change the base?
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -2,14 +2,15 @@ | |
|
|
||
| from django.db.models import Value | ||
| from taskbroker_client.retry import Retry | ||
| from taskbroker_client.worker.workerchild import ProcessingDeadlineExceeded | ||
|
|
||
| from sentry.eventstream.base import GroupState | ||
| from sentry.models.activity import Activity | ||
| from sentry.models.group import Group | ||
| from sentry.models.project import Project | ||
| from sentry.services.eventstore.models import GroupEvent | ||
| from sentry.silo.base import SiloMode | ||
| from sentry.tasks.base import instrumented_task, retry | ||
| from sentry.tasks.base import instrumented_task | ||
| from sentry.taskworker import namespaces | ||
| from sentry.utils import metrics | ||
| from sentry.utils.exceptions import timeout_grouping_context | ||
|
|
@@ -74,14 +75,24 @@ def build_trigger_action_task_params( | |
| name="sentry.workflow_engine.tasks.trigger_action", | ||
| namespace=namespaces.workflow_engine_tasks, | ||
| processing_deadline_duration=30, | ||
| retry=Retry(times=3, delay=5), | ||
| retry=Retry( | ||
| times=3, | ||
| delay=5, | ||
| on=(Exception, ProcessingDeadlineExceeded), | ||
| ignore=( | ||
| Action.DoesNotExist, | ||
| Group.DoesNotExist, | ||
| Project.DoesNotExist, | ||
| ProjectNotActiveError, | ||
| Workflow.DoesNotExist, | ||
| ), | ||
| ), | ||
|
Comment on lines
+79
to
+89
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. Bug: The Suggested FixTo restore the previous behavior of silently discarding the task after all retries are exhausted, add Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
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. Missing
|
||
| silo_mode=SiloMode.CELL, | ||
| ) | ||
| @retry( | ||
| timeouts=True, | ||
| raise_on_no_retries=False, | ||
| ignore_and_capture=(Action.DoesNotExist, Group.DoesNotExist), | ||
| ignore=(Project.DoesNotExist, ProjectNotActiveError, Workflow.DoesNotExist), | ||
| silenced_exceptions=( | ||
| Project.DoesNotExist, | ||
| ProjectNotActiveError, | ||
| Workflow.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. Lost Sentry capture for
|
||
| ) | ||
| def trigger_action( | ||
| action_id: int, | ||
|
|
||


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.
Bug: The
trigger_actiontask no longer capturesAction.DoesNotExistandGroup.DoesNotExistexceptions to Sentry, resulting in lost observability.Severity: LOW
Suggested Fix
To restore observability, re-implement the logic to capture
Action.DoesNotExistandGroup.DoesNotExistexceptions to Sentry withlevel="info"before they are ignored by the retry framework.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.