Skip to content

DATASOURCE_*_CONFIG_NAME outside the internal registry is silently skipped at startup (no log) #326

Description

@fredcamaral

Summary

In single-tenant mode, Fetcher loads internal datasources from DATASOURCE_{NAME}_* env vars, but only accepts a _CONFIG_NAME value in a hardcoded, finite set (midaz_onboarding, midaz_transaction, plugin_crm). Any other value is silently skipped at startup — no log, no warning, no error. A typo in _CONFIG_NAME (e.g. midaz_onbaording) produces a datasource that simply never loads, with nothing to point the operator at the cause.

Evidence (origin/develop)

  • pkg/resolver/env_loader.go:26-36 — derives the prefix from each *_CONFIG_NAME; :32if !registry.IsInternal(configName) { continue } (silent skip).
  • pkg/resolver/registry.go:30-46 — the finite set: midaz_onboarding / midaz_transaction / plugin_crm; comment notes adding one requires a Fetcher deploy.

Suggested fix

Emit a startup log (warn) when a DATASOURCE_*_CONFIG_NAME value is present but not in the registry, naming the value and the accepted set — so a typo or an unsupported name surfaces immediately instead of silently producing a missing datasource.


Found during a Lerian documentation consistency review; the docs have been corrected to name the accepted set explicitly. Low priority — operator-experience hardening.

Metadata

Metadata

Assignees

No one assigned

    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