Issue 1:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussion group first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version:

celery report Output:

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

Other Dependencies

N/A

Minimally Reproducible Test Case

"Celery task conf"
def a_method(param1, param2, **kwargs):
'''
First time get executed, second time dosn't
:return:
'''
print(param1)
print(param2)
self.retry(kwargs=kwargs, countdown=15)

my_dict_params = {"param1": "1",
"param2": "2"}

app.a_method(my_dict_params).delay()

Expected Behavior

I expect retry do parameters expansion as the first normal call.

Actual Behavior

Celery correcly saves "kwargs" state but on retry execution dosn't expand the kwargs arguments, asking for "positional arguments".

Issue 2:
I am using SQS as a broker, and trying to use an existing queue. but everytime I am trying to send a message to the queue, celery creates a new queue with a random id as name.

This is how my my tasks.py looks like

from celery import Celery
from kombu.utils.url import safequote

# real credentials, faking them here.
aws_access_key = safequote("ABCDEFGHJIKL")
aws_secret_key = safequote("abcdefhjkiglkiominoql")
broker_transport_options = {'region': 'us-west-2'}

broker_url=f"sqs://{aws_access_key}:{aws_secret_key}@"
task_create_missing_queues = False
event_queue_prefix = None

app = Celery('tasks', broker=broker_url, backend='rpc://')

app.conf.broker_transport_options = broker_transport_options

app.conf.task_default_queue = 'myqueue'
app.conf.task_create_missing_queues = False
app.conf.event_queue_prefix = None

@app.task
def mytask(text):
return f"the text intput was {text}"

Another one of my surprises is that the following still works. I never open on any tab a celery (server? process?) as all tutorials explain:

# I am not running this
celery -A tasks worker --loglevel=INFO

The only thing I am doing is opening a pytho interpreter, and for some reason, running a mytask.delay('myexample') still works. I was expecting for it not to work

python
Python 3.9.9 (main, Nov 17 2021, 16:40:29)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tasks
# Why does the following works, regardless if I have a "celery process" running or not?
>>> tasks.mytask.delay('asdasd')
<AsyncResult: 311e6538-dd79-451a-b282-5be1b271d736>

so to summarize:

Why is this creating a new queue in SQS instead of just reusing myqueue declared in app.conf.task_default_queue = 'myqueue'?

why is this working, even if I don't have a celery process running?