Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Member tests in parallel #19035

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AwesomePatrol
Copy link

@AwesomePatrol AwesomePatrol commented Dec 10, 2024

On my local machine it brings down execution time from 5 minutes to 32s.

I added a port allocator which allocates ports in 11000-19000 range.

Issue: #18983

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AwesomePatrol
Once this PR has been reviewed and has the lgtm label, please assign jmhbnz for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link

Hi @AwesomePatrol. Thanks for your PR.

I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@serathius
Copy link
Member

/ok-to-test

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.88%. Comparing base (fce823a) to head (cfc4e15).

Additional details and impacted files
Files with missing lines Coverage Δ
server/embed/config.go 79.49% <100.00%> (+0.06%) ⬆️

... and 21 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19035      +/-   ##
==========================================
+ Coverage   68.79%   68.88%   +0.09%     
==========================================
  Files         420      420              
  Lines       35640    35642       +2     
==========================================
+ Hits        24518    24552      +34     
+ Misses       9697     9664      -33     
- Partials     1425     1426       +1     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fce823a...cfc4e15. Read the comment docs.

@AwesomePatrol AwesomePatrol changed the title Run AddMember tests in parallel Run Member{Add,Remove} tests in parallel Dec 10, 2024
@AwesomePatrol AwesomePatrol marked this pull request as ready for review December 10, 2024 15:09
@AwesomePatrol

This comment was marked as outdated.

@AwesomePatrol

This comment was marked as outdated.

@AwesomePatrol AwesomePatrol force-pushed the speed-up-e2e-tests branch 2 times, most recently from 879c0f0 to 2febbd8 Compare December 12, 2024 09:58
@AwesomePatrol

This comment was marked as outdated.

@AwesomePatrol AwesomePatrol changed the title Run Member{Add,Remove} tests in parallel Run Member tests in parallel Dec 12, 2024
@mmorel-35
Copy link
Contributor

mmorel-35 commented Dec 15, 2024

In addition to this, have you considered using paralleltest ?

@AwesomePatrol
Copy link
Author

In addition to this, have you considered using paralleltest ?

Thanks for your suggestion. Running tests in parallel requires more changes than just adding t.Parallel() calls. I would prefer to keep it optional until it becomes that simple (requires refactoring a few more tests/frameworks).

@AwesomePatrol

This comment was marked as outdated.

Introduce port allocator and remove unused MemberNumber.
Add UniquePortAlloc config field so that default behavior will stay
unchanged.

On my local machine it brings down execution time from 5m to 32s.

Signed-off-by: Aleksander Mistewicz <[email protected]>
Otherwise `go test` would execute GOMAXPROCS parallel tests running
`--cpu` number of processes (1,2,4) which could starve cpu in some
cases.

Signed-off-by: Aleksander Mistewicz <[email protected]>
@AwesomePatrol
Copy link
Author

/retest

@k8s-ci-robot
Copy link

@AwesomePatrol: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-e2e-386 cfc4e15 link true /test pull-etcd-e2e-386

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

4 participants