squad icon indicating copy to clipboard operation
squad copied to clipboard

requirements: add min version 'celery>=5.3'

Open roxell opened this issue 2 years ago • 4 comments

When running 'manage.py migrete' with Python version 3.11 the following Traceback could be seen:

$ ./manage.py migrate [242/884] Traceback (most recent call last): File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 361, in from inspect import formatargspec, getfullargspec ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/anders/src/squad/./manage.py", line 3, in from squad.manage import main File "/home/anders/src/squad/squad/init.py", line 10, in raise e File "/home/anders/src/squad/squad/init.py", line 7, in from .celery import app as celery_app # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/anders/src/squad/squad/celery.py", line 9, in from celery import Celery File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/init.py", line 19, in from . import local # noqa ^^^^^^^^^^^^^^^^^^^ File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/local.py", line 17, in from .five import PY3, bytes_if_py2, items, string, string_t File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/celery/five.py", line 7, in import vine.five File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/init.py", line 8, in from .abstract import Thenable File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/abstract.py", line 6, in from .five import with_metaclass, Callable File "/home/anders/src/squad/venv-foo/lib/python3.11/site-packages/vine/five.py", line 364, in from inspect import formatargspec, getargspec as _getargspec # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'formatargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

When dropping the hardcoded version lock '>=5.3' it looks like it passed ok.

roxell avatar Aug 17 '23 12:08 roxell

I'll review your patch today, as celery tagging was done by this commit: https://github.com/Linaro/squad/commit/47fd9f90fa6ae64d4563c4eb941b6ab2bce1488d

chaws avatar Aug 22 '23 10:08 chaws

Bummer!

Changing celery to that also changed django-celery-results, which is used when fetching android test jobs (+2M tests) and got this error while fetching

  File "/home/chaws/.local/lib/python3.10/site-packages/django_celery_results/backends/database.py", line 123, in <listcomp>
    results = [r.as_tuple() for r in header_result]
AttributeError: 'str' object has no attribute 'as_tuple'

I'll continue investigating

chaws avatar Aug 22 '23 11:08 chaws

This has been fixed in django-celery-results: https://github.com/celery/django-celery-results/commit/d5c4456e018ccd2b219aa5ff607424dbae7b926f

chaws avatar Aug 22 '23 13:08 chaws

Updating django-celery-results require a database migration

django.db.utils.ProgrammingError: column django_celery_results_taskresult.periodic_task_name does not exist
LINE 1: ...d", "django_celery_results_taskresult"."task_id", "django_ce...

I'll put this PR in the back burner as higher priority things popped up.

chaws avatar Aug 22 '23 13:08 chaws