Add further py3* environments to Tox testing #166
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#166
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'd like to have some more guarantees on versions of Python that this tools supports. We could add a py35/36/37 and also early 38 testing environment to the Tox configuration. What do you think?
I've opened up witten/borgmatic#165 on the way towards this.
Also opened up witten/borgmatic#167.
And regarding CI, I've opened up witten/borgmatic#168 too :)
Already being done!
https://projects.torsion.org/witten/borgmatic/src/branch/master/.drone.yml#L15
Yeah, I added Python-version-specific testing to CI rather than to the tox configuration because I wanted to easily support the use case of: A dev on a random system (which may have any random supported version of Python installed) should be able to just run
tox
and get useful test feedback.. without having to set up Docker or install multiple versions of Python.And then with Drone set up for CI, we still have the backstop of CI tests running against all supported versions of Python.
That makes sense. However, it leaves the dev experience out of touch with the CI experience. This can be a pain for reproducing issues locally. One way is to integrate everything under Tox and then tell Tox to skip missing intepreters, so the dev experience is not interrupted by missing Python requirements. It is also more resistent against your CI service going bust or being bought my Microsoft or whatever - you always rely on Tox :)
Anyway, just rambling!
Yeah, I'm a big proponent of dev-CI parity as well. Telling Tox to skip missing interpreters is a compelling idea.. I didn't know that was an option. (Looks like it was added after I started using Tox!)
So let's say we change the
tox.ini
to start with:Then what do we do with the Drone config in CI? For instance, right now it's this:
As far as I know, there isn't a single (official) Python image that contains multiple versions of Python. So would you suggest keeping the
.drone.yml
exactly as-is, and just rely on the fact that in any given image, all interpreters but one will be skipped?A point from another discussion about simplifications made possible by this sort of multi-interpreter tox run: witten/borgmatic#173 (comment)
I believe the trick to use here is to somehow get what the
PYTHON_VERSION
environment variable is into theTOXENV
environment variable. See https://tox.readthedocs.io/en/latest/config.html#conf-envlist.See https://0-8-0.docs.drone.io/environment/ for environment wrangling.
I would also recommend checking out the "Parallel Execution" configuration from Drone. Multiple Python interpreters can be tested at once instead of one after the other: https://0-8-0.docs.drone.io/pipelines/.
I'm not quite following. Why would you have to plumb the
PYTHON_VERSION
through to theTOXENV
ifskipping_missing_interpreters
istrue
? For instance, let's say you have the existing.drone.yml
as it is today. When running through the build matrix and running an individualPYTHON_VERSION=3.5
build within it, that'll use a Python 3.5 Docker image, and run Tox within it. Tox will skip the missing Python 3.6 and 3.7 interpreters, and just run with Python 3.5.As for parallel execution, I'm not sure how that interacts with matrix builds. Maybe it "just works" when adding a
group:
to a matrix build?My ideas was for saving time and more clear logs (no skips). But, I don't actually know how much work Tox does to build an environment before skipping the intepreter but it might be time consuming for multiple ones. Seems fine what you're proposing!
witten/borgmatic#176