-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Simplify running tests #21095
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
Simplify running tests #21095
Conversation
90cc2a3 to
98f6a2f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 20 files with indirect coverage changes @@ Coverage Diff @@
## main #21095 +/- ##
==========================================
- Coverage 68.48% 68.37% -0.11%
==========================================
Files 429 429
Lines 35281 35244 -37
==========================================
- Hits 24162 24098 -64
- Misses 9717 9748 +31
+ Partials 1402 1398 -4 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
|
||
| local failures=() | ||
| # execution of tests against packages: | ||
| for pkg in "${packages[@]}"; do |
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.
Not sure why remove this for loop? Previously it may run test against a list of package, now you remove it? If you remove the for loop, do we still need to the variable packages (see line 389 or 385),
Line 389 in 30f9ac5
| local packages=() |
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.
I see the explanation Removes iteration over packages; with the Go workspace, we don't need to iterate.. If it's correct behaviour, the variable packages mentioned above should be removed as well.
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.
Good catch. I initially had more changes in this pull request and decided to keep only the one to remove the for loop (ref: https://github.com/etcd-io/etcd/pull/21073/files), but I forgot to apply them. Updating.
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.
Re: removing the for loop, I probably didn't give enough context. But with #21033, it made me realize that we never actually use the test mode where we expand the passed packages (Robustness tests were the only ones using this behavior), and again, with the Go workspace, if we don't need to expand them, there's no benefit to iterating over the packages; it only complicates the code.
* Remove iteration over packages; with the Go workspace, we don't need to iterate. * Replace `KEEP_GOING_TESTS` behavior by using the Go `-failfast` test flag. Signed-off-by: Ivan Valdes <ivan@vald.es>
98f6a2f to
64f366f
Compare
|
@ivanvc: 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. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ivanvc, serathius The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
After working on the issues from #21033 (and because I initially translated the old function in #20872), I realized we can simplify test execution: in the Go workspace, we don't need to iterate over packages.
So, this pull request:
KEEP_GOING_TESTSbehavior by using the Go-failfasttest flag.Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.