Skip to content

Config conversion should not silently drop invalid docs #2926

@Deeven-Seru

Description

@Deeven-Seru

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.goConvertConfig.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions