matrei opened a new pull request, #16374:
URL: https://github.com/apache/grails-core/pull/16374

   ## Summary
   
   The `Build Grails-Core (macOS JDK 21)` job regularly fails with 
`java.lang.OutOfMemoryError: Java heap space` in `:grails-doc:publishGuide`, 
e.g. [this run on 
#16370](https://github.com/apache/grails-core/actions/runs/35699183035/job/106652874239?pr=16370).
 This PR stops the macOS job from building documentation at all: `groovydoc` is 
dropped from its task list and `:grails-doc:docs` is excluded, which removes 
`aggregateGroovydoc`, `publishGuide`, `createReleaseDropdown` and the 
`:grails-data-docs-stage:*` doc tasks from its task graph. The Ubuntu JDK 21/25 
and Windows shard 0 jobs are unchanged and still build the full documentation.
   
   ## Why
   
   `macos-latest` currently resolves to `macos-26-arm64`, GitHub's standard 
Apple-silicon runner: **3 vCPU and 7 GB RAM** (Ubuntu and Windows runners have 
4 vCPU and 16 GB). `org.gradle.jvmargs` asks for a 5 GB daemon, and the whole 
documentation chain runs inside that daemon: `build` → `:grails-doc:assemble` → 
`dist` → `docs` → `aggregateGroovydoc` + `publishGuide`. After 
`aggregateGroovydoc` has run for about two hours, `publishGuide` starts in the 
same daemon and tips it over the heap limit. Removing only the `groovydoc` task 
from the task list would not help; the `-x :grails-doc:docs` exclusion is what 
removes the failing chain.
   
   ## How often this happens
   
   Looking at the last 150 CI runs (which only reach back to 14 Sep 2026), the 
macOS job completed 70 times:
   
   | Outcome | Count |
   |---|---|
   | success | 48 |
   | failure | 22 |
   
   Of the 22 failures, **19 are this heap OOM in the doc chain** (18 in 
`publishGuide`, 1 in `aggregateGroovydoc`). The remaining 3 are unrelated (two 
Develocity cache-store errors, one `:grails-gsp:test` failure on a 9.0.x 
branch). That is roughly one in four macOS runs, at least two per day, and it 
hits the `8.0.x` branch build itself (failed this way on 14, 16, 21 and 22 
Sep), not just PR branches.
   
   The same branches pass and fail on different days, so this is not a 
regression on any particular branch; the daemon is simply running at the edge 
of its heap when `publishGuide` starts.
   
   Even the successful macOS jobs take 2–5.5 hours (median about 3 hours) 
against roughly 75 minutes for the same task list on Ubuntu JDK 21, which is 
consistent with a 5 GB heap plus test forks swapping on a 7 GB machine. 
Skipping the doc chain should also shorten the macOS job considerably.
   
   ## Verification
   
   `./gradlew :grails-doc:build :grails-shell-cli:installDist -x 
:grails-doc:docs --dry-run` no longer lists `aggregateGroovydoc`, 
`publishGuide`, `createReleaseDropdown` or any `:grails-data-docs-stage:*` 
task, while `:grails-doc:build` itself still resolves.
   


-- 
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]

Reply via email to