<p dir="auto">example: <code class="notranslate">pip install celery[sqs]</code> doesn't install <code class="notranslate">kombu[sqs]</code><br>
thus <code class="notranslate">pycurl</code> ends up to be missing.</p>
<p dir="auto">What would be the best way to solve this ? knowing that we might be interested by several flavors at the same time like <code class="notranslate">celery[sqs,msgpack]</code>.</p>
<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://github.com/celery/celery/discussions">discussions forum</a> first.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="https://docs.celeryq.dev/en/master/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h2 dir="auto">Optional Debugging Information</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br>
and/or implementation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br>
result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br>
broker and/or result backend.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br>
ETA/Countdown &amp; rate limits disabled.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br>
and/or upgrading Celery and its dependencies.</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto"><strong>Celery version</strong>: 5.2.6 (dawn-chorus)</p>

<details>
<summary><b><code class="notranslate">celery report
</code> Output:
</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.2.6 (dawn-chorus) kombu:5.2.3 py:3.10.0
            billiard:3.6.4.0 py-amqp:5.0.9
platform -&gt; system:Windows arch:64bit, WindowsPE
            kernel version:10 imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:redis://localhost:6379/0

broker_url: 'amqp://user:********@localhost:5672//'
task_create_missing_queues: True
task_acks_late: True
result_extended: True
result_expires: 3600
worker_send_task_events: True
result_backend: 'redis://localhost:6379/0'
deprecated_settings: None"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.2.6 (dawn-chorus) kombu:5.2.3 py:3.10.0
            billiard:3.6.4.0 py-amqp:5.0.9
platform -&gt; system:Windows arch:64bit, WindowsPE
            kernel version:10 imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:redis://localhost:6379/0

broker_url: 'amqp://user:********@localhost:5672//'
task_create_missing_queues: True
task_acks_late: True
result_extended: True
result_expires: 3600
worker_send_task_events: True
result_backend: 'redis://localhost:6379/0'
deprecated_settings: None
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<ol dir="auto">
<li>Create simplest docker compose with redis &amp; rabbitMQ</li>
<li>run app with <code class="notranslate">celery --app=app worker --pool=solo --concurrency=1 -E --loglevel=INFO --queues=my_queue </code></li>
<li>run <code class="notranslate">python call.py</code></li>
<li>You see in retried task headers there in no <code class="notranslate">"custom_header": "yumy yum"</code></li>
</ol>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: 3.10.0</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><p dir="auto">Application app.py:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from functools import partial
from typing import Final

from celery import Task, Celery

BASE_CELERY_BROKER_URL = &quot;amqp://user:pass@localhost:5672&quot;
CELERY_RESULT_URL = &quot;redis://localhost:6379/0&quot;


def make_celery_worker_app_stub() -&gt; partial[Celery]:
    return partial(
        Celery,
        task_create_missing_queues=True,
        task_acks_late=True,
        result_extended=True,
        result_expires=3600,
        worker_send_task_events=True,
    )


app: Final = make_celery_worker_app_stub()(
    main=__name__,
    result_backend=CELERY_RESULT_URL,
    broker=&quot;%s&quot; % (BASE_CELERY_BROKER_URL),

    set_as_current=False,
)


@app.task(
    bind=True,
    queue=&quot;my_queue&quot;,
    name=&quot;my_name:my_function&quot;,
    acks_late=True,
    task_reject_on_worker_lost=True,
    autoretry_for=(Exception,),
    retry_backoff=True,
    max_retries=3,
    task_time_limit=8,
)
def failing_function(
        self: Task,
        data
) -&gt; None:
    print(data)  # prints hello
    print(self.request.properties[&quot;application_headers&quot;])

    assert False == True
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">functools</span> <span class="pl-k">import</span> <span class="pl-s1">partial</span>
<span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Final</span>

<span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Task</span>, <span class="pl-v">Celery</span>

<span class="pl-v">BASE_CELERY_BROKER_URL</span> <span class="pl-c1">=</span> <span class="pl-s">"amqp://user:pass@localhost:5672"</span>
<span class="pl-v">CELERY_RESULT_URL</span> <span class="pl-c1">=</span> <span class="pl-s">"redis://localhost:6379/0"</span>


