Skip to content

feat: hybrid ConfigReportCommand with static metadata and runtime values#15426

Open
jamesfredley wants to merge 7 commits into7.0.xfrom
docs/configuration-hybrid
Open

feat: hybrid ConfigReportCommand with static metadata and runtime values#15426
jamesfredley wants to merge 7 commits into7.0.xfrom
docs/configuration-hybrid

Conversation

@jamesfredley
Copy link
Contributor

Summary

Combines the curated property metadata from #15407 with the runtime environment collection from the configuration-command branch into a single hybrid ConfigReportCommand.

What it does

  • Loads property metadata from config-properties.yml (descriptions, defaults for ~160 known Grails properties across 21 categories)
  • Collects runtime property values from the Spring ConfigurableEnvironment
  • Outputs a 3-column AsciiDoc table (Property | Description | Default) organized by functional category
  • Runtime values override static defaults when the property is set in the running application
  • Properties not found in the metadata appear in a separate "Other Properties" section

Changes

  • ConfigReportCommand.groovy - Modified to load YAML metadata and merge with runtime values
  • config-properties.yml - New metadata file with ~160 properties across 21 categories (Core, Web & Controllers, CORS, Views & GSP, GORM, DataSource, Spring Security, MongoDB, etc.)
  • ConfigReportCommandSpec.groovy - Updated unit tests for 3-column hybrid format
  • ConfigReportCommandIntegrationSpec.groovy - Updated integration tests for category-based layout

Based on

Test results

  • Unit tests: 16/16 passed
  • Integration tests: 8/8 passed

jamesfredley and others added 3 commits February 20, 2026 18:32
Add a comprehensive Application Properties reference page under
ref/Configuration/ listing all Grails-specific configuration keys
with descriptions and default values. Covers core framework, GORM,
DataSource, Hibernate, Database Migration Plugin, Cache Plugin,
Asset Pipeline Plugin, Spring Security Plugin, and MongoDB GORM Plugin.

All external links use doc variables ({springBootVersion},
{hibernate5Reference}) for version-safe URLs.

Assisted-by: OpenCode <opencode@opencode.ai>
Assisted-by: Claude <claude@anthropic.com>
Merge curated property metadata from the Application Properties
documentation with runtime-collected values from the Spring Environment.

The command now outputs a 3-column AsciiDoc table (Property, Description,
Default) organized by functional category (Core Properties, Web &
Controllers, CORS, GORM, etc.). Runtime values override static defaults
for known properties. Properties not found in the metadata appear in a
separate Other Properties section.

- Add config-properties.yml with ~160 properties across 21 categories
- Modify ConfigReportCommand to load YAML metadata and merge with runtime
- Update unit tests for 3-column hybrid format
- Update integration tests for hybrid category-based layout

Assisted-by: Claude Code <Claude@Claude.ai>
@jamesfredley
Copy link
Contributor Author

Add Apache license headers to config-properties.yml and logback.xml
that were missing required ASF headers, causing CI RAT audit failure.

Assisted-by: Claude Code <Claude@Claude.ai>
@jamesfredley jamesfredley self-assigned this Feb 26, 2026
@jamesfredley jamesfredley moved this to In Progress in Apache Grails Feb 26, 2026
@jamesfredley jamesfredley added this to the grails:7.0.8 milestone Feb 26, 2026
@jamesfredley jamesfredley marked this pull request as ready for review February 26, 2026 00:53
Copilot AI review requested due to automatic review settings February 26, 2026 00:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a hybrid ConfigReportCommand to Grails that merges curated configuration-property metadata (from a new classpath YAML file) with runtime-resolved values from Spring’s ConfigurableEnvironment, and includes a new grails-test-examples/config-report sample app to validate the output format end-to-end.

Changes:

  • Introduces ConfigReportCommand to generate a categorized AsciiDoc report using static metadata + runtime overrides, with an “Other Properties” section for non-metadata keys.
  • Adds META-INF/grails/config-properties.yml containing categorized property metadata (descriptions + defaults).
  • Adds/updates unit + integration tests, including a new grails-test-examples/config-report module wired into settings.gradle.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
settings.gradle Adds the new grails-test-examples-config-report included build project.
grails-core/src/main/groovy/grails/dev/commands/ConfigReportCommand.groovy Implements the hybrid config report generator (runtime collection + metadata merge + AsciiDoc output).
grails-core/src/main/resources/META-INF/grails/config-properties.yml Supplies categorized metadata used to render known properties.
grails-core/src/test/groovy/grails/dev/commands/ConfigReportCommandSpec.groovy Unit tests for property collection, metadata loading, escaping, and report layout.
grails-test-examples/config-report/** New sample application + integration spec validating runtime config capture and report structure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add instanceof Map guard after Yaml.load() in loadPropertyMetadata() to
prevent NPE when the YAML resource is empty or contains a non-Map root.
Remove unused @tempdir field and its import from the integration test.

Assisted-by: Claude Code <Claude@Claude.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants