Skip to content

test: add Prometheus Remote Write PromQL differential suite #732

Description

@milindsrivastava1997

Goal

Port the PromQL-compliance differential-test model into ASAPQuery-backend so the backend is tested as a Prometheus-compatible system end to end.

Outcome

A deterministic suite should:

  • start a real Prometheus reference with its Remote Write receiver enabled;
  • start the production data_plane --profile asapquery backend with a valid Remote Write PhysicalPlan;
  • send the same Snappy/protobuf Remote Write batches to POST /api/v1/write on both systems;
  • execute configured instant and range queries against /api/v1/query and /api/v1/query_range;
  • compare result type, label set, timestamps, values (with explicit tolerance), and expected errors;
  • assert the backend answered locally, so Prometheus fallback cannot mask failures; and
  • emit a JSON report and fail CI on differences.

Scope

Reuse/adapt the fixture, Remote Write seeder, comparison/reporting, and Compose lifecycle patterns from ASAPQuery/promql-compliance. Adapt service configuration to the backend's single HTTP listener, its active PhysicalPlan requirement, and its POST /api/v1/precompute/drain finite-input lifecycle.

Start with a small deterministic supported corpus (selectors, aggregation, rate/increase, and supported over-time expressions), then add sparse/staleness and counter-reset cases. Keep existing raw-oracle sketch tests; this suite verifies Prometheus semantics, rather than replacing sketch-accuracy coverage.

Acceptance criteria

  • A local one-command invocation provisions/tears down isolated services and writes a report.
  • Identical Remote Write payloads are accepted by Prometheus and the backend.
  • At least one instant and one range query compare equal without backend fallback.
  • A deliberately unsupported/different result fails with an actionable report.
  • A small stable suite runs in CI; broader cases may begin as manual/optional.

Activity

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

Metadata

Metadata

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