Parallelize PR system tests via GitHub Actions matrix#829
Parallelize PR system tests via GitHub Actions matrix#829PranjalManhgaye wants to merge 7 commits into
Conversation
|
@MakisH follow-ups (i think later, not this PR) :
|
MakisH
left a comment
There was a problem hiding this comment.
Nice to see a first prototype towards parallization!
While this is a valid and easy-to-implement approach for parallelization, I think it mainly adds a layer to the current approach.
Ideally, we should end up with the individual test suites (the ones per tutorial) as shards, so that the jobs also get meaningful names. Issues there will be:
- race conditions in building the same Docker layers, if a runner picks more than one shard at the same time,
- that some too long tests are currently excluded from the
release_test(seeextra), as these take too long. We could then just define these directly in theextra, instead of referring to the ones defined at the tutorial level with anchors.
Nevertheless, I could create another runner and use this PR to test if the parallelism with multiple custom runners makes sense.
7e76ab0 to
9d75c1f
Compare
38b4813 to
a266f23
Compare
|
@PranjalManhgaye #842 introduced some conflicts in |
Add release_test_shard_1/2 covering the same cases as release_test, and run them as separate matrix jobs for clearer logs and cheaper reruns.
Move the release_test shard matrix to system-tests-latest-components, restore system-tests-pr to a single release_test job, and clarify README wording on concurrent Docker builds.
Define release_test_shard_1/2 tutorial lists once with YAML anchors and build release_test as their union. Flatten nested list aliases in TestSuite parsing and remove validate_release_test_shards.py.
Include channel-transport-particles, flow-over-heated-plate fenicsx, and partitioned-heat-conduction fenicsx cases so release_shard_1/2 cover the same 53 cases as develop release.
a266f23 to
47e2084
Compare
|
I triggered a test run: https://github.com/precice/tutorials/actions/runs/27600082238 |
|
While the What I am not sure at the moment is what is the right way to get these inputs to avoid duplication. |
|
@MakisH what do you think ; add a small prepare-matrix job in the workflow that reads tests.yaml , or should we extend systemtests.py tooling to expose this list somehow ?? |
|
Maybe related: I always have to count how many tutorials and tutorial cases we have, both for reporting and now for ensuring that everything is tested. We could collect this information from all the We could then use that information as input for this matrix. But in general, a prepare-matrix job would work. Note, however, that |
|
@MakisH i am happy to follow this and drop the artificial shards , and i can implement it by adding a small prepare-matrix step that reads tests.yaml so the workflow doesn’t duplicate suite lists, but to confirm before i do, do you want the matrix at tutorial-suite level (not per-case), keep release as the source of truth there for now, and keep extra out of the default latest-components run (manual or less frequent) ?? |
|
Overall, I would say that the whole feature is still in the exploration phase and would need some research / brainstorming.
We could also split per-case, as long as we don't run a case multiple times. That would give even more refined output. But I think it would be simpler to split per-tutorial, which would also give simpler names. It would also give fewer jobs, which might be easier to manage for the runners, and will share some of the setup overhead.
Yes, I would keep this as-is for now, unless it makes sense to change it. |
Summary
This PR splits PR system tests into two GitHub Actions matrix jobs (
release_test_shard_1andrelease_test_shard_2). Together they cover the same 48 cases asrelease_test; I leftrelease_testitself unchanged so manual runs and other workflows still work as before, I setfail-fast: falseso if one shard fails, the other keeps running => that makes failures easier to read and cheaper to retry.Why
Right now, when one test fails you often have to re-run the whole suite and dig through one huge log. With two shards, you get smaller logs per job and can re-run only the failed matrix job.
If we have two
precice-tests-vmrunners, the shards can run in parallel. On a single runner they may still queue, but we still get clearer CI output => which matches what we discussed for this issue.Test plan
python3 validate_release_test_shards.py=>48 cases = 24 + 24system-tests-devwith--rundiron the precice-data partition (pass)trigger-system-testsso we can verify onprecice-tests-vm(I don’t have access to trigger that from my side ig)Notes
release_test; we can extend the matrix there in a follow-up if you want.close #789