You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@grails.apache.org by "borinquenkid (via GitHub)" <gi...@apache.org> on 2026/08/29 16:34:06 UTC

[PR] Register a late ConfigurationClassPostProcessor for resources.groovy/xml [grails-core]

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

   ## Summary
   - Fixes #16029: `@Configuration` classes registered in an application's `resources.groovy` (and `resources.xml`, and the application's own `doWithSpring`/`beanRegistrar()`) were no longer processed by a `ConfigurationClassPostProcessor` in 8.0.0-M3.
   - Root cause: `GrailsApplicationPostProcessor` (which drains those late-arriving beans) is discovered as an ordinary registry bean, so Spring always invokes it *after* its own `ConfigurationClassPostProcessor` has already completed its one and only pass over the registry. `CoreGrailsPlugin` used to unconditionally register a second processor that happened to catch this late content, but a later change made it stand down whenever Spring's own processor is already present — correct for the early plugin-registration phase, but wrong for this late phase, since Spring's processor has always already run there.
   - Fix registers a second `ConfigurationClassPostProcessor` at the end of `GrailsApplicationPostProcessor.postProcessBeanDefinitionRegistry`, after all late-phase beans are drained. Spring marks every bean definition a processor has already parsed, so this second pass only expands what's genuinely new; it's skipped under AOT, matching `CoreGrailsPlugin`'s existing guard.
   
   ## Test plan
   - [x] Added `LateConfigurationClassPostProcessorSpec`, which reproduces the exact bug shape and was confirmed to fail without the fix and pass with it.
   - [x] Full `grails-core` test suite green (1102 suites, 0 failures/errors).
   - [x] `./gradlew :grails-core:codeStyle` clean.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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] Register a late ConfigurationClassPostProcessor for resources.groovy/xml [grails-core]

Posted by "borinquenkid (via GitHub)" <gi...@apache.org>.
borinquenkid closed pull request #16269: Register a late ConfigurationClassPostProcessor for resources.groovy/xml
URL: https://github.com/apache/grails-core/pull/16269


-- 
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] Register a late ConfigurationClassPostProcessor for resources.groovy/xml [grails-core]

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

   I don't think we should fix this. Resources.groovy was never meant to be anything other than beans and longer term we want to remove it.


-- 
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] Register a late ConfigurationClassPostProcessor for resources.groovy/xml [grails-core]

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

   ## [Codecov](https://app.codecov.io/gh/apache/grails-core/pull/16269?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `60.00000%` with `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 54.7109%. Comparing base ([`59046dd`](https://app.codecov.io/gh/apache/grails-core/commit/59046ddcc34d25a4d9f432f3bad93402f84e3d2e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`22fa457`](https://app.codecov.io/gh/apache/grails-core/commit/22fa457ea922d75948e07e4aa0ba470cdc947a95?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/grails-core/pull/16269?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [.../boot/config/GrailsApplicationPostProcessor.groovy](https://app.codecov.io/gh/apache/grails-core/pull/16269?src=pr&el=tree&filepath=grails-core%2Fsrc%2Fmain%2Fgroovy%2Fgrails%2Fboot%2Fconfig%2FGrailsApplicationPostProcessor.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JhaWxzLWNvcmUvc3JjL21haW4vZ3Jvb3Z5L2dyYWlscy9ib290L2NvbmZpZy9HcmFpbHNBcHBsaWNhdGlvblBvc3RQcm9jZXNzb3IuZ3Jvb3Z5) | 60.0000% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/grails-core/pull/16269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/grails-core/pull/16269/graphs/tree.svg?width=650&height=150&src=pr&token=qJrryhpk7u&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/grails-core/pull/16269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##                8.0.x     #16269        +/-   ##
   ==================================================
   - Coverage     54.7156%   54.7109%   -0.0047%     
     Complexity      20402      20402                
   ==================================================
     Files            2098       2098                
     Lines          100931     100936         +5     
     Branches        17900      17900                
   ==================================================
   - Hits            55225      55223         -2     
   - Misses          37842      37849         +7     
     Partials         7864       7864                
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/grails-core/pull/16269?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [.../boot/config/GrailsApplicationPostProcessor.groovy](https://app.codecov.io/gh/apache/grails-core/pull/16269?src=pr&el=tree&filepath=grails-core%2Fsrc%2Fmain%2Fgroovy%2Fgrails%2Fboot%2Fconfig%2FGrailsApplicationPostProcessor.groovy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JhaWxzLWNvcmUvc3JjL21haW4vZ3Jvb3Z5L2dyYWlscy9ib290L2NvbmZpZy9HcmFpbHNBcHBsaWNhdGlvblBvc3RQcm9jZXNzb3IuZ3Jvb3Z5) | `72.8324% <60.0000%> (-0.3819%)` | :arrow_down: |
   
   ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/apache/grails-core/pull/16269/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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] Register a late ConfigurationClassPostProcessor for resources.groovy/xml [grails-core]

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

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 22fa457ea922d75948e07e4aa0ba470cdc947a95
   ▶️ Tests:  68842 executed
   ⚪️ Checks: 83/83 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