-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
tools/check: adpot staged build to make ut a little bit faster #51374
Conversation
Hi @tiancaiamao. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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/test-infra repository. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51374 +/- ##
================================================
+ Coverage 70.6793% 72.8191% +2.1398%
================================================
Files 1460 1462 +2
Lines 434615 440564 +5949
================================================
+ Hits 307183 320815 +13632
+ Misses 108242 99654 -8588
- Partials 19190 20095 +905
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, hawkingrei 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 |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #31880 #30822
Problem Summary:
Maybe we can 'make ut X=build' a little bit faster!
After vs Before:
What changed and how does it work?
Behind the scene, it's a technique called 'staged build'.
If we build all the test binaries parallelly, the go compiler will detect that much of the pacakge cache are not available, so it would build package cache several times. For example, building
pkg/executor
andpkg/session
parallelly, they all depends on a lot of other small packages, since those packages do not exist at the time. The package is built repeatedly because of the parallel.If we build all the packages first to make the cache available, and then built the test binaries, we can avoid repeated package building. This make the whole process a little bit faster.
See also
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.