-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Config conversion should not silently drop invalid docs #2926
Copy link
Copy link
Open
Description
Title:
Config conversion should fail on invalid v1 docs (no silent drop)
Prerequisites
- I searched the current open issues.
What are you trying to do that currently feels hard or impossible?
Trust that config conversion errors are surfaced instead of silently dropping sections.
Clear end goal (specific use‑case)
When a v1‑style config doc is malformed, I want a hard error that tells
me exactly which document is invalid, so I don’t end up with missing tools/sources at runtime.
Suggested Solution(s)
- In
ConvertConfig, if a v1 doc can’t be coerced into the expected map shape, return an error. - Include doc index + key path in the error.
- Provide a hint: if you intended v2 format, each doc needs
kind+name.
Alternatives Considered
None — the current behavior is silent and makes debugging too slow.
Additional Details
Code pointer: cmd/internal/config.go → ConvertConfig.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels