Skip to content

Parallelize release system tests via per-tutorial matrix - #829

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

Parallelize release system tests via per-tutorial matrix#829
PranjalManhgaye wants to merge 2 commits into
precice:developfrom
PranjalManhgaye:issue-789-parallel-system-tests-matrix

Conversation

@PranjalManhgaye

@PranjalManhgaye PranjalManhgaye commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Parallel release system tests via a per-tutorial GitHub Actions matrix derived from tests.yaml.

Approach: A prepare-matrix job reads release, groups cases by tutorial, and emits one job per tutorial with comma-separated per-case suite names (not bare tutorial suite names, so cases outside release are not pulled in).

Example: aste-turbine => 1 case, elastic-tube-1d => 6 cases. All 40 jobs together cover full release (67 cases), no duplicates.

Manual workflow:

  • release => serial by default (single job)
  • release + parallel: true => per-tutorial matrix (~40 jobs)
  • any other suites => single job (unchanged)

Nightly: still runs release as one serial job (unchanged).

Closes #789. Replaces the earlier shard-based approach in this PR.

Test plan

  • prepare-matrix job on ubuntu-latest
  • Manual release serial (default)
  • Manual release with parallel: true on self-hosted VM (#33298363903)

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
PranjalManhgaye added a commit to PranjalManhgaye/tutorials that referenced this pull request Jun 6, 2026
@PranjalManhgaye
PranjalManhgaye force-pushed the issue-789-parallel-system-tests-matrix branch from 7e76ab0 to 9d75c1f Compare June 6, 2026 12:46
@PranjalManhgaye
PranjalManhgaye requested a review from MakisH June 6, 2026 15:06
Comment thread .github/workflows/system-tests-latest-components.yml Outdated
Comment thread tools/tests/systemtests/TestSuite.py Outdated
@MakisH MakisH moved this from Planned next to Needs review in GSoC 2026: System tests improvements Jun 8, 2026
PranjalManhgaye added a commit to PranjalManhgaye/tutorials that referenced this pull request Jun 12, 2026
@PranjalManhgaye
PranjalManhgaye force-pushed the issue-789-parallel-system-tests-matrix branch from 38b4813 to a266f23 Compare June 12, 2026 11:05
@PranjalManhgaye
PranjalManhgaye requested a review from MakisH June 12, 2026 11:35
@MakisH

MakisH commented Jun 15, 2026

Copy link
Copy Markdown
Member

@PranjalManhgaye #842 introduced some conflicts in system-tests-latest-components.yml that should be easy to resolve.

PranjalManhgaye added a commit to PranjalManhgaye/tutorials that referenced this pull request Jun 16, 2026
@PranjalManhgaye
PranjalManhgaye force-pushed the issue-789-parallel-system-tests-matrix branch from a266f23 to 47e2084 Compare June 16, 2026 04:35
@MakisH

MakisH commented Jun 16, 2026

Copy link
Copy Markdown
Member

I triggered a test run: https://github.com/precice/tutorials/actions/runs/27600082238

@MakisH

MakisH commented Jun 16, 2026

Copy link
Copy Markdown
Member

While the matrix is a good approach, I think we should drop the shards and instead reuse the per-tutorial test suites (elastic-tube-1d, elastic-tube-3d, ...). This should also give clearer and faster output, and these test suites are by definition not overlapping with each other.

What I am not sure at the moment is what is the right way to get these inputs to avoid duplication.

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

@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 ??

@MakisH

MakisH commented Jun 16, 2026

Copy link
Copy Markdown
Member

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 metadata.yaml (assuming that they are complete, or somehow checking with another script if these are complete, checking all available directories).

We could then use that information as input for this matrix.

But in general, a prepare-matrix job would work. Note, however, that tests.yaml includes some duplicate information. We could define the release as all tutorials and read that. The question is then what do we do with the extra that take longer to run.

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

@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) ??

@MakisH

MakisH commented Jun 16, 2026

Copy link
Copy Markdown
Member

Overall, I would say that the whole feature is still in the exploration phase and would need some research / brainstorming.

do you want the matrix at tutorial-suite level (not per-case)

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.

keep release as the source of truth there for now, and keep extra out of the default latest-components run (manual or less frequent) ??

Yes, I would keep this as-is for now, unless it makes sense to change it.

