Skip to content

Update Circle CI environment #822

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

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Jan 9, 2019

This should fix the build error affecting all Python 2 builds in CI.

Edit: I should have included more details about why we have to update setuptools. When running pip install -r mbed-os/requirements.txt on the CI machine, I received this error:

  Source in /tmp/pip-build-1a03jN/pyocd has version 0.14.3, which satisfies requirement pyocd>=0.14.0 from https://fil
es.pythonhosted.org/packages/6c/ae/0baea35a5d061315af00b4b461efa9f1f0c897017230442939f18e9e6885/pyocd-0.14.3.tar.gz#sh
a256=32d346c21a33d854e7294616927a2462cf5d98f9953f964d8b577dc42624cbcc (from mbed-host-tests<=1.5,>=1.1.2->-r mbed-os/r
equirements.txt (line 12))
Cleaning up...
  Removing source in /tmp/pip-Yom1Nt-build
  Removing source in /tmp/pip-build-1a03jN/prettytable
  Removing source in /tmp/pip-build-1a03jN/junit-xml
  Removing source in /tmp/pip-build-1a03jN/pyYAML
  Removing source in /tmp/pip-build-1a03jN/intervaltree
  Removing source in /tmp/pip-build-1a03jN/mbed-ls
  Removing source in /tmp/pip-build-1a03jN/mbed-host-tests
  Removing source in /tmp/pip-build-1a03jN/mbed-greentea
  Removing source in /tmp/pip-build-1a03jN/pyelftools
  Removing source in /tmp/pip-build-1a03jN/future
  Removing source in /tmp/pip-build-1a03jN/asn1ate
Exception:
Traceback (most recent call last):
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/commands/install.py", line 299, in run
    requirement_set.prepare_files(finder)
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/req/req_set.py", line 360, in prepare_fil
es
    ignore_dependencies=self.ignore_dependencies))
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/req/req_set.py", line 647, in _prepare_fi
le
    set(req_to_install.extras) - set(dist.extras)
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line
2810, in extras
    return [dep for dep in self._dep_map if dep]
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line
2624, in _dep_map
    dm.setdefault(extra,[]).extend(parse_requirements(reqs))
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line
2980, in parse_requirements
    "version spec")
  File "/opt/circleci/.pyenv/versions/2.7.12/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line
2945, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])
RequirementParseError: Expected version spec in enum34;python_version<"3.4" at ;python_version<"3.4"

There is a requirement parsing error with one of the packages. The syntax is valid, but the support was added in a later version of setuptools. The CI machine was running an old version of setuptools (20.10.1 to be exact, the latest release is 40.6.3 as of this writing), so I've added a command to update the package.

@bridadan bridadan requested a review from theotherjimmy January 9, 2019 23:16
@screamerbg screamerbg self-requested a review January 10, 2019 15:53
screamerbg
screamerbg previously approved these changes Jan 10, 2019
Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

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

LGTM

@bridadan
Copy link
Contributor Author

The old version of mercurial on the CI machine was having trouble with the redirect from developer.mbed.org to os.mbed.com:

$ mbed import https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg hg-test -v
[mbed] Working path "/home/circleci/project/.tests" (program)
[mbed] Importing program "hg-test" from "https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg" at latest revision in the current branch
[mbed] Trying to guess source control management tool. Supported SCMs: bld, git, hg
[mbed] Exec "git clone https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg /home/circleci/project/.tests/hg-test" in "/home/circleci/project/.tests"
Cloning into '/home/circleci/project/.tests/hg-test'...
fatal: unable to update url base from redirection:
  asked for: https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg/info/refs?service=git-upload-pack
   redirect: https://os.mbed.com/teams/Morpheus/code/mbed-Client-Morpheus-hg/info/refs/?service=git-upload-pack
[mbed] Exec "hg clone https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg /home/circleci/project/.tests/hg-test" in "/home/circleci/project/.tests"
abort: error: _ssl.c:510: error:14094438:SSL routines:SSL3_READ_BYTES:tlsv1 alert internal error
[mbed] ERROR: Unable to clone repository (https://developer.mbed.org/teams/Morpheus/code/mbed-Client-Morpheus-hg)

I've updated the URLs to use os.mbed.com instead.

@bridadan bridadan force-pushed the update_setuptools branch 8 times, most recently from b9b11e1 to d4afde9 Compare January 10, 2019 21:30
@bridadan bridadan changed the title Update setuptools Update Circle CI environment Jan 10, 2019
@bridadan bridadan force-pushed the update_setuptools branch 7 times, most recently from d561b54 to db8bee3 Compare January 10, 2019 22:45
@bridadan
Copy link
Contributor Author

Ug, still not working. I'll try more tomorrow.

@bridadan bridadan force-pushed the update_setuptools branch 4 times, most recently from 6b1fc3c to 6f86790 Compare January 11, 2019 00:18
@bridadan
Copy link
Contributor Author

Lol just stayed a little longer and got it working.

There were quite a few things that needed love in the Circle CI config. It's now using a more up to date OS (Debian Stretch), which fixes another issue I ran into with mercurial.

It also tests Python 3.6 since we say we support it in the README.

@theotherjimmy
Copy link
Contributor

@bridadan Did you change the name of the checks that are required?

@bridadan
Copy link
Contributor Author

@theotherjimmy looks like I did change the names of the jobs in Circle CI (to disambiguate Python 3.6 from Python 3.7). I can change the required checks on the repository if you're ok with these changes. (the existing PRs will probably need a rebase)

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