Closed unzvfu closed 6 years ago
Problem goes away after increasing ENTITY_SERVICE_TEST_SIZE
from 100 to 1000 (note the Jenkins run---which passes---uses 5000).
Brian says: "Having a quick look through there are a few more if branches based on mapping size than I remember. size < config.GREEDY_SIZE
, and expected_size < config.ENTITY_CACHE_THRESHOLD
."
This error appears only for TEST_SIZE <= 100
; everything works for TEST_SIZE >= 101
as far as I can tell.
This error is caused by the call to celery.chord()
in async_worker.py:paillier_encrypt_mask().
Specifically: Normally the results from the generator which is passed as the first argument to celery.chord()
(header) are given to the second argument (callback) as a list. Indeed this is what we observe when the header generates at least two values. However, for reasons yet to be divined, when the header generates only a single element, then that element alone is passed to the callback. This is a type error of sorts, since the callback expects a list of thingies, but in this second case it is given the thingy itself rather than a singleton list containing the thingy.
This error is triggered because the value config.ENCRYPTION_CHUNK_SIZE
is 100, so when the size of the dataset is 100 or less, then only one chunk is generated by the header and so the type error described above occurs.
Turns out (thanks @hardbyte!) that this is (was) a known issue in Celery. The fix is due to appear in Celery 4.2.
Normal build; start with
Run
gives