<span class="pl-k">def</span> <span class="pl-en">make_celery_worker_app_stub</span>() <span class="pl-c1">-&gt;</span> <span class="pl-s1">partial</span>[<span class="pl-v">Celery</span>]:
    <span class="pl-k">return</span> <span class="pl-en">partial</span>(
        <span class="pl-v">Celery</span>,
        <span class="pl-s1">task_create_missing_queues</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
        <span class="pl-s1">task_acks_late</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
        <span class="pl-s1">result_extended</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
        <span class="pl-s1">result_expires</span><span class="pl-c1">=</span><span class="pl-c1">3600</span>,
        <span class="pl-s1">worker_send_task_events</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
    )


<span class="pl-s1">app</span>: <span class="pl-v">Final</span> <span class="pl-c1">=</span> <span class="pl-en">make_celery_worker_app_stub</span>()(
    <span class="pl-s1">main</span><span class="pl-c1">=</span><span class="pl-s1">__name__</span>,
    <span class="pl-s1">result_backend</span><span class="pl-c1">=</span><span class="pl-v">CELERY_RESULT_URL</span>,
    <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">"%s"</span> <span class="pl-c1">%</span> (<span class="pl-v">BASE_CELERY_BROKER_URL</span>),

    <span class="pl-s1">set_as_current</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
)


<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">task</span>(</span>
<span class="pl-en">    <span class="pl-s1">bind</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,</span>
<span class="pl-en">    <span class="pl-s1">queue</span><span class="pl-c1">=</span><span class="pl-s">"my_queue"</span>,</span>
<span class="pl-en">    <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"my_name:my_function"</span>,</span>
<span class="pl-en">    <span class="pl-s1">acks_late</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,</span>
<span class="pl-en">    <span class="pl-s1">task_reject_on_worker_lost</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,</span>
<span class="pl-en">    <span class="pl-s1">autoretry_for</span><span class="pl-c1">=</span>(<span class="pl-v">Exception</span>,),</span>
<span class="pl-en">    <span class="pl-s1">retry_backoff</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,</span>
<span class="pl-en">    <span class="pl-s1">max_retries</span><span class="pl-c1">=</span><span class="pl-c1">3</span>,</span>
<span class="pl-en">    <span class="pl-s1">task_time_limit</span><span class="pl-c1">=</span><span class="pl-c1">8</span>,</span>
<span class="pl-en">)</span>
<span class="pl-k">def</span> <span class="pl-en">failing_function</span>(
        <span class="pl-s1">self</span>: <span class="pl-v">Task</span>,
        <span class="pl-s1">data</span>
) <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>:
    <span class="pl-en">print</span>(<span class="pl-s1">data</span>)  <span class="pl-c"># prints hello</span>
    <span class="pl-en">print</span>(<span class="pl-s1">self</span>.<span class="pl-s1">request</span>.<span class="pl-s1">properties</span>[<span class="pl-s">"application_headers"</span>])

    <span class="pl-k">assert</span> <span class="pl-c1">False</span> <span class="pl-c1">==</span> <span class="pl-c1">True</span></pre></div>
<p dir="auto">Caller call.py:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery

BASE_CELERY_BROKER_URL = &quot;amqp://user:pass@localhost:5672&quot;
CELERY_RESULT_URL = &quot;redis://localhost:6379/0&quot;


def celery_app(
) -&gt; Celery:
    return Celery(
        __name__,
        result_backend=CELERY_RESULT_URL,
        broker=&quot;%s&quot; % (BASE_CELERY_BROKER_URL),
        task_create_missing_queues=True,
        celery_queue_ha_policy=&quot;all&quot;,
        task_acks_late=True,
        set_as_current=False,
        result_extended=True,
    )


client = celery_app()

options = {&quot;headers&quot;: {
    &quot;custom_header&quot;: &quot;yumy yum&quot;
}}

