Skip to content

PromQL: punted queries not enforced at runtime, can be silently served via capability-matching #528

Description

@milindsrivastava1997

Scope: streaming_engine=precompute, PromQL.

The planner punts low-sample-count queries (asap-planner-rs/src/planner/promql.rs:182-217, should_be_performant) and omits them from query_configs/aggregation_configs (asap-planner-rs/src/promql/generator.rs:72-91). Nothing downstream enforces this — asap-query-engine's query tracker only logs punted_queries.len().

If a punted query shares metric/statistic/grouping-labels/spatial-filter with an accepted sibling query whose aggregation window size evenly divides it, the engine's capability-matching fallback (build_query_execution_context_promql, asap-query-engine/src/engines/simple_engine/promql.rs:1025-1056) serves the punted query anyway.

Repro: planned two quantile_over_time(0.9, m[Xm]) variants — one punted (too few samples), one accepted with a compatible window. Confirmed the punted query has no query_config, but build_query_execution_context_promql on it still returns Some(...).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions