feat: add concurrency.group to serialize tests within a group#2723
Open
Ayush-Patel-56 wants to merge 3 commits into
Open
feat: add concurrency.group to serialize tests within a group#2723Ayush-Patel-56 wants to merge 3 commits into
Ayush-Patel-56 wants to merge 3 commits into
Conversation
Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2723 +/- ##
==========================================
+ Coverage 67.70% 67.77% +0.06%
==========================================
Files 149 149
Lines 5757 5769 +12
==========================================
+ Hits 3898 3910 +12
Misses 1599 1599
Partials 260 260 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Tests that share resource names or conflict with each other currently require disabling concurrency entirely, which slows down the whole suite. This PR adds a
concurrency.groupfield so conflicting tests can be grouped together, tests in the same group serialize, everything else still runs in parallel.Related issue
Fixes #2674
cc @eddycharly
Proposed Changes
Added a
concurrencyblock to the test spec with agroupstring field. The runner builds a per-group mutex before scheduling tests, tests in the same group acquire the mutex before running and release it after, so they never overlap. Tests without a group are unaffected.
yaml spec: concurrency: group: my-group steps: [...] The existing
concurrent: boolfield is unchanged.Checklist
Further Comments
Kept the implementation minimal per the maintainer's feedback, just
groupfor now, with room to extend theconcurrencyblock later.