sign = client.signature(
    &quot;my_name:my_function&quot;,
    queue=&quot;my_queue&quot;,
    args=(&quot;hello&quot;,),
    options=options
)
sign.apply_async()
"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>

<span class="pl-v">BASE_CELERY_BROKER_URL</span> <span class="pl-c1">=</span> <span class="pl-s">"amqp://user:pass@localhost:5672"</span>
<span class="pl-v">CELERY_RESULT_URL</span> <span class="pl-c1">=</span> <span class="pl-s">"redis://localhost:6379/0"</span>


<span class="pl-k">def</span> <span class="pl-en">celery_app</span>(
) <span class="pl-c1">-&gt;</span> <span class="pl-v">Celery</span>:
    <span class="pl-k">return</span> <span class="pl-v">Celery</span>(
        <span class="pl-s1">__name__</span>,
        <span class="pl-s1">result_backend</span><span class="pl-c1">=</span><span class="pl-v">CELERY_RESULT_URL</span>,
        <span class="pl-s1">broker</span><span class="pl-c1">=</span><span class="pl-s">"%s"</span> <span class="pl-c1">%</span> (<span class="pl-v">BASE_CELERY_BROKER_URL</span>),
        <span class="pl-s1">task_create_missing_queues</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
        <span class="pl-s1">celery_queue_ha_policy</span><span class="pl-c1">=</span><span class="pl-s">"all"</span>,
        <span class="pl-s1">task_acks_late</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
        <span class="pl-s1">set_as_current</span><span class="pl-c1">=</span><span class="pl-c1">False</span>,
        <span class="pl-s1">result_extended</span><span class="pl-c1">=</span><span class="pl-c1">True</span>,
    )


<span class="pl-s1">client</span> <span class="pl-c1">=</span> <span class="pl-en">celery_app</span>()

<span class="pl-s1">options</span> <span class="pl-c1">=</span> {<span class="pl-s">"headers"</span>: {
    <span class="pl-s">"custom_header"</span>: <span class="pl-s">"yumy yum"</span>
}}

