-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
tox 3.7.0 doesn't fail on undefined factor (where 3.6 did) #1160
Comments
* Use TOX_FORCE_IGNORE_OUTCOME env var to implement equivalent of tox-travis unignore_outcomes * Pin tox to ~3.6.1 to ensure unknown toxenv fails build (tox-dev/tox#1160) * Also, pin detox to 0.18 (avoids crash on exit as detox attempts to warn that it's deprecated)
I believe I've located the change that introduced the problem. It was part of PR #1102 that implemented parallel invocation. Here's what seems to be happening:
So in 3.7.0, the @gaborbernat I can't really tell if this was something you needed to support parallel execution, or if maybe it was just a typo or attempted cleanup. (It took me a while in a debugger to figure out that A quick fix might be to revert that one changed line, but I haven't checked to see if that breaks anything else. A better fix might be to rename |
@medmunds thanks for getting to the bottom of this. This was more a way to clean up the code, an unfortunate regression. I would say let's try to revert that line and add a test to defend against such regression. Sadly we can't rename things yet because of backward compatibility with our plugins. 😭 Can you create a PR for this? thanks! |
@gaborbernat done. Incidentally, the existing tests for the "unknown environment" error didn't catch this, because the problem only occurs if tox.ini includes an |
In tox 3.6 and earlier, if your tox.ini delcares an
envlist
, runningtox -e py36-someUndefinedFactor
would exit with "ERROR: unknown environment 'py36-someUndefinedFactor'" (and without creating a venv).In tox 3.7.0, the same command seems to ignore "someUndefinedFactor", and instead creates a venv and attempts to run the commands in it.
This makes it difficult to catch typos in commands or tox.ini.
Reproduction
(I'm on Python 3.7.1, but don't think this matters. Full system info below.)
pip install tox==3.6.1
Run
tox -e py36-django22
(django22 is not in the envlist).Results: "ERROR: unknown environment 'py36-django22'" (as expected)
pip install tox==3.7.0
Run
tox -e py36-django22
again.Expected: same unknown environment error as with tox 3.6.1.
Actual results: tox attempts to create the environment and run the commands in it:
System info
macOS 10.14.2
Python 3.7.1
pip list
The text was updated successfully, but these errors were encountered: