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

Revert "ci(jenkins): delegate docker setup to the preCommit step" #559

Merged
merged 3 commits into from
Aug 14, 2019

Conversation

v1v
Copy link
Member

@v1v v1v commented Aug 14, 2019

Reverts #557

I'm afraid the proposed approach seems to be quite problematic when running the pre-commit-venv internals. So let's keep it as it was.

For the record I managed to reproduce the same issue locally running docker:

docker run --rm -ti -u "$(id -u):$(id -g)" -e PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$(pwd)/bin -v $(pwd):$(pwd):rw,z python:3.7-stretch /bin/bash
I have no name!@5a742775abbd:~$ HOME=/Users/vmartinez/work/src/github.com/elastic/apm-agent-python
I have no name!@5a742775abbd:~$ PATH=$PATH:$HOME/bin
...
I have no name!@5a742775abbd:~$ env
LANG=C.UTF-8
HOSTNAME=5a742775abbd
OLDPWD=/
GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
PWD=/Users/vmartinez/work/src/github.com/elastic/apm-agent-python
PYTHON_GET_PIP_SHA256=201edc6df416da971e64cc94992d2dd24bc328bada7444f0c4f2031ae31e8dad
HOME=/Users/vmartinez/work/src/github.com/elastic/apm-agent-python
PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/0c72a3b4ece313faccb446a96c84770ccedc5ec5/get-pip.py
TERM=xterm
PYTHON_VERSION=3.7.4
SHLVL=1
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/vmartinez/work/src/github.com/elastic/apm-agent-python/bin:/Users/vmartinez/work/src/github.com/elastic/apm-agent-python/bin
PYTHON_PIP_VERSION=19.2.2

...

I have no name!@5a742775abbd:~/.pre-commit-venv/bin$ curl https://pre-commit.com/install-local.py | python - 

...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/tmp/.virtualenv-pkg/virtualenv.py", line 2328, in <module>
    main()
  File "/tmp/.virtualenv-pkg/virtualenv.py", line 713, in main
    symlink=options.symlink)
  File "/tmp/.virtualenv-pkg/virtualenv.py", line 945, in create_environment
    download=download,
  File "/tmp/.virtualenv-pkg/virtualenv.py", line 901, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/tmp/.virtualenv-pkg/virtualenv.py", line 797, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/vmartinez/wor...mmit-venv/bin/python - setuptools pip wheel failed with error code 1
Traceback (most recent call last):
  File "<stdin>", line 103, in <module>
  File "<stdin>", line 80, in main
  File "/usr/local/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/local/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/vmartinez/work/src/github.com/elastic/apm-agent-python/.pre-commit-venv/bin/pip': '/Users/vmartinez/work/src/github.com/elastic/apm-agent-python/.pre-commit-venv/bin/pip'

@v1v v1v requested a review from mdelapenya August 14, 2019 11:36
@v1v v1v self-assigned this Aug 14, 2019
Copy link
Contributor

@beniwohli beniwohli left a comment

Choose a reason for hiding this comment

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

👍

@v1v v1v merged commit 8f6b2b8 into master Aug 14, 2019
@v1v v1v deleted the revert-557-feature/skipDockerLogin branch August 14, 2019 12:12
v1v added a commit to v1v/apm-integration-testing that referenced this pull request Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants