Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update redis-py #3526

Closed
wants to merge 1 commit into from
Closed

Update redis-py #3526

wants to merge 1 commit into from

Conversation

washort
Copy link

@washort washort commented Mar 4, 2019

A new release of kombu depends on an updated version of redis-py.

A new release of kombu depends on an updated version of redis-py.
@ghost ghost assigned washort Mar 4, 2019
@ghost ghost added the in progress label Mar 4, 2019
Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have pinned the version of Kombu we're using.. does it mean we can stop pinning now?

@washort
Copy link
Author

washort commented Mar 5, 2019

upon further review this looks like it was a result of a broken local environment (still not sure how, but can't reproduce it on other machines). Sorry for the noise

@washort washort closed this Mar 5, 2019
@ghost ghost removed the in progress label Mar 5, 2019
@arikfr arikfr deleted the washort-patch-1 branch March 6, 2019 06:43
@nafu
Copy link

nafu commented Mar 14, 2019

@arikfr @washort

upon further review this looks like it was a result of a broken local environment (still not sure how, but can't reproduce it on other machines). Sorry for the noise

I also encountered this problem after upgrading redash version to v6.0.0.

Why it occurs

I figured out that the version of kombu was fixed in this commit but the current latest release (v6.0.0) does not include this change 😢

The version of kombu was fixed:
https://github.com/getredash/redash/pull/3026/files#diff-b4ef698db8ca845e5845c4618278f29aR36

requirements.txt in v6.0.0:
https://github.com/getredash/redash/blob/4780bd9c5ef212dd4c38bafb525abc991812d59b/requirements.txt

Details

If you upgrade to v6.0.0, redash will use kombu 4.4.0 (current latest). That causes VersionMismatch error for redis.

$ pip show kombu
Name: kombu
Version: 4.4.0
Error Log
[2019-03-13 11:23:01,233][PID:31540][ERROR][redash] Exception on /oauth/google_callback [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask_restful/__init__.py", line 271, in error_router
    return original_handler(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/redash/redash.6.0.0.b8536/redash/authentication/google_oauth.py", line 101, in authorized
    user = create_and_login_user(org, profile['name'], profile['email'], picture_url)
  File "/opt/redash/redash.6.0.0.b8536/redash/authentication/__init__.py", line 244, in create_and_login_user
    login_user(user_object, remember=True)
  File "/usr/local/lib/python2.7/dist-packages/flask_login/utils.py", line 149, in login_user
    user_logged_in.send(current_app._get_current_object(), user=_get_user())
  File "/usr/local/lib/python2.7/dist-packages/blinker/base.py", line 267, in send
    for receiver in self.receivers_for(sender)]
  File "/opt/redash/redash.6.0.0.b8536/redash/authentication/__init__.py", line 184, in log_user_logged_in
    record_event.delay(event)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 408, in delay
    return self.apply_async(args, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 535, in apply_async
    **options
  File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 745, in send_task
    amqp.send_task_message(P, name, message, **options)
  File "/usr/local/lib/python2.7/dist-packages/celery/app/amqp.py", line 552, in send_task_message
    **properties
  File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 181, in publish
    exchange_name, declare,
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 510, in _ensured
    return fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 187, in _publish
    channel = self.channel
  File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 209, in _get_channel
    channel = self._channel = channel()
  File "/usr/local/lib/python2.7/dist-packages/kombu/utils/functional.py", line 44, in __call__
    value = self.__value__ = self.__contract__()
  File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 224, in <lambda>
    channel = ChannelPromise(lambda: connection.default_channel)
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 852, in default_channel
    self.ensure_connection(**conn_opts)
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 422, in ensure_connection
    callback, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/kombu/utils/functional.py", line 341, in retry_over_time
    return fun(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 275, in connect
    return self.connection
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 823, in connection
    self._connection = self._establish_connection()
  File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 778, in _establish_connection
    conn = self.transport.establish_connection()
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 941, in establish_connection
    self._avail_channels.append(self.create_channel(self))
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/virtual/base.py", line 923, in create_channel
    channel = self.Channel(connection)
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 495, in __init__
    self.Client = self._get_client()
  File "/usr/local/lib/python2.7/dist-packages/kombu/transport/redis.py", line 956, in _get_client
    'You have {0.__version__}'.format(redis))
VersionMismatch: Redis transport requires redis-py versions 3.2.0 or later. You have 2.10.5

How to solve

I think It would be better to ship new release and let the users know v6.0.0's problems and solutions (e.g. In upgrading guides, or in CHANGELOG) which is I'm curious if I can contribute 😊

@arikfr
Copy link
Member

arikfr commented Mar 14, 2019

@nafu thank you for the detailed report. You aren't using Docker images, right?

@nafu
Copy link

nafu commented Mar 14, 2019

@arikfr No, I'm not using Docker 🙆

@arikfr
Copy link
Member

arikfr commented Mar 27, 2019

@nafu ok, this explains it. You will need to manually update your requirements.txt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants