Skip to content

Parallelize PR system tests via GitHub Actions matrix.#829

Open
PranjalManhgaye wants to merge 5 commits into
precice:developfrom
PranjalManhgaye:issue-789-parallel-system-tests-matrix
Open

Parallelize PR system tests via GitHub Actions matrix.#829
PranjalManhgaye wants to merge 5 commits into
precice:developfrom
PranjalManhgaye:issue-789-parallel-system-tests-matrix

Conversation

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator

Summary

This PR splits PR system tests into two GitHub Actions matrix jobs (release_test_shard_1 and release_test_shard_2). Together they cover the same 48 cases as release_test; I left release_test itself unchanged so manual runs and other workflows still work as before, I set fail-fast: false so 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-vm runners, 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

  • I have already ran python3 validate_release_test_shards.py =>48 cases = 24 + 24
  • Local : system-tests-dev with --rundir on the precice-data partition (pass)
  • please check from there side for this PR with trigger-system-tests so we can verify on precice-tests-vm (I don’t have access to trigger that from my side ig)

Notes

  • Manual and latest-components workflows still use release_test; we can extend the matrix there in a follow-up if you want.
  • If two shards run at once on different runners, Docker may build the same images twice. I kept v1 simple; we can tighten that later if CI shows problems.

close #789

PranjalManhgaye added a commit to PranjalManhgaye/tutorials that referenced this pull request Jun 5, 2026
@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

@MakisH follow-ups (i think later, not this PR) :

  • same matrix for manual / latest-components workflows
  • more shards if we get more runners
  • docker build sharing only if ci shows we need it
  • option 2 (systemtests.py parallel) => skipped for now

@PranjalManhgaye PranjalManhgaye requested a review from MakisH June 5, 2026 14:27

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (see extra), as these take too long. We could then just define these directly in the extra, 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.

Comment thread heat-exchanger/download-meshes.sh Outdated
Comment thread .github/workflows/system-tests-pr.yml
Comment thread tools/tests/README.md Outdated
Comment thread tools/tests/validate_release_test_shards.py Outdated
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.
@PranjalManhgaye PranjalManhgaye force-pushed the issue-789-parallel-system-tests-matrix branch from 7e76ab0 to 9d75c1f Compare June 6, 2026 12:46
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.
@PranjalManhgaye PranjalManhgaye requested a review from MakisH June 6, 2026 15:06
uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop
with:
suites: ${{ inputs.suites || 'release_test' }}
suites: ${{ matrix.suites }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +36 to +43
@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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs some comments/motivation. Why is it needed? Why (only this) declared as a static method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

Parallel execution of the system tests

2 participants