You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "jdaugherty (via GitHub)" <gi...@apache.org> on 2026/10/20 21:35:45 UTC

[PR] Read the generated build's stderr in the Forge command specs [grails-core]

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

   `CreateControllerCommandSpec > test app with controller` failed on the "Build Grails Forge (17)" job of #16690 ([run 39468211729](https://github.com/apache/grails-core/actions/runs/39468211729/job/118785082091)) with
   
   > Timed out after 600s waiting for the generated build to produce [BUILD SUCCESSFUL]; the build was still running.
   
   and only the daemon-fork preamble as build output. The generated build had in fact already finished: the `gradle/actions: Writing build results` line in that output is printed when the build's services close, and no task header was ever printed, so the build failed while configuring. Gradle writes the failure report to stderr, which `CommandSpec` never read (`consumeProcessOutputStream` drains stdout only). Once a `-S` report outgrows the 64 KiB pipe buffer, the Gradle client blocks on the write and never exits, and the harness, which keys its early exit on process liveness, waits out its whole budget. The sibling specs ran the same generated build in 35-47 s right after.
   
   Reproduced locally with Gradle 8.14.6: a configuration failure whose report is 161 KB exits in 3 s with stderr drained, and is still running after 120 s with stderr unread, with exactly the two preamble lines on stdout.
   
   This merges stderr into the stream the consumer thread drains, so a failed build exits at once and its failure report is part of the assertion message. `CommandSpecBuildFailureSpec` covers it with a generated project whose build fails while configuring with a report larger than the pipe buffer: against the old harness it times out after 600 s exactly as CI did; with the change it passes in 5 s.
   
   The `test-core` copy of `CommandSpec` runs its builds through Gradle TestKit, whose `BuildResult.getOutput()` carries both streams, so it is unaffected.
   
   The trigger of the configuration failure in that run is unrecoverable from its logs. If it recurs, the assertion message will now carry the Gradle failure report.
   
   Verified locally: `:grails-forge-cli:test --tests org.grails.forge.cli.CommandSpecBuildFailureSpec` and `:grails-forge-cli:codeStyle`. The full generated-build specs are left to CI.
   
   Targets 7.0.x, to be merged up.
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Read the generated build's stderr in the Forge command specs [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty merged PR #16697:
URL: https://github.com/apache/grails-core/pull/16697


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Read the generated build's stderr in the Forge command specs [grails-core]

Posted by "jdaugherty (via GitHub)" <gi...@apache.org>.
jdaugherty commented on PR #16697:
URL: https://github.com/apache/grails-core/pull/16697#issuecomment-6302070004

   @matrei this will help identify when forge tests fail 


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Read the generated build's stderr in the Forge command specs [grails-core]

Posted by "testlens-app[bot] (via GitHub)" <gi...@apache.org>.
testlens-app[bot] commented on PR #16697:
URL: https://github.com/apache/grails-core/pull/16697#issuecomment-6305464000

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 2ecd9284bb42652f4cb51310e8926e09484a6ec9
   ▶️ Tests:  48953 executed
   ⚪️ Checks: 54/54 completed
   
   ---
   _Learn more about TestLens at [testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   


-- 
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: notifications-unsubscribe@grails.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org