Repository navigation
Resolve configured messageSource basenames ahead of discovered bundles (#11795) - #14753
Merged
Merged
Conversation
Contributor
|
See #14755 |
This was referenced May 19, 2025
Merged
jamesfredley
pushed a commit
that referenced
this pull request
Aug 18, 2025
jamesfredley
added a commit
that referenced
this pull request
Aug 18, 2025
jamesfredley
marked this pull request as ready for review
August 18, 2025 22:13
Contributor
|
I would expect to see a failing test in |
borinquenkid
pushed a commit
that referenced
this pull request
Jul 17, 2026
borinquenkid
added a commit
that referenced
this pull request
Jul 17, 2026
…me ordering Directly exercises setBasenames()/afterPropertiesSet() on PluginAwareResourceBundleMessageSource (not just the inherited ReloadableResourceBundleMessageSource behavior the existing spec covered), closing the coverage gap noted on PR #14753. Verified this test fails against the pre-fix code with the exact regression reported in #11795 (plugin bundle wins over the explicitly configured one) and passes with the fix. Co-Authored-By: Claude Sonnet 5 <[email protected]>
borinquenkid
force-pushed
the
issue-11795
branch
from
July 17, 2026 21:13
abe53c9 to
6b06afb
Compare
Member
|
@jdaugherty I fixed it for him just take a quick look |
This comment has been minimized.
This comment has been minimized.
PluginAwareResourceBundleMessageSource.afterPropertiesSet() replaced the basenames configured on the bean with the bundles it discovered in grails-app/i18n, so the configured order was lost and a configured bundle outside that directory was never resolved. Keep the configured basenames first, in the order given, and append the discovered ones that were not already listed. Fixes #11795 Co-authored-by: Walter Duque de Estrada <[email protected]>
jdaugherty
force-pushed
the
issue-11795
branch
from
September 30, 2026 17:09
c4a3762 to
c550059
Compare
Contributor
Author
|
Fixes #11795 |
antobinary
added a commit
to antobinary/bigbluebutton
that referenced
this pull request
Oct 5, 2026
Apache Grails tagged 8.0.0 on 2026-10-04 and opened its release vote the same day. Until the vote closes the artifacts are in the ASF staging group only, so the TEMP staging-repository entries in build.gradle stay and their comments are retargeted at 8.0.0; they come out once 8.0.0 is on Maven Central. Against RC2 the 8.0.0 BOM changes two things: asset-pipeline goes from 5.2.0-RC3 to 5.2.0 and SiteMesh from 3.3.0-RC3 to 3.3.0. Spring Boot (4.1.1), Groovy (5.1.3) and the Gradle version Grails builds with (9.8.0) are unchanged, so gradle.properties only moves grailsVersion and the cloud.wondrify asset-pipeline plugin follows the BOM to 5.2.0. The Tomcat 11.0.26 override stays: there is still no Spring Boot 4.1 release newer than 4.1.1. .gitlab-ci.yml moves to bbb-build:grails-8--2026-10-04-230216, which has the same toolchain as the previous grails-8 image (JDK 21.0.12.1, Go 1.27.0, Node 22.23.2) with the Grails 8.0.0 CLI. Checked, nothing to do for what went into 8.0.0 after RC2: the default dataSource bean (apache/grails-core#16458) is registered only with GORM for Hibernate, which bbb-web does not ship; the XML-safe GSP html codec default (apache/grails-core#16460) is what bbb-web already configures explicitly, and it has no GSPs; the messageSource basename ordering (apache/grails-core#14753) has nothing to act on, bbb-web looks up no messages through it. Verified with a package build in the new image, installed on a 4.0 dev container: the WAR has the same 248 jars as the RC2 build, with the 44 grails-* jars at 8.0.0 and Spring Boot 4.1.1, Tomcat 11.0.26 and Groovy 5.1.3 unchanged. bbb-web started in 7.4 s with a clean log (no ERROR, only the logback layout/encoder WARNs the stock build prints too) and /bigbluebutton/api returned SUCCESS. A 5.3 MB PDF uploaded through the client became the current presentation (bbb-web counted 117 pages), and a join inside a cross-origin iframe still rendered the client. The api + presentation Playwright suites gave 32 passed, 7 failed and 3 skipped on the 8.0.0 build, the same counts as the stock Grails 7.0.12 build on the same container, and the per-test results were identical: no test differed, the same 7 tests fail on both builds.
Merged
26 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11795
PluginAwareResourceBundleMessageSource.afterPropertiesSet()ended by callingsetBasenames(...)with the bundles it discovered ingrails-app/i18n, which replaces the array outright. Anybasenamesa user configured on the bean were therefore discarded and replaced by the discovery order: a rawFile.listFiles()ofgrails-app/i18nin development, jar entry order in production. Neither order can be controlled, so a bundle meant to override keys frommessagescould not be made to win, and a listed bundle outsidegrails-app/i18nwas not resolved at all. This has been the behaviour since the discovery code was added in 2014.The fix keeps the configured basenames first, in the order given, and appends the discovered basenames that were not already listed. Nothing changes for applications that do not configure basenames.
Tests:
PluginAwareResourceBundleMessageSourceSpec(grails-core) drivessetBasenames+afterPropertiesSetand fails 2 of 5 features without the fix.ConfiguredBasenamesSpecingrails-test-examples/app1reproduces the report in a real application:resources.groovynow defines themessageSourcebean withbasenames = ['overrides', 'i18n-extra/external', 'messages']. Without the fix the bean ends up withbasenames=[messages,overrides]and both the override and the external bundle assertions fail.Docs: added a paragraph to the message-bundles section describing the precedence of configured basenames over discovered bundles.
Note: this only applies to 7.0.x. On 8.x Spring Boot owns the
messageSourcebean andI18nEnvironmentPostProcessoralready ranks the application's declaredspring.messages.basenamefirst;PluginAwareResourceBundleMessageSourceno longer exists there.