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

Switch to Py2 and Py3 shards. #6289

Merged
merged 9 commits into from
Aug 8, 2018

Conversation

stuhood
Copy link
Member

@stuhood 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 stuhood/py23-unit-in-travis branch 10 times, most recently from 529a3b9 to 8d7e19e Compare August 4, 2018 05:49
@stuhood stuhood force-pushed the stuhood/py23-unit-in-travis branch from e85e41f to 8d7e19e Compare August 7, 2018 16:20
@stuhood stuhood force-pushed the stuhood/py23-unit-in-travis branch 2 times, most recently from eabd8c5 to e6a2995 Compare August 8, 2018 01:25
stuhood added 3 commits August 7, 2018 19:51
…o bootstrap. Changing interpreter-constraints requires a clean-all... need to file an issue.
@stuhood stuhood force-pushed the stuhood/py23-unit-in-travis branch 2 times, most recently from cf6ec7a to 8373bce Compare August 8, 2018 04:27
@@ -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.")
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh gotcha. Thanks!

@stuhood stuhood force-pushed the stuhood/py23-unit-in-travis branch from 8373bce to 488536f Compare August 8, 2018 05:45
@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 August 8, 2018 05:45
@stuhood
Copy link
Member Author

stuhood commented Aug 8, 2018

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

.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"
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@@ -15,6 +15,8 @@ Runs commons tests for local or hosted CI.

Usage: $0 (-h|-fxbkmsrjlpuyncia)
Copy link
Contributor

Choose a reason for hiding this comment

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

-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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Member Author

@stuhood stuhood Aug 8, 2018

Choose a reason for hiding this comment

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

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 mentioned this pull request Aug 8, 2018
12 tasks
@stuhood stuhood merged commit ced80ad into pantsbuild:master Aug 8, 2018
@stuhood stuhood deleted the stuhood/py23-unit-in-travis branch August 8, 2018 20:24
CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018
### 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants