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

Switch to Py2 and Py3 shards. #6289

Merged
merged 9 commits into from Aug 8, 2018

Conversation

Projects
None yet
3 participants
@stuhood
Copy link
Member

stuhood commented Aug 1, 2018

Problem

In order to avoid backsliding as changes are made in service of #6062, we should begin running a travis shard that uses python 3 even before it has gone completely green.

Solution

Repurpose one of the unit test shards to run with python 3, with abbreviated logging and || exit 0. This should allow us to track the total failure count under python 3, and attempt to push it down.

@stuhood stuhood force-pushed the twitter:stuhood/py23-unit-in-travis branch 10 times, most recently from 529a3b9 to 8d7e19e Aug 1, 2018

@stuhood stuhood force-pushed the twitter:stuhood/py23-unit-in-travis branch from e85e41f to 8d7e19e Aug 7, 2018

@stuhood stuhood force-pushed the twitter:stuhood/py23-unit-in-travis branch 2 times, most recently from eabd8c5 to e6a2995 Aug 8, 2018

stuhood added some commits Aug 2, 2018

Ensure that compatibility only applies to the test run, rather than t…
…o bootstrap. Changing interpreter-constraints requires a clean-all... need to file an issue.

@stuhood stuhood force-pushed the twitter:stuhood/py23-unit-in-travis branch 2 times, most recently from cf6ec7a to 8373bce Aug 8, 2018

@@ -191,6 +193,7 @@ def test_transforms_not_discard_page_tocs(self):
self.assertIn('DEPTH=1 LINK=one TEXT=Section One', rendered)
self.assertIn('DEPTH=1 LINK=two TEXT=Section Two', rendered)

@pytest.mark.skipif(sys.version_info >= (3,0), reason="TODO: See #6062.")

This comment has been minimized.

@wisechengyi

wisechengyi Aug 8, 2018

Contributor

What is the general philosophy on skipping py3 test given

        # Allowed to fail.
        - ./build-support/bin/ci.sh -x -3efkmrjcnt "${SHARD}" || exit 0

in .travis.yml?

This comment has been minimized.

@stuhood

stuhood Aug 8, 2018

Member

To make it past the "internal" tests in order to run the unit tests.

This comment has been minimized.

@wisechengyi

wisechengyi Aug 8, 2018

Contributor

Oh gotcha. Thanks!

@stuhood stuhood force-pushed the twitter:stuhood/py23-unit-in-travis branch from 8373bce to 488536f Aug 8, 2018

@stuhood stuhood changed the title WIP: Switch to Py2 and Py3 shards. Switch to Py2 and Py3 shards. Aug 8, 2018

@stuhood stuhood requested review from illicitonion and jsirois Aug 8, 2018

@stuhood

This comment has been minimized.

Copy link
Member

stuhood commented Aug 8, 2018

This is reviewable. The individual commits should be useful to review independently.

@jsirois

jsirois approved these changes Aug 8, 2018

.travis.yml Outdated

- <<: *default_test_config
env:
- SHARD="Unit tests for pants and pants-plugins - shard 1"
- SHARD="Py2 - Unit tests in for pants and pants-plugins"

This comment has been minimized.

@jsirois

jsirois Aug 8, 2018

Member

'in' or 'for' instead of 'in for'

@@ -15,6 +15,8 @@ Runs commons tests for local or hosted CI.
Usage: $0 (-h|-fxbkmsrjlpuyncia)

This comment has been minimized.

@jsirois

jsirois Aug 8, 2018

Member

-3fx...

#
# We additionally remove the ifdefs that apply conditional `init` logic for Py2 vs Py3, in order
# to define a module that is loadable by either 2 or 3.
# TODO: Because PyPy uses the same `init` function name regardless of the python version, this

This comment has been minimized.

@jsirois

jsirois Aug 8, 2018

Member

To my knowledge we have never supported running on PyPy like pex does. Perhaps kill the TODO.

This comment has been minimized.

@stuhood

stuhood Aug 8, 2018

Member

At one point about two years ago I ran pants under PyPy, and saw a 30 percent speedup... would be awesome to be able to support it at some point...

@stuhood stuhood referenced this pull request Aug 8, 2018

Open

Porting to Python 3 #6062

5 of 7 tasks complete

@stuhood stuhood merged commit ced80ad into pantsbuild:master Aug 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@stuhood stuhood deleted the twitter:stuhood/py23-unit-in-travis branch Aug 8, 2018

CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018

Switch to Py2 and Py3 shards. (pantsbuild#6289)
### Problem

In order to avoid backsliding as changes are made in service of pantsbuild#6062, we should begin running a travis shard that uses python 3 even before it has gone completely green.

### Solution

Repurpose one of the unit test shards to run with python 3, with abbreviated logging and `|| exit 0`. This should allow us to track the total failure count under python 3, and attempt to push it down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment