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

Fix failing unit test #553

Merged
merged 3 commits into from Apr 23, 2020

Conversation

GeorgianaElena
Copy link
Member

The unit test were failing because of the latest grpcio version 1.28.0, that switches to manylinux2010 (see this announcement for details) (grpcio is a requirement of the etcd3 python client used by traefik-proxy).

I tried a clean install of TLJH on DO and everything went ok, so referring to the info in the announcement I guess it has something to do with the Ubuntu Docker image and the libs there.

@manics
Copy link
Member

manics commented Apr 22, 2020

It's because the default version of pip on Ubuntu 18.04 is too old:

$ docker run -it --rm ubuntu:18.04

root@68cd6b2855c2:/# apt-get update --yes && apt-get install --yes python3 python3-venv
root@68cd6b2855c2:/# python3 -m venv /srv/venv
root@68cd6b2855c2:/# /srv/venv/bin/pip --version
pip 9.0.1 from /srv/venv/lib/python3.6/site-packages (python 3.6)

The alternative to pinning grpcio is to upgrade pip inside the venv

root@68cd6b2855c2:/# /srv/venv/bin/pip install -U pip
root@68cd6b2855c2:/# /srv/venv/bin/pip --version
pip 20.0.2 from /srv/venv/lib/python3.6/site-packages/pip (python 3.6)
root@68cd6b2855c2:/# /srv/venv/bin/pip install grpcio
...
Successfully installed grpcio-1.28.1 six-1.14.0

I don't know what's best.

@GeorgianaElena
Copy link
Member Author

That's what was my first guess too. But TLJH got installed successfully on Digital Ocean using the same old pip:
tljh-do

I think this line in their announcement might explain why it works:
Once the transition happens, if the version of pip is lower than 19, it might result in downloading a source package and building it from source instead of downloading pre-built package.

They also mention the need of glibc being at least 2.12 and libstdc++ at least 6.0.13, but versions inside the docker container seem ok:
tljh-docker

So I'm not really sure what's the difference with the Docker image that causes this.

@yuvipanda
Copy link
Collaborator

Thank you so much for investigating and getting to the root cause of this, @GeorgianaElena!

I think upgrading pip is a good idea anyway - although I like to pin it rather than just do a --upgrade pip. How does that sound? That's probably a better longer term fix than pinning grpcio, although that also works if that's the easier thing to do.

@GeorgianaElena
Copy link
Member Author

@yuvipanda, upgrading pip is definitely a good idea.
I just added a new commit that:

  • upgrades pip inside the hub env
  • upgrades pip inside the unit test docker container

What do you think?

@GeorgianaElena GeorgianaElena changed the title Pin grpcio version Fix failing unit test Apr 23, 2020
@yuvipanda yuvipanda merged commit 01ba348 into jupyterhub:master Apr 23, 2020
@yuvipanda
Copy link
Collaborator

Awesome! This looks great to me. Thank you for fixing the tests!

@GeorgianaElena GeorgianaElena deleted the fix_grpcio_test_failure branch April 23, 2020 12:39
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.

None yet

3 participants