<span class="pl-s1">sign</span> <span class="pl-c1">=</span> <span class="pl-s1">client</span>.<span class="pl-en">signature</span>(
    <span class="pl-s">"my_name:my_function"</span>,
    <span class="pl-s1">queue</span><span class="pl-c1">=</span><span class="pl-s">"my_queue"</span>,
    <span class="pl-s1">args</span><span class="pl-c1">=</span>(<span class="pl-s">"hello"</span>,),
    <span class="pl-s1">options</span><span class="pl-c1">=</span><span class="pl-s1">options</span>
)
<span class="pl-s1">sign</span>.<span class="pl-en">apply_async</span>()</pre></div>
<p dir="auto">Log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-05-12 22:37:20,703: INFO/MainProcess] Connected to amqp://user:**@127.0.0.1:5672//
[2022-05-12 22:37:20,736: INFO/MainProcess] mingle: searching for neighbors
[2022-05-12 22:37:21,764: INFO/MainProcess] mingle: all alone
[2022-05-12 22:37:21,799: INFO/MainProcess] celery@DESKTOP-51C03JP ready.
[2022-05-12 22:38:47,431: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:47,432: WARNING/MainProcess] hello
[2022-05-12 22:38:47,432: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': None, 'argsrepr': &quot;('hello',)&quot;, 'kwargsrepr': '{}', 'origin': 'gen5572@DESKTOP-51C03JP', 'ignore_result': False, 'custom_header': 'yumy yum'}
[2022-05-12 22:38:47,468: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 1s: AssertionError()
[2022-05-12 22:38:47,469: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:48,446: WARNING/MainProcess] hello
[2022-05-12 22:38:48,447: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': '2022-05-12T20:38:48.433839+00:00', 'expires': None, 'group': None, 'group_index': None, 'retries': 1, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': &quot;('hello',)&quot;, 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:48,470: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:48,473: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 1s: AssertionError()
[2022-05-12 22:38:49,464: WARNING/MainProcess] hello
[2022-05-12 22:38:49,465: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': '2022-05-12T20:38:49.447913+00:00', 'expires': None, 'group': None, 'group_index': None, 'retries': 2, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': &quot;('hello',)&quot;, 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:49,468: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:49,469: WARNING/MainProcess] hello
[2022-05-12 22:38:49,469: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 0s: AssertionError()
[2022-05-12 22:38:49,469: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 3, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': &quot;('hello',)&quot;, 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:49,473: ERROR/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] raised unexpected: AssertionError()
Traceback (most recent call last):
  File &quot;C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\trace.py&quot;, line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File &quot;C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\trace.py&quot;, line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File &quot;C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\autoretry.py&quot;, line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
  File &quot;C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\task.py&quot;, line 717, in retry
    raise_with_context(exc)
  File &quot;C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\autoretry.py&quot;, line 34, in run
    return task._orig_run(*args, **kwargs)
  File &quot;C:\Users\liman\Github\Tests\randoms\api.py&quot;, line 48, in failing_function
    assert False == True
AssertionError"><pre class="notranslate"><code class="notranslate">[2022-05-12 22:37:20,703: INFO/MainProcess] Connected to amqp://user:**@127.0.0.1:5672//
[2022-05-12 22:37:20,736: INFO/MainProcess] mingle: searching for neighbors
[2022-05-12 22:37:21,764: INFO/MainProcess] mingle: all alone
[2022-05-12 22:37:21,799: INFO/MainProcess] celery@DESKTOP-51C03JP ready.
[2022-05-12 22:38:47,431: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:47,432: WARNING/MainProcess] hello
[2022-05-12 22:38:47,432: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': None, 'argsrepr': "('hello',)", 'kwargsrepr': '{}', 'origin': 'gen5572@DESKTOP-51C03JP', 'ignore_result': False, 'custom_header': 'yumy yum'}
[2022-05-12 22:38:47,468: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 1s: AssertionError()
[2022-05-12 22:38:47,469: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:48,446: WARNING/MainProcess] hello
[2022-05-12 22:38:48,447: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': '2022-05-12T20:38:48.433839+00:00', 'expires': None, 'group': None, 'group_index': None, 'retries': 1, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': "('hello',)", 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:48,470: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:48,473: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 1s: AssertionError()
[2022-05-12 22:38:49,464: WARNING/MainProcess] hello
[2022-05-12 22:38:49,465: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': '2022-05-12T20:38:49.447913+00:00', 'expires': None, 'group': None, 'group_index': None, 'retries': 2, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': "('hello',)", 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:49,468: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] received
[2022-05-12 22:38:49,469: WARNING/MainProcess] hello
[2022-05-12 22:38:49,469: INFO/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] retry: Retry in 0s: AssertionError()
[2022-05-12 22:38:49,469: WARNING/MainProcess] {'lang': 'py', 'task': 'my_name:my_function', 'id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 3, 'timelimit': [None, None], 'root_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'parent_id': 'bb7a8629-00d4-434d-b9d2-72162c2edbbf', 'argsrepr': "('hello',)", 'kwargsrepr': '{}', 'origin': 'gen24336@DESKTOP-51C03JP', 'ignore_result': False}
[2022-05-12 22:38:49,473: ERROR/MainProcess] Task my_name:my_function[bb7a8629-00d4-434d-b9d2-72162c2edbbf] raised unexpected: AssertionError()
Traceback (most recent call last):
  File "C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\autoretry.py", line 54, in run
    ret = task.retry(exc=exc, **retry_kwargs)
  File "C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\task.py", line 717, in retry
    raise_with_context(exc)
  File "C:\Users\liman\Anaconda3\envs\dimensions\lib\site-packages\celery\app\autoretry.py", line 34, in run
    return task._orig_run(*args, **kwargs)
  File "C:\Users\liman\Github\Tests\randoms\api.py", line 48, in failing_function
    assert False == True
AssertionError
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>
<p dir="auto">Expecting to keep custom headers when retrying the task</p>
<h1 dir="auto">Actual Behavior</h1>
<p dir="auto">Not keeping custom task headers</p>