@MakisH MakisH changed the title Parallelize PR system tests via GitHub Actions matrix. Parallelize PR system tests via GitHub Actions matrix Jun 16, 2026
@MakisH MakisH self-assigned this Jul 3, 2026
Add prepare-matrix job that reads release from tests.yaml and runs
one GitHub Actions job per tutorial with per-case suite names.
@PranjalManhgaye
PranjalManhgaye force-pushed the issue-789-parallel-system-tests-matrix branch from 47e2084 to b04019a Compare August 29, 2026 08:44
@PranjalManhgaye PranjalManhgaye changed the title Parallelize PR system tests via GitHub Actions matrix Parallelize release system tests via per-tutorial matrix (#789) Aug 29, 2026
@MakisH MakisH changed the title Parallelize release system tests via per-tutorial matrix (#789) Parallelize release system tests via per-tutorial matrix Aug 29, 2026

@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.

@PranjalManhgaye could you please describe (in a comment or in the PR description) in more detail your current approach?

Testing in https://github.com/precice/tutorials/actions/runs/33246850254

Some first observations:

  • Each parallel step runs all the available case combinations of the release test suite.
  • Each run takes longer due to the setup and teardown. If we add more runners, the total time can be significantly reduced.
  • The build artifacts are small (but in total larger than in the case of the serial run, as we duplicate the tools/ and tests/).
  • The total job summary is getting a bit long due to duplicated information, but if we ran a test suite in serial, this information would be useful. GitHub already hides subsequent summaries by default and asks to explicitly load them.

Issues:

  • Every job appears on the side as run_system_tests, making it difficult to get an overview. Could we get the tutorial name there, instead?
  • It is not clear from the beginning how many jobs will be executed. The number of matrix entries grows continuously. Suggestions:
    • In the Parallel test matrix job summary, explain what happens next.
    • In the list of tests, add numbers, to get an idea of the progress of the run.
    • Why do we need to limit the concurrent jobs? In any case, they will be limited by the number of available runners.
  • All build artifacts have the same name. We should probably add the job id to the name.

Questions:

  • What happens if I run another test suite?
  • Can I still run the complete release test suite in serial?

I have not looked deeper; I will do that once the overview is clear.

To make this easier to merge, I would recommend making the parallel run optional, and keeping the serial by default.

Comment thread .github/workflows/system-tests-manual.yml Outdated
Comment thread .github/workflows/system-tests-nightly.yml Outdated
Comment thread .github/workflows/system-tests-release-matrix.yml Outdated
@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

Thanks @MakisH for running this on the VM.

  • Each matrix job runs only that tutorial’s release cases (comma-separated per-case suite names from tests.yaml), not the full 67-case release suite, for example aste-turbine runs 1 case, elastic-tube-1d runs 6.

  • Other suites: manual workflow with suites != release still goes through the single system-tests.yml job unchanged.

  • Serial release: currently nightly + manual release always use the matrix. I’ll add an option to keep serial as default and make parallel opt-in, as you suggested.

  • I’ll also address: $/ workflow syntax (#901), job/artifact naming, prepare-matrix summary, and rebase onto develop.

Serial release by default, optional parallel mode, job labels, and rebase on develop.
@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

I guess @MakisH we need to re-run to check serial as default and parallel as option.

@PranjalManhgaye
PranjalManhgaye requested a review from MakisH August 29, 2026 18:42
@MakisH

MakisH commented Aug 30, 2026

Copy link
Copy Markdown
Member

Test runs:

I will return to the individual points later. The job names and logs/archive names are already clearer.

@PranjalManhgaye

Copy link
Copy Markdown
Collaborator Author

@MakisH Thanks for testing,

  • Parallel checkbox only applies to exact release; quickstart staying serial is correct.
  • Extra grey run_system_tests jobs are skipped reusable-workflow placeholders in the UI, not duplicate runs.
  • Parallel run failures were artifact ETIMEDOUT, not test failures - we can re-run those jobs or disable _full uploads for matrix runs.

and yes ofc that strange thing in ui is coz of the manual workflow has 3 conditional jobs that all call the same reusable workflow - only the one that actually runs does real work ; I guess the possible fix could be : merge serial + custom into one job (2 jobs total) so fewer skipped branches appear in the sidebar, what do you think abt it ?

ready to tweak anything else when you revisit the remaining points.

@MakisH

MakisH commented Aug 30, 2026

Copy link
Copy Markdown
Member
* Parallel run failures were artifact `ETIMEDOUT`, not test failures - we can re-run those jobs or `disable _full uploads` for matrix runs.

Starting the failing jobs again, the issue does not seem to be persistent: https://github.com/precice/tutorials/actions/runs/33298363903 Still, one reason to keep the parallel matrix optional.

I am not sure if this or making a separate workflow would be the best option. I lean towards the separate workflow, but I need to have a closer look.

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