Skip to content

Commit 6fdbc3b

Browse files
Use ./pants3 for majority of CI (#6981)
### Problem Right now our CI exclusively uses Python 2 under-the-hood. It tries to test Python 3 support by setting`--setup-python-interpreter-constraints` to Python 3, but this only constrains subprocesses like tests and is not the same thing as fully supporting Python 3. We want our CI to test using both Python 2 under-the-hood and Python 3 under-the-hood, because for the next two releases are promising users that either interpreter is fully supported. Daily CI should run primarily with Python 3, and the nightly cron job should check for Python 2 regressions. ### Solution Use the new `./pants3` script added in #6959. #### Installing Python 3 on each shard * OSX: git clone pyenv to consistently install 3.6.8. Necessary because some older images come with an outdated version of pyenv. We don't use Travis's `language` feature because several shards are supposed to be `language: general`. * Linux build engine, temporarily modify `travis_ci/Dockerfile` to download pyenv and install Python 3. This change is being pulled out the `centos6` image in #7064 to avoid rebuilding Py3 every CI run, but it must be published to Docker hub so will be addressed in a followup PR. * Normal Linux shards, use Travis's `language: python` feature #### Add integration test blacklist 23 integration test targets are failing when ran with Py3 under-the-hood, so we restore support for an integration test blacklist. This allows us to track Py3 fixes we make and to collaborate more easily. Further, the contrib tests, linter, and osx rust shards when ran with Py3. So, we run these 3 shards and the blacklist with a Py2 pex but Py3 subprocesses, which is what we currently do in master. #### Expand Cron job We add non-integration test jobs to the nightly cron run to check for any regressions in shards like `Linux build wheels`, now that we run daily with a Py3 PEX and need to check that they still work with a Py2 PEX. #### Default to Python 3 in CI Defaulting to Py3 reflects that we are transitioning towards exclusive Py3 use. This is not user-facing, and only impacts the `.travis.yml` code, so this change is safe to make, whereas we want to wait to rename `./pants3` -> `./pants` until it is a bit more robust. ### FYI - new .travis.yml idiom This required a major rewrite of `.travis.yml` to avoid duplication. The new idiom we use when defining a shard is to have a `base_my_new_shard` which defines the minimum amount of config necessary for that job, and then to have a `py2_my_new_shard` and `py3_my_new_shard` that extend that base along with their corresponding OS + python version config.
1 parent 27f9068 commit 6fdbc3b

File tree

7 files changed

+1254
-593
lines changed

7 files changed

+1254
-593
lines changed

0 commit comments

Comments
 (0)