#5396 [WIP] Update test environment to F38
Closed by wombelix. Opened by zlopez.
zlopez/pagure update_f38  into  master

Download 5396.patch

Update test containers to F38 for both pip and rpms.

Signed-off-by: Michal Konečný mkonecny@redhat.com

I fixed most of the errors regarding the update to F38, one error remains but it makes plenty of tests to fail.

The error is:

ValueError: task_id must not be empty. Got None instead.

It seems that the older version of celery wasn't so restricting.

Here is the list of things I tried to fix this error:

  • Manually set the task_id - this caused errors with redis Connection refused in test_tasks.py, other tests went through
  • Use pytest-celery package and set celery_app - this didn't help with anything
  • Mock delay() or run() method of the task - in this case the method wasn't even called.
  • Try to set CELERY_TASK_ALWAYS_EAGER=True - maybe I mocked it incorrectly, but it didn't work at all.
  • Downgrade celery version - unfortunately that isn't possible, because there isn't older version on Fedora 38.

I'm not a celery expert, so I'm not sure what the exact issue here is, but I'm stuck on this for too long, so maybe somebody here will know what needs to be done.

And here is the full stacktrace I'm getting:

.tox/py38/lib/python3.8/site-packages/celery/local.py:182: in __call__                  
    return self._get_current_object()(*a, **kw)    
.tox/py38/lib/python3.8/site-packages/celery/app/task.py:411: in __call__                                                                                                                                                                     
    return self.run(*args, **kwargs)
pagure/lib/tasks_utils.py:31: in decorated_function                                                                    
    self.update_state(state="RUNNING")
.tox/py38/lib/python3.8/site-packages/celery/app/task.py:999: in update_state
    self.backend.store_result(                   
.tox/py38/lib/python3.8/site-packages/celery/backends/base.py:526: in store_result
    self._store_result(task_id, result, state, traceback,                                                              
.tox/py38/lib/python3.8/site-packages/celery/backends/base.py:973: in _store_result
    current_meta = self._get_task_meta_for(task_id)
.tox/py38/lib/python3.8/site-packages/celery/backends/base.py:995: in _get_task_meta_for
    meta = self.get(self.get_key_for_task(task_id))     

Could you rebase this on current master?

Thanks @zlopez for your work and contribution, I'm closing this PR in favor of https://pagure.io/pagure/pull-request/5405, where your code is used as starting point to work on further changes towards F38 compatibility.

Pull-Request has been closed by wombelix

Metadata