cylc / cylc-flow

Cylc: a workflow engine for cycling systems.
https://cylc.github.io
GNU General Public License v3.0
329 stars 93 forks source link

swarm: use docker images for local tests #4007

Open oliver-sanders opened 3 years ago

oliver-sanders commented 3 years ago

Related:

The Docker “swarm” used by the test battery uses containers to emulate remote job platforms and runs the tests themselves on the local platform.

This largely replicates the old system; it allows us to run the test battery on the system it will be deployed on including the job platforms available which is very useful.

However:

I suggest that we make it possible to run the whole test battery in containers where desired whilst still supporting running tests locally. We can then install and configure the job runner stuff on these images allowing testing of slurm, pbs, etc. You wouldn’t be able to use these containers from your local system (without doing the heavy lifting yourself) but would still be able to use the background/at containers as well as available platforms for local testing.

Something along these lines:

$ ctb -c cylc_py37_bash_5 -p ‘_remote_background_indep_tcp’ tests/f
$ docker cylc_py37_bash_5 exec pytest tests/u

text4899-9

oliver-sanders commented 3 years ago

See comment on this issue https://github.com/cylc/cylc-flow/pull/4197 about building images with both pip/conda to test dependency changes.

oliver-sanders commented 3 years ago

Elaboration on the above comment...

We then dispose of the first container (job done).