Jump to solution
Details

The Fix

The documentation for the task_retry signal has been clarified to indicate that only the request argument is guaranteed to be provided, while the reason and einfo arguments may be None or not provided in certain scenarios.

Based on closed celery/celery issue #9851 · PR/commit linked

Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.

Open PR/Commit
@@ -239,6 +239,12 @@ Provides arguments: (a :class:`billiard.einfo.ExceptionInfo` object). +.. note:: + + Only the ``request`` argument is guaranteed to be provided in all cases.
fix.md
Option A — Apply the official fix\nThe documentation for the task_retry signal has been clarified to indicate that only the request argument is guaranteed to be provided, while the reason and einfo arguments may be None or not provided in certain scenarios.\nWhen NOT to use: This fix is not applicable if the documentation is not the source of the issue.\n\n

Why This Fix Works in Production

  • Trigger: task_retry documentation doesn't mention possible null and ignored args
  • Mechanism: The task_retry documentation misled users about the availability of certain arguments
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • The task_retry documentation misled users about the availability of certain arguments
  • Production symptom (often without a traceback): task_retry documentation doesn't mention possible null and ignored args

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“would you mind working on a pull request to improve this?”
@auvipy · 2025-08-27 · source

Failure Signature (Search String)

  • task_retry documentation doesn't mention possible null and ignored args
  • - [x] I have included all related issues and possible duplicate issues in this issue
Copy-friendly signature
signature.txt
Failure Signature ----------------- task_retry documentation doesn't mention possible null and ignored args - [x] I have included all related issues and possible duplicate issues in this issue

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- task_retry documentation doesn't mention possible null and ignored args - [x] I have included all related issues and possible duplicate issues in this issue

What Broke

Custom signal handling broke due to missing expected arguments in task retries.

Why It Broke

The task_retry documentation misled users about the availability of certain arguments

Fix Options (Details)

Option A — Apply the official fix

The documentation for the task_retry signal has been clarified to indicate that only the request argument is guaranteed to be provided, while the reason and einfo arguments may be None or not provided in certain scenarios.

When NOT to use: This fix is not applicable if the documentation is not the source of the issue.

Fix reference: https://github.com/celery/celery/pull/10076

Last verified: 2026-02-08. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not applicable if the documentation is not the source of the issue.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Capture the exact failing error string in logs and tests so you can reproduce via a minimal script.
  • Pin production dependencies and upgrade only with a reproducible test that hits the failing path.

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.