-
Notifications
You must be signed in to change notification settings - Fork 641
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
[ISSUE #1054] Build caching optimizations #4689
[ISSUE #1054] Build caching optimizations #4689
Conversation
spotlessApply was reformatting files on every build causing cache misses.
… caused cache miss
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.
Welcome to the Apache EventMesh community!!
This is your first PR in our project. We're very excited to have you onboard contributing. Your contributions are greatly appreciated!
Please make sure that the changes are covered by tests.
We will be here shortly.
Let us know if you need any help!
Want to get closer to the community?
WeChat Assistant | WeChat Public Account | Slack |
---|---|---|
![]() |
![]() |
Join Slack Chat |
Mailing Lists:
Name | Description | Subscribe | Unsubscribe | Archive |
---|---|---|---|---|
Users | User support and questions mailing list | Subscribe | Unsubscribe | Mail Archives |
Development | Development related discussions | Subscribe | Unsubscribe | Mail Archives |
Commits | All commits to repositories | Subscribe | Unsubscribe | Mail Archives |
Issues | Issues or PRs comments and reviews | Subscribe | Unsubscribe | Mail Archives |
Besides, please link this PR to a corresponding issue~ |
@yanrongzhen Could you please help review the impact of the modification of this PR on the use of Spotless? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4689 +/- ##
=========================================
Coverage 17.39% 17.39%
Complexity 1759 1759
=========================================
Files 797 797
Lines 29850 29850
Branches 2579 2579
=========================================
Hits 5192 5192
Misses 24177 24177
Partials 481 481 ☔ View full report in Codecov by Sentry. |
@samotleriche It would be great to associate this PR with the issue #1054 you have found. |
@Pil0tXia the issue has been linked to the PR 🙂 Regarding your two questions:
|
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.
able to pull the results of the test task from cache
So, when a class with unit test is modified, the unit test for that class will be automatically executed again, right?
The default value of
removeUnusedEntriesAfterDays
is 7
I'm referring to that parameter as well. Since it has a default value, there's no need to set it separately.
Yes, thats correct. Any test tasks that have that class as an input will be re-executed. |
@samotleriche I think maybe we shouldn't change the behavior of modifying source code through spotless during build. |
Hi @yanrongzhen. Jumping in for @samotleriche here - we definitely understand if you don't want to change the current behavior of executing To quantify the impact of continuing to run |
The changes made after running spotlessJava are not committed to the master branch; instead, they are discarded. We can run spotlessJava separately before each release and commit the formatted changes. |
Hi! The WatchFileManagerTest unit test failed. May you please help have a check? #4711 |
Hey @Pil0tXia, I'll take a look |
Hi, there is a CI failure issue likely caused by enabling Gradle build caching. #4737 May you please help have a check? |
Fixes #1054.
Motivation
The motivation of this PR is to improve the build time by resolving caching issues.
Modifications
These changes improved the build time for back-to-back builds with no changes from ~4 minutes 30 seconds down to ~15 seconds.
build scan before modifications: https://ge.solutions-team.gradle.com/s/wl6q5fikzjhnq#performance
build scan after modifications: https://ge.solutions-team.gradle.com/s/cssmzbjx5v7js#performance
Documentation