Project

General

Profile

Bug #5462

create_repo api fails with celery enabled

Added by Peter Colledge over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
13.04.2018
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

Calling create_repo (via rhodecode-api, with repo_name:example and repo_type:hg) returns a false positive 'Created new repository' result frontend, and mysql query error backend.

The async task rhodecode/lib/celerylib/tasks.py:create_repo() receives a variable cur_user containing the whole user as a dict, not a class object (which is supported by instance resolver) or just plain username as the ORM expects.

The patch included is just a nasty hack and doesn't fix what is probably a wider celery serialisation problem.

rhodecode-createrepo-bad-api-celery.txt (7.02 KB) rhodecode-createrepo-bad-api-celery.txt rhodecode_celery.log Peter Colledge, 13.04.2018 17:43
rhodecode-createrepo-celery-dict.patch (406 Bytes) rhodecode-createrepo-celery-dict.patch celery-dict.patch Peter Colledge, 13.04.2018 17:44

Also available in: Atom PDF