Skip to content

feat: warn on unknown config keys to catch typos - #88

Merged
steve-calvert-glean merged 1 commit into
mainfrom
config-key-validation
Apr 12, 2026
Merged

feat: warn on unknown config keys to catch typos#88
steve-calvert-glean merged 1 commit into
mainfrom
config-key-validation

Conversation

@steve-calvert-glean

Copy link
Copy Markdown
Collaborator

Summary

  • Adds validateConfigKeys() that checks for unknown JSON keys when loading config
  • Warnings are logged via the config:load debug namespace (visible with -v or GLEAN_DEBUG=config:*)
  • Unknown keys are non-fatal — config still loads successfully

Test plan

  • Unit test: unknown key like "toke" produces warning
  • Unit test: all known keys produce no warnings
  • Unit test: unknown keys don't prevent config loading
  • Unit test: invalid JSON returns no warnings
  • mise run test:all passes (455 tests, lint clean, binary builds)

@steve-calvert-glean
steve-calvert-glean requested a review from a team as a code owner April 11, 2026 20:52
@steve-calvert-glean steve-calvert-glean added the enhancement New feature or request label Apr 12, 2026

@rwjblue-glean rwjblue-glean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems good. I do think we might want to ignore a config that has invalid keys, thoughts?

Adds validation in config loading that checks for unknown JSON keys
and logs warnings via the config:load debug namespace. Visible with
-v or GLEAN_DEBUG=config:*.
@steve-calvert-glean
steve-calvert-glean merged commit 2073502 into main Apr 12, 2026
7 checks passed
@steve-calvert-glean
steve-calvert-glean deleted the config-key-validation branch April 12, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants