Skip to content

feat: add concurrency.group to serialize tests within a group#2723

Open
Ayush-Patel-56 wants to merge 3 commits into
kyverno:mainfrom
Ayush-Patel-56:main
Open

feat: add concurrency.group to serialize tests within a group#2723
Ayush-Patel-56 wants to merge 3 commits into
kyverno:mainfrom
Ayush-Patel-56:main

Conversation

@Ayush-Patel-56

Copy link
Copy Markdown
Contributor

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.group field 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 concurrency block to the test spec with a group string 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: bool field is unchanged.

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.

Further Comments

Kept the implementation minimal per the maintainer's feedback, just group for now, with room to extend the concurrency block later.

Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
@Ayush-Patel-56 Ayush-Patel-56 requested a review from a team as a code owner May 13, 2026 12:14
@codecov

codecov Bot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.77%. Comparing base (f5eeac7) to head (0a65578).
⚠️ Report is 13 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
Signed-off-by: Ayush Patel <ayushpatel2731@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Concurrent groups

1 participant