Skip to content

fix(sidekiq): Report error when retry limit is below attempt_threshold#2940

Closed
marcboquet wants to merge 1 commit intogetsentry:masterfrom
marcboquet:attempt-threshold-cap
Closed

fix(sidekiq): Report error when retry limit is below attempt_threshold#2940
marcboquet wants to merge 1 commit intogetsentry:masterfrom
marcboquet:attempt-threshold-cap

Conversation

@marcboquet
Copy link
Copy Markdown

Description

Fix #2939

The attempt_threshold (added in #2503) has a bug when a job's retry option is lower than its attempt_threshold (e.g. retry: 1 with attempt_threshold: 3).

In those cases the error handler skipped every attempt and the job was silently dropped.

This PR caps the threshold at the job's final attempt so these jobs still report before entering the dead set. Jobs whose retry count meets or exceeds the threshold behave exactly as before.

When a job's `retry` option is lower than its `attempt_threshold` (e.g.
`retry: 1` with `attempt_threshold: 3`), the error handler skipped every
attempt and the job was silently dropped — it died before ever reaching
the threshold.

Cap the threshold at the job's final attempt so these jobs still report
before entering the dead set. Jobs whose retry count meets or exceeds
the threshold behave exactly as before.
@sdk-maintainer-bot
Copy link
Copy Markdown

This PR has been automatically closed. The referenced issue does not show a discussion between you and a maintainer.

To avoid wasted effort on both sides, please discuss your proposed approach in the issue first and wait for a maintainer to respond before opening a PR.

Please review our contributing guidelines for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The attempt_threshold option in sentry-sidekiq will silently drop jobs with low retry count

1 participant