Skip to content

Alertmanager exposes errors one by one #4989

@SoloJacobs

Description

@SoloJacobs

What did you do?

The current implementation of UnmarshalYAML for certain notifiers (specifically discussed regarding Webhooks) uses an early return pattern to propagate errors. This creates a "whack-a-mole" user experience where only the first encountered error is reported, rather than validating the entire configuration block. This specific issue is only about receivers: section of the configuration, but other issues may exist.

What did you expect to see?

Expected to see all errors, which are independent of one another.

What did you see instead? Under which circumstances?

A single error (which depends on the notifier.

System information

No response

Alertmanager version


Alertmanager configuration file

See subtasks for configuration examples.

Prometheus version


Prometheus configuration file

Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions