Skip to content

info() second-arg matcher wrongly rejected as an empty vector selector #5

Description

@zzylol

Summary

info(metric, {data=~".*"}) parse-fails with vector selector must contain at least one non-empty matcher. This is a validation bug, not a missing feature: info is already in the function table (added by c51beaf).

Root cause

info(v, data_selector)'s second argument is a label selector over data labels, not a vector selector over metric names. The parser applies the "a vector selector must contain at least one non-empty matcher" rule to it, which rejects a label-only matcher set like {data=~".*"}. Prometheus permits it there.

Work

Relax the non-empty-matcher validation for info's second argument, so a label-only matcher set is accepted.

Corpus impact

5 rejections. A bug fix, not grammar work — the cheapest of the parser gaps.

Constraint

All changes on the asap branch; no upstream operations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions