Wrong requirement version for django-rq
smutel opened this issue · comments
Hello,
I tried to upgrade my netbox from version 2.7.6 to 2.7.7 and the database migration failed with this message:
ImportError: cannot import name 'UnpickleError' from 'rq.exceptions'
After searching I found this https://groups.google.com/forum/#!searchin/netbox-discuss/UnpickleError%7Csort:date/netbox-discuss/UEbwcPZLOqU/IRm0vPnZAgAJ.
The version in requirements.txt is not correct. Not really a bug of this playbook but ...
Is-it possible to add a task to replace the version of django-rq to 2.3.2 to fix this issue ?
I can do the MR if needed.
Thanks.
See #97 (comment) and 513bd4e
You can just specify netbox_pip_constraints
locally for a quick fix. CI seems to have failed on Debian Stretch only with the above commit and I haven't gotten around to looking into why yet.
Even if I set this in my variables, it does not work:
netbox_pip_constraints:
# Blacklist pynacl 1.3.0 due to https://github.com/pyca/pynacl/issues/479
- 'pynacl!=1.3.0'
# Blacklist django-rq 2.3.1 due to https://github.com/rq/django-rq/issues/421
# https://github.com/netbox-community/netbox/issues/4633
- 'django-rq!=2.3.1'
This is due to the version of django-rq used in the old version of netbox.
requirements.txt need to be changed with django-rq==2.3.2
instead of django-rq==2.2.0
.
The issue is the same with a fresh install of 2.7.6 for example.
Weird, I only tested against 2.7.12 but it seemed to work against that.
What happens if you add a constraint for rq<1.4.0
instead?
Modifying the requirements.txt file with the role is not something I'm keen on doing in this role, as it causes conflicts in git-based deployments and idempotency issues for stable deployments.
So I found more details.
In old requirements.txt, we are finding django-rq but nothing about rq.
rq 1.3.x is working with django-rq 2.2.x
rq 1.4.x is working with django-rq 2.3.x
Putting this in my variable works for netbox 2.7.x:
netbox_pip_constraints:
# Blacklist pynacl 1.3.0 due to https://github.com/pyca/pynacl/issues/479
- 'pynacl!=1.3.0'
# Blacklist rq 1.3.0 due to https://github.com/rq/django-rq/issues/421
# https://github.com/netbox-community/netbox/issues/4633
- 'rq==1.3.0'