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

Version 2018.11.26 install in docker-compose build process fails the first try, then succeeds #3359

Closed
mikelane opened this issue Dec 5, 2018 · 9 comments
Labels
Category: Docker Issue affects docker builds.

Comments

@mikelane
Copy link

mikelane commented Dec 5, 2018

Issue description

Our Dockerfile has the following line:

    pip \
    setuptools \
    wheel \
    pipenv

And this:

    then set -ex && pipenv install --dev --system ; \
    else set -ex && pipenv install --deploy --system --ignore-pipfile ; \
    fi

Up through pipenv version 2018.11.14, there was no issue. However, in the latest version (2018.11.26), all (or perhaps most) of the libraries specified in the Pipfile fail to install the first time and then are installed successfully at the end.

Expected result

I expect the libraries to install correctly the first time as they do with pipenv versions less than 2018.11.26.

Actual result

An error occurred while installing pytest-factoryboy==2.0.1 --hash=sha256:ad438d191d2b2a0f26956d437c1963875db573147a84ffd85d7bbeaefae22458! Will try again.
An error occurred while installing pytest-socket==0.3.1 --hash=sha256:bb0857c4a459b7ed4586c51b48ad99920ca82f3314c95ed6de84847c2a8b6eef! Will try again.
An error occurred while installing pytz==2017.2 --hash=sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67 --hash=sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589 --hash=sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67 --hash=sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589! Will try again.
...
[many other dependency installation errors skipped]
...
Installing initially failed dependencies…
@frostming frostming added the Category: Docker Issue affects docker builds. label Dec 6, 2018
@techalchemy
Copy link
Member

i've seen this a bunch recently -- can you run this with --verbose and provide the output (in full if possible)? I haven't sorted out whats going on here but I'd like to...

@mikelane
Copy link
Author

We would prefer not to share the verbose output publicly, if possible. I'm looking to see if I can recreate it on a personal project. If not, maybe I can send the output to someone directly?

@techalchemy
Copy link
Member

This is fixed in #3298 I believe, do feel free to test out the master branch and let me know if you have any issues

closing for now, thanks for your patience

@pcraciunoiu
Copy link

Seeing one issue, for django-watchman. Upgrading from the latest pipenv release, to the current sha on master, results in the package not getting installed from git.

This is what I have in Pipfile for that package:

django-watchman = {git = "git://github.com/mwarkentin/django-watchman.git",ref = "master"}

This works on 2018.11.26, but not with this version python3 -m pip install git+https://github.com/pypa/pipenv.git@12572dd6b5b08e7beedeaa2329988a353b802003

django-watchman is just nowhere to be found. But works before the upgrade.

>>> import watchman
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'watchman'

@techalchemy
Copy link
Member

@pcraciunoiu are you using docker? Can you provide the relevant file(s)?

@pcraciunoiu
Copy link

Yes, it's inside docker. I cannot provide the entire thing, but what relevant files are you looking for?

  • Docker version 18.09.3, build 774a1f4
  • docker-compose version 1.21.2, build a133471 (although I'd guess that doesn't matter)

This is the start of the image:

FROM python:3.6.6 as test-container

ENV PYTHONUNBUFFERED 1

RUN apt-get update && apt-get install -y \
    sudo && apt-get install -y \
    git \
    nginx \
    mysql-client \
    supervisor
RUN python3 -m pip install pipenv

# Install python requirements
RUN pipenv install --system --deploy --ignore-pipfile

However, ssh into the container and running pipenv install creates a virtualenv and watchman is missing there too:

pipenv shell
python3
>>> import watchman

Sample Pipfile:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[requires]
python_version = "3.6"

[packages]
django = "==2.1.7"
django-watchman = {git = "git://github.com/mwarkentin/django-watchman.git",ref = "master"}

[pipenv]
allow_prereleases = true

Hope that helps. Let me know what else you need.

@techalchemy
Copy link
Member

That’s perfect thank you. Just want enough to reproduce / test with

@techalchemy techalchemy reopened this Mar 10, 2019
@techalchemy
Copy link
Member

Reopening until I can re-test

@techalchemy
Copy link
Member

Using the above pipfile and dockerfile and a wheel built from the master branch, this is now working without any issue for me. Thanks for the reproducible test case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Docker Issue affects docker builds.
Projects
None yet
Development

No branches or pull requests

4 participants