Skip to content

Cleanup and align application.yml in generated applications#15574

Open
matrei wants to merge 18 commits into7.0.xfrom
align-cli-conf-output
Open

Cleanup and align application.yml in generated applications#15574
matrei wants to merge 18 commits into7.0.xfrom
align-cli-conf-output

Conversation

@matrei
Copy link
Copy Markdown
Contributor

@matrei matrei commented Apr 14, 2026

Many config values in generated application.yml files are redundant as they only restate the default values.
This is creating a lot of confusing boilerplate that's never changed, gets copied around, gets outdated and only leads to confusion.

I guess it has served as some form of documentation of the available configuration options, but I think we should move this to the Guide documentation as is already in the pipeline.

There are still some config values left in the application.yml files that actually do not match default values so these are left in the file for the time being.

matrei added 17 commits April 13, 2026 09:29
Java Management Extensions (JMX) is disabled by default
so there is no reason to have this config in generated
applications.
The same default values are already set in `HttpServletResponseExtension`
(`grails-mimetypes`).
Forge apps do not add this and it seems to work fine without it.
Align with Forge-created apps.
Default is already set in `DefaultUrlMappingsHolder`, but to 5000.
Default is already set to `UTF-8` in `ConvertersConfigurationInitializer`.
Default is already set to `html` in `OutputEncodingSettings`.
These are already defaults.
This updates the configuration in the functional test
apps to mirror the changes in generated config values.
@jdaugherty
Copy link
Copy Markdown
Contributor

I do not think we can simplify these changes in 7.x. 8.x yes, but only if we add the associated configuration defaults we've previously talked about.

@matrei
Copy link
Copy Markdown
Contributor Author

matrei commented Apr 14, 2026

I do not think we can simplify these changes in 7.x. 8.x yes, but only if we add the associated configuration defaults we've previously talked about.

@jdaugherty I have not touched any production code. This is purely generated files from the CLIs. The expected loaded configuration is the same (except for grails.urlmapping.cache.maxsize: 1000 which defaults to 5000 in code).

@jdaugherty
Copy link
Copy Markdown
Contributor

@matrei the generated code is production code; we've had bugs opened in the past b/c of this and suddenly removing that generated code without documenting the defaults is a major limitation.

@testlens-app

This comment has been minimized.

@matrei
Copy link
Copy Markdown
Contributor Author

matrei commented Apr 14, 2026

@matrei the generated code is production code; we've had bugs opened in the past b/c of this and suddenly removing that generated code without documenting the defaults is a major limitation.

This is not code, it's a configuration file. Bugs are ok, if there is one we will fix it.
We should absolutely document the available configuration options and their defaults.

This cleaned up version of the application.yml file is only generated for new Grails apps. No existing apps will be influenced by this change.

@jdaugherty
Copy link
Copy Markdown
Contributor

The problem is we don't have the documentation and if you're converting, the only way to previously get those values was to generate the apps. I agree we should clean up this up, but not until we have documentation to see what the defaults are.

Document the removal of redundant properties in generated
`application.yml` files.
@testlens-app
Copy link
Copy Markdown

testlens-app bot commented Apr 15, 2026

✅ All tests passed ✅

🏷️ Commit: fa1d357
▶️ Tests: 40164 executed
⚪️ Checks: 31/31 completed


Learn more about TestLens at testlens.app.

@matrei
Copy link
Copy Markdown
Contributor Author

matrei commented Apr 15, 2026

@jdaugherty I have added documentation to the upgrade guide. We also have pending #15426 which will add all configuration properties to the Guide documentation.

@jdaugherty
Copy link
Copy Markdown
Contributor

Related: #15426

@jdaugherty
Copy link
Copy Markdown
Contributor

Per discussion, I approved under the assumption we'll merge the related PR & we'll address this in a better way post 7.1.x (likely 8.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants