Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since 7093082 (Improvements of automatix daemon : Closes rucio#5616, rucio#5617 (rucio#5621), 2022-09-02), the `test_automatix` test fails infrequently. The error message provided suggests, that the `project` variable sometimes get converted to an integer: ``` =================================== FAILURES =================================== ________________________________ test_automatix ________________________________ [gw1] linux -- Python 3.6.8 /usr/bin/python /usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py:1803: in _execute_context cursor, statement, parameters, context /usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py:732: in do_execute cursor.execute(statement, parameters) E psycopg2.errors.UndefinedFunction: operator does not exist: character varying = integer E LINE 3: WHERE dev.dids.project = 17420750 AND dev.dids.did_type = 'C... E ^ E HINT: No operator matches the given name and argument types. You might need to add explicit type casts. ``` The `project` variable used is initialized via the first 8 characters of a random uuid4 string. This string contains hexadecimal values, which can lead to a string with the 8 first characters being just integers. The probability for that with `(10 / 16) ^ 8 = 2.33%` (if we asume a uniform distribution) is fairly low, however, we run the tests quite frequently. This thus is a vaiable candidate for the error. Postgres seems to be the only engine to automatically convert this string into a number if possible, all other engines seem to work fine.
- Loading branch information