-
Notifications
You must be signed in to change notification settings - Fork 10.2k
tests: add minimal E2E test configuration for faster CI runs #20733
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
Conversation
|
Hi @yagikota. 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 Once the patch is verified, the new status will be reflected by the 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. |
|
/assign |
|
Would you review this PR? |
|
/ok-to-test |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 27 files with indirect coverage changes @@ Coverage Diff @@
## main #20733 +/- ##
==========================================
+ Coverage 69.16% 69.26% +0.10%
==========================================
Files 420 422 +2
Lines 34817 34817
==========================================
+ Hits 24081 24116 +35
+ Misses 9338 9310 -28
+ Partials 1398 1391 -7 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/retest |
|
Do we need to reduce more time? According to #18983, the target duration is 30 minutes |
|
Please try the following case, |
|
/retest |
bee786c to
9938a64
Compare
minimalTestCases := []testCase{
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
},
{
name: "PeerTLS and ClientTLS",
config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS, ClientTLS: config.ManualTLS},
},
}https://prow.k8s.io/job-history/gs/kubernetes-ci-logs/pr-logs/directory/pull-etcd-e2e-amd64 --> saved around 14 minutes:
-> Combining PeerTLS and ClientTLS is effective in saving runtime Duration of each test: https://docs.google.com/spreadsheets/d/1kaHBg0OOBeQ51oX_kdto8b26_42xDGJi5xbJlwbNCLY/edit?gid=0#gid=0 |
minimalTestCases := []testCase{
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
}
}https://prow.k8s.io/job-history/gs/kubernetes-ci-logs/pr-logs/directory/pull-etcd-e2e-amd64 --> saved around 17 minutes: before: around 57 minutes Even if we test only NoTLS with 1 etcd member, it takes 40 minutes. Duration of each test: https://docs.google.com/spreadsheets/d/1kaHBg0OOBeQ51oX_kdto8b26_42xDGJi5xbJlwbNCLY/edit?gid=46431453#gid=46431453 |
b78e1bf to
02410fe
Compare
|
Currently, most of the e2e tests have not yet been migrated to the common testing framework, so even though we use |
Based on comment above #20733 (comment), where there were 3 cases in Now there were only 2 cases in |
Yes. Here is the number of tests of w/o minimalTestCases
Duration: 57 minutes w/ minimalTestCasesoption1 minimalTestCases := []testCase{
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
},
{
name: "PeerTLS",
config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS},
},
{
name: "ClientTLS",
config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.ManualTLS},
},
}
Duration: 46 minutes option2 minimalTestCases := []testCase{
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
},
{
name: "PeerTLS and ClientTLS",
config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS, ClientTLS: config.ManualTLS},
},
}
Duration: 43 minutes ref. https://docs.google.com/spreadsheets/d/1kaHBg0OOBeQ51oX_kdto8b26_42xDGJi5xbJlwbNCLY/edit?gid=0#gid=0 option3 minimalTestCases := []testCase{
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
}
}
Duration: 40 minutes |
|
If we choose option 2, we can reduce the number of common tests by nearly half, which will reduce the CI runtime by 14 minutes. As I mentioned in #20733 (comment), it will not be effective for What do you think? |
|
Thanks for the statistic data. I think we can apply for option 2 for now. We are open to any further enhancement in future if any. |
|
Can we combine PeerAutoTLS and ClientAutoTLS like this?: - {
- name: "PeerAutoTLS",
- config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.AutoTLS},
- },
- {
- name: "ClientAutoTLS",
- config: config.ClusterConfig{ClusterSize: 1, ClientTLS: config.AutoTLS},
- },
+ {
+ name: "PeerAutoTLS and ClientAutoTLS",
+ config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.AutoTLS, ClientTLS: config.AutoTLS},
+} |
I was proposing to add But combining them works for me. The same to |
|
Let me clarify my idea. |
|
pls squash the commits. |
|
Hmm, probably this cannot cover all combinations 🤔 In my understanding, there are 3x3=9 combinations in terms of TLS:
// cover (1)
{
name: "NoTLS",
config: config.ClusterConfig{ClusterSize: 1},
},
// cover (5)
{
name: "PeerTLS and ClientTLS",
config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.ManualTLS, ClientTLS: config.ManualTLS},
},
// cover (9)
{
name: "PeerAutoTLS and ClientAutoTLS",
config: config.ClusterConfig{ClusterSize: 3, PeerTLS: config.AutoTLS, ClientTLS: config.AutoTLS},
},I think these three combinations are good starting points, but we need to cover the rest of the combinations as well. |
Signed-off-by: Kota <[email protected]>
Signed-off-by: Kota <[email protected]>
f982814 to
df78447
Compare
|
/test pull-etcd-e2e-386 |
ahrtr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks
Next step is to update the workflow to use the env variable.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, serathius, yagikota The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
|
Signed-off-by: Kota <[email protected]>
|
/test pull-etcd-coverage-report |
|
/retest |
|
@yagikota: The following test failed, say
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. |
|
Is it no problem to ignore pull-etcd-coverage-report fail? |
@yagikota, do you want to help with this, too? |
|
@ivanvc |
It isn't caused by this PR. But I agree that it's annoying to frequently see the failure. It'd great if anyone can take a look. thx |



What
E2E_TEST_MINIMALenvironment variable to enable a reduced e2e test matrix for faster CI runtimesWhy
To allow us to minimize the E2E test matrix in some cases(e.g., presumits)
Context: #18983
Next Step
Update https://github.com/kubernetes/test-infra/blob/master/config/jobs/etcd/etcd-presubmits.yaml by adding
E2E_TEST_MINIMAL=trueReview points
minimal test candidates
Do these candidates make sense?
Minimize test cases globally or per E2E test?
This PR introduces
E2E_TEST_MINIMALenvironment variable, which is supposed to be passed when running E2E tests in test-infra jobs.For example:
TIMEOUT=60m VERBOSE=1 GOOS=linux GOARCH=amd64 CPU=4 EXPECT_DEBUG=true E2E_TEST_MINIMAL=true make test-e2e-releaseThis will affect all E2E tests inside
tests/common/. (globally)If we want flexible control over whether or not to minimize test cases depending on the E2E test, we need to consider an alternative approach instead of using an environment variable. (per E2E test)