-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create openssl-version, allowing for reporting of openssl-version wit…
…hout requiring tox-run-command (and the trouble that adds).
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaraco with this implementation it's not guaranteed that it'll report the same info since the man test env because you create a new virtualenv in a separate step which may even hit a different interpreter.
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way I see it, because
testenv:openssl-version
inherits the settings fromtestenv
, only overridingcommands
and because in the steps, both environments are created withpython -m tox
and becauseenvlist = python
(meaning use the same version of Python as tox), those envs, although they're not the same envs, should have identical makeup, at least for a Github workflows run. If someone is running these commands locally and running the commands at different times, I could see how the dependencies could resolve differently, but that seems like a low risk.I do regret not having linked the issue in the commit. I can't even find that I registered an issue somewhere, probably because I was already layers deep on an issue I hadn't intended to be troubleshooting.
It occurs to me, it should be possible to avoid creating a separate environment altogether and simply invoke
.tox/python/bin/python -m OpenSSL.debug
.f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I did in bfb8e87 and 33fa3f5.
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. That technique may not work because Github workflows run on Windows also, which doesn't have
.tox/python/bin
(has.tox/python/Scripts
instead).f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 94c7e09, I've restored tox-run-command, but limited its scope to just the Github workflows.
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you mentioned earlier that we have to avoid OS-dependent things. That's the reason I introduced this plugin. Besides, Travis CI is also capable of running Windows so we may need to reconsider the hardcoded command there as well.
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I was thinking along the lines of a scenario when somebody adds extra steps into the CI config between running those commands in the future. This future person may not be attentive enough and wouldn't realize the consequences.
f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I'd lean toward injecting tox-run-command separately in each environment. Adding this dependency to
tox.requires
causes new virtualenvs to be created just to run tox, adding complexity to a workflow and potentially leading to other problems to debug (such as I encountered in tox-dev/tox#1435). At some point, we may want to maketox-run-command
or other tox plugins available in thetox.requires
, but I'd like to defer that for as long as possible, in particular when a developer's workflow demands that tooling (and not just the CI environments).f791b13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine that with the introduction of
--devenv
would be unnecessary.