Repository navigation
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 |
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. |
Add prepare-matrix job that reads release from tests.yaml and runs one GitHub Actions job per tutorial with per-case suite names.
47e2084 to
b04019a
Compare
|
@MakisH Thanks for testing,
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. |
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. |
|
I added a second runner for testing, in the same VM, which now has 16 cores instead of 4 (same CPU). Results:
In the parallel run, the following tests fail:
seemingly unrelated:
In the serial run, the following tests run but fail comparisons:
No clear speedup conclusion can be drawn at this point, as some cases did not run in the parallel case, but the speedup is definitely below 33%. I suspect that some cases run matrix operations on all available cores, and having other active processes in the same VM slows that down. If that theory holds, then adding more runners would slow that down even further. Having both runners in the same VM seems to be beneficial for reusing the same build cache, but not necessarily for running. I need to try with a separate VM as well. Further observations:
Suggestions:
|
|
@MakisH Thanks for the two-runner testing and for fixing the comparison failures in #935. Next steps:
Question: Do you prefer this unified workflow approach, or a separate workflow for parallel runs? I’ll follow whichever you think is easier to maintain. |
|
@PranjalManhgaye more results need updating; doing that right now, I will write again here once ready. Regarding the network prune, this already affects unrelated jobs running on the same machine. I can fix it in another PR (unless you prefer to do that). I think the cleanest solution is to move the |
|
Triggered a new test in parallel: https://github.com/precice/tutorials/actions/runs/36749249241 I expect everything to work, besides the |
|
@PranjalManhgaye all tests pass now, so this is ready for the discussed refactoring. In principle, the |
- Move prepare-matrix into manual and nightly workflows - Drop system-tests-release-matrix.yml - Use one matrix path: serial = 1 job, parallel = per-tutorial - Generalize prepare_matrix.py for any suite selection - Add unit tests for matrix generation
Matrix generation is covered by manual workflow runs on the VM.
|
@MakisH Refactored :
you can re-run manual release (serial + parallel) on the VM whenever you want to check CI. |
MakisH
left a comment
There was a problem hiding this comment.
Thanks for the quick updates, @PranjalManhgaye. It looks much better now, and it seems to work as expected, also with an arbitrary list of cases. Even when asking for one specific case (e.g., channel-transport_fluid-openfoam_transport-openfoam), it splits per tutorial (channel-transport), but only runs the specific case. Nice!
I think that the parallel_matrix.py can be simplified and documented a bit more and then integrated directly into prepare_matrix.py. It should be rather easy; please let me know if some suggestions do not make sense.
Combine parallel_matrix.py into prepare_matrix.py with clearer docs, unified suite lookup, and simplified step summary wording.
Let me know if you'd like the external lookup handled differently in |
Clarify that the script only previews the GitHub Actions matrix and does not run tests, with serial/parallel modes and format options.
Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
There was a problem hiding this comment.
I think this looks good now. Thank you for all the iterations and for sticking that far, @PranjalManhgaye!
I have also tested this with various edge cases, and I think it is now good to go. Eventually, this could become the default, if more (isolated) runners are available, or after we solve some related issues (e.g., #936).
In the meantime, I would like to have this available to make measurements and evaluate whether splitting per tutorial is an approach that actually helps in practice (both in runtime and in fine-grained rerunning of failed cases).
Summary
Parallelize system tests via a per-tutorial GitHub Actions matrix derived from
tests.yaml.Approach: A
prepare-matrixjob readsrelease, groups cases by tutorial, and emits one job per tutorial with comma-separated per-case suite names (not bare tutorial suite names, so cases outsidereleaseare not pulled in).Example:
aste-turbine=> 1 case,elastic-tube-1d=> 6 cases. All 40 jobs together cover fullrelease(67 cases), no duplicates.Manual workflow:
release=> serial by default (single job)release+parallel: true=> per-tutorial matrix (~40 jobs)suites=> single job (unchanged)Nightly: still runs
releaseas one serial job (unchanged).Closes #789. Replaces the earlier shard-based approach in this PR.
Test plan
prepare-matrixjob onubuntu-latestreleaseserial (default)releasewithparallel: trueon self-hosted VM (#33298363903)