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

macOS circleCI python 3.7 builder is failing twisted.test.test_main.MainTests.test_twisted and twisted.test.test_main.MainTests.test_trial #9615

Closed
twisted-trac opened this issue Apr 7, 2019 · 11 comments

Comments

@twisted-trac
Copy link

glyph's avatar @glyph reported
Trac ID trac#9615
Type defect
Created 2019-04-07 03:36:00Z

See these two unrelated PRs failing in the same way:

https://circleci.com/gh/twisted/twisted/3405

https://circleci.com/gh/twisted/twisted/3393

This makes me think that python 3.7 on macOS might actually be broken when running python -m.

Searchable metadata
trac-id__9615 9615
type__defect defect
reporter__glyph glyph
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1554608160497428 1554608160497428
changetime__1554617444248784 1554617444248784
version__None None
owner__glyph glyph

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

This output in the "prepare the macOS environment" step is interesting, maybe:

#!/bin/bash -eo pipefail
echo 'export PATH=/usr/local/bin:$PATH:/Users/distiller/Library/Python/3.7/bin' >> $BASH_ENV
python3 --version
pip3 install -q --user --ignore-installed --upgrade virtualenv
pip3 install -q tox --user
^D��^D��Python 3.7.0
  The script virtualenv is installed in '/Users/distiller/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  The scripts tox and tox-quickstart are installed in '/Users/distiller/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

The tests are using sys.executable though, so that shouldn't be it...

I can't reproduce this using 3.7.3 on my mac.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

SSH'd into the test container that circleci ran:

bash-3.2$ ./build/py37-alldeps-withcov-posix/bin/python -m twisted.trial twisted.test.test_main.MainTests
twisted.test.test_main
  MainTests
    test_trial ...                                                         [OK]
    test_twisted ...                                                       [OK]
    test_twisted_import ...                                                [OK]

-------------------------------------------------------------------------------
Ran 3 tests in 1.110s

PASSED (successes=3)

so this is some kind of weird test ordering bug 😭

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

Aah wait it does fail if I run it in isolation via tox.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

The problem appears to be that the test sees /usr/local/Cellar/python/3.7.0/bin/python3.7 as sys.executable, where it should see /Users/distiller/repo/build/py37-alldeps-withcov-posix/bin/python3.7.

A simple python -c in the tox venv shows the right thing so I'm not quite sure what's going on.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

It's a regression in tox, specifically in tox 3.8 and greater. Pinning tox to 3.7 fixes the issue.

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

tox-dev/tox#1252

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

#1123

@twisted-trac
Copy link
Author

hawkowl's avatar @hawkowl set owner to @glyph

lgtm

@twisted-trac
Copy link
Author

glyph's avatar @glyph commented

I will merge this as soon as everything goes green.

@twisted-trac
Copy link
Author

glyph's avatar @glyph set status to closed

In changeset 9781978

#!CommitTicketReference repository="" revision="9781978c9929ff76089089bb474c6760e3983ca3"
Merge pull request #1123 from glyph/9615-dammit-tox

Author: glyph

Reviewer: hawkowl

Fixes: ticket:9615

pin version of tox used in CI to work around an upstream regression

see https://github.com/tox-dev/tox/issues/1252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants