-
Notifications
You must be signed in to change notification settings - Fork 593
Conversation
8b00d54
to
0cc0004
Compare
af74b98
to
097b861
Compare
* update heronpy release scripts for python3 * update dist Dockerfiles to only use python3 * remove python2 from docker images * upgrade pylint for python3 support * upgrade PEX so transative dependencies are captured Additionally: * fix Ubuntu 16.04 images * fix linting issues found by newer pylint There is an issue with encapsulation in the builds where the global python3 environment is used while PEX installs a nested transitive dependency of pylint: `pylint>astroid>wrapt`. This seems to be because of logic in its setup.py which can be disabled with `WRAPT_INSTALL_EXTENSIONS=false`
4d76281
to
1ace938
Compare
175387d
to
a9ce0a5
Compare
* use kind to create ephemeral clusters * start consolidating scripts with python
Thanks @joshfischer1108 for checking it out! I pushed 5efa344 to fix that, which at least seems to run without any toplogies (yet to try with). I'm making some basic bests for the helm chart with everything scaled down to one, and can try adding extra steps you do |
Thanks @Code0x58 . I'll do some more checking/testing this weekend. |
I just pushed a change that should get you at least a little further. I'm still working on getting the integration to run against k8s, so will hopefully have some time for that this weekend |
@Code0x58 I haven't forgotten about your PR. I'm trying to wrap up some work I had ahead of this so that we can start a new release candidate vote. I assumed it would have been done sooner, but I had forgotten about one last task. Once I have that fixed. I'll come back to this. Hope this is ok. |
Followed the steps in #3522 (comment), the Tracker and UI look good to me. |
Test with minikue. Looks good
|
I'm testing this branch on the |
All good on Darwin and Debian10 platforms. 👍 @Code0x58
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it on ubuntu18 and seems to be working good:
- build ok
- install tools successfully
- tracker/ui start ok
- submit test topology successfully
- topology shows ok in UI
- kill test topology successfully.
I think we are ready to merge. |
* Initial Python 3 upgrade effort * Fixes towards python3 support * update heronpy release scripts for python3 * update dist Dockerfiles to only use python3 * remove python2 from docker images * upgrade pylint for python3 support * upgrade PEX so transative dependencies are captured Additionally: * fix Ubuntu 16.04 images * fix linting issues found by newer pylint There is an issue with encapsulation in the builds where the global python3 environment is used while PEX installs a nested transitive dependency of pylint: `pylint>astroid>wrapt`. This seems to be because of logic in its setup.py which can be disabled with `WRAPT_INSTALL_EXTENSIONS=false` * Fix new pylint issues * update setuptools * Make pex_pytest non-zip-safe * Rough proto_library fix The issue encountered was protocolbuffers/protobuf#1491 which may be fixed by a pending PR to protoc, or with a switch to the official protobuf rules and the import_prefix parameter to proto_library. * WIP: Fix python3 incompatibilities * bytes vs str issues * update kazoo * order of processes in executor test changed due to dict ordering? * some places needed / switched to // - may be more not caught by tests * add travis_wait as some stages going over 10 minutes without output in CI TODO: * make sure the kazoo upgrade is correct, it was done only by updating package versoin * Try fixing build time issue in travis * Upgrade docker rules * Upgrade to python3 in CI * Fix python integration tests * Fix more bytes vs str errors + update vagrant * Update Travis to Python3.7 + fix Vagrant on mac * Reduce requirement to python3.6 + py3 fixes * use universal_newline in popen instead of text in Popen for py3.6 * fix bytes/str issues in deserialisation * fix file open modes * use set instead of sets.Set * fix __import__(level) default * Update cloudpickle * Fix python addressing of release.yaml * Additions to get docker image builds working and tested * use new external pkg_* rules * add python to compile docker images until pkg_* * add --host_force_python=PY3 to other bazel.rc files * WIP: Add CI for docker images/releases * use kind to create ephemeral clusters * start consolidating scripts with python * Fix helm chart * bytes vs str fix * Mention Python 3.6 requirement in README.md * updatedockerfile Co-authored-by: Neng Lu <[email protected]> Co-authored-by: Nicholas Nezis <[email protected]> Co-authored-by: bed debug <[email protected]> Co-authored-by: huijunwu <[email protected]>
This upgrades to Python 3.6+ A summary from the commit messages:
./vagrant/local-ci.sh
which runs CI matching Travis. It gives a fair chunk of resources to the VM and is tested on Mac + Linux, and makes debugging easier. Mesos/Aurora was dropped just to make the upgrade easier, with the assumption someone can update that if it's still supportedIssues that follow on from this:
tools/rules/genproto.bzl
which is from python: use relative imports in generated modules protocolbuffers/protobuf#1491, possibly one of:import_prefix
python
in the environment, so something likepython2
orpython-is-python3
has to be installed in build environments (e.g.docker/compile/Dockerfile.*
).pkg_tar
rules have been deprecated in core bazel and made externalareas to check/known risks:
Things noticed along the way for future clean up issues:
enum34
,mock
, andunittest2
can be replaced with python3 built in libraries - these can be listed withbazel query 'attr('reqs', "(unittest|enum34|mock)", kind("pex_library", //heron/...))' //heron/tools/admin/src/python:admin-py
buildifier
could be added to the scripts+tests (it can be acquired viahttp_file(...)
) - turns out it's not that easy/nice becauseselect(...)
can't be used at the top level WORKSPACE./scripts/travis/build.sh
and./scripts/travis/test.sh
) to cut down wall clock build times from what is nearly 3 hours at the moment (with some fail-fast that, but that may not be an issue). This would be a great place to have a separate lint stage to expose all issues in one goscripts/...
- I suspect they could use some consolidation and cleaning updocker/{compile,dist,base,test}/*
look like good candidates for consolidation with multi-stage buildstidbits and trivia:
pex_library.reqs
:bazel query 'attr('reqs', ".{3,}", kind("pex_library", //heron/...))' --output=build | grep reqs | cut -d \[ -f2 | sed 's/\],//' | sed 's/, /\n/g' | sort | uniq -c
unused_deps
isn't safe to use on the codebase at the moment, but could be something to look into