Parallelize PR system tests via GitHub Actions matrix.#829
Parallelize PR system tests via GitHub Actions matrix.#829PranjalManhgaye wants to merge 5 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.
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.
7e76ab0 to
9d75c1f
Compare
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.
| uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop | ||
| with: | ||
| suites: ${{ inputs.suites || 'release_test' }} | ||
| suites: ${{ matrix.suites }} |
There was a problem hiding this comment.
The || 'release_test' part is for workflow runs that don't start from a workflow_dispatch (manual trigger) event, which would provide input arguments. Also in this case, we will need defaults.
| @staticmethod | ||
| def _iter_tutorial_cases(tutorials_section): | ||
| """Yield tutorial case dicts, flattening YAML list aliases (e.g. shard lists).""" | ||
| for item in tutorials_section: | ||
| if isinstance(item, list): | ||
| yield from TestSuites._iter_tutorial_cases(item) | ||
| else: | ||
| yield item |
There was a problem hiding this comment.
This needs some comments/motivation. Why is it needed? Why (only this) declared as a static method?
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