An unknown local datasource type is only caught deep inside proxy construction (cmd/app.go:191-193), where it is logged as a warning and silently skipped. The datasource simply never appears, which makes a typo (e.g. postgres vs postgresql) hard to diagnose.
Proposed scope
- Add validation that rejects any
LocalDatasource.Type outside the known set, ideally at config load (config.Load) so it fails fast with a clear error listing the supported types.
- Keep the known-type list as a single source of truth shared with the
switch ds.Type in cmd/app.go (avoid duplicating the list).
Known types
postgresql, mysql, mssql, clickhouse, oracle, http, prometheus, ssh, mongodb, redis, kafka, mcp (see cmd/app.go:131-194).
Acceptance criteria
- Unit test: a known type validates; an unknown type returns an error whose message lists supported types.
Pointers
cmd/app.go:131-194 (type switch + current default warning)
pkg/config/config.go (LocalDatasource, Load)
Good first issue: clear scope; main design choice is where to put the shared type list.
An unknown local datasource
typeis only caught deep inside proxy construction (cmd/app.go:191-193), where it is logged as a warning and silently skipped. The datasource simply never appears, which makes a typo (e.g.postgresvspostgresql) hard to diagnose.Proposed scope
LocalDatasource.Typeoutside the known set, ideally at config load (config.Load) so it fails fast with a clear error listing the supported types.switch ds.Typeincmd/app.go(avoid duplicating the list).Known types
postgresql,mysql,mssql,clickhouse,oracle,http,prometheus,ssh,mongodb,redis,kafka,mcp(seecmd/app.go:131-194).Acceptance criteria
Pointers
cmd/app.go:131-194(type switch + current default warning)pkg/config/config.go(LocalDatasource,Load)Good first issue: clear scope; main design choice is where to put the shared type list.