adoroszlai opened a new pull request, #11839:
URL: https://github.com/apache/ozone/pull/11839

   ## What changes were proposed in this pull request?
   
   Ozone CI runs for 1-1.5 hours using multiple GitHub runners in parallel.  
Merging multiple commits within a short time and/or having multiple PR runs in 
parallel causes jobs to get queued.  This affects both Ozone and other Apache 
projects, who we share the GitHub runners with.
   
   Recently we have enabled Develocity build cache to save some time for Maven 
goals eligible for caching, which includes `surefire:test`.  Goal outputs are 
saved to the remote cache on completion.  Later runs with the same inputs can 
get results from the cache 
([example](https://develocity.apache.org/scans/performance?search.names=CI%20run%2CCI%20run%20attempt&search.values=40682650276%2C1)
 where most tests were avoided).  Note: inputs include dependencies, so changes 
touches core modules like `hdds-common` see little benefit.
   
   If a PR is merged while the previous run on `master` is still running 
`junit` and `integration` checks, it will find fewer or no cache entries, and 
thus need to run tests itself.  This eliminates the benefits of the cache for 
builds on `master`.
   
   Waiting for a completed run on `master` helps with caching, but:
   - committers may not be aware of that and merge too soon
   - there is a time-of-check vs. time-of-use (merge) problem (race condition 
between merges by individual committers)
   - it creates hard limit on number of commits that can be merged in 24h
   
   This PR proposes to drop the per-commit build on `master`, replace it with a 
periodic build every 4 hours.  This immediately reduces our CI runs, saving 
resources for PRs and other projects.  The workflow can also be triggered 
manually (for testing and as a safety net).
   
   To better utilize the cache for their fork and local builds, developers 
should base their dev branches on the latest commit with the green check, 
ignoring newer commits on `master` that have not yet been built.  This practice 
is beneficial regardless of the changes in this PR.
   
   https://issues.apache.org/jira/browse/HDDS-17537
   
   ## How was this patch tested?
   
   Tested in fork:
   - Pushed to `master`, no build triggered
   - Triggered 
[manually](https://github.com/adoroszlai/ozone/actions/runs/40826960476) (but 
then I cancelled)
   - Pushed to branch `HDDS-17537`, 
[build](https://github.com/adoroszlai/ozone/actions/runs/40827005325) triggered 
(but then I cancelled)
   
   Workflow checks:
   - asf-allowlist: https://github.com/adoroszlai/ozone/actions/runs/40826922819
   - zizmor: https://github.com/adoroszlai/ozone/actions/runs/40826922744
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to