Skip to content

test(e2e): real BackendPlan push + serve round trip - #442

Merged
zzylol merged 1 commit into
mainfrom
test/backend-plan-e2e-real-push
Jul 30, 2026
Merged

zzylol merged 1 commit into
mainfrom
test/backend-plan-e2e-real-push

Conversation

@zzylol

@zzylol zzylol commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a real, unmocked end-to-end test proving the full BackendPlan wire cutover (#437/#440/#441) actually works, not just at the unit level:

  1. control_plane's real backend_plan::from_stage_config builds a BackendPlan from the same BackendStageConfig the legacy streaming-config emit uses.
  2. control_plane's real BackendClient::post_backend_plan_typed encodes and POSTs it — the exact client code a live control plane process uses.
  3. data_plane really decodes and installs it via ArcSwap — verified two ways: GET /api/v1/backend-plan reflects the installed plan_id/materialization_count, and the HotReloadBackendPlan handle shared with ASAPQueryEngine (per main.rs's wiring) shows the same state directly.
  4. A live PromQL quantile_over_time query against real ingested DDSketch data returns a correct, finite p99 value with the plan installed.

Also extracts plan_backend_stage_config() out of plan_streaming_config_json() so both the legacy JSON path and the new BackendPlan construction share the exact same BackendStageConfig — no behavior change to any existing test.

Test plan

  • New test passes in isolation and as part of the full suite (fixed a port collision with an existing test in the process — picked unused ports 19597/19598).
  • Ran 3x in a loop to rule out flakiness — stable.
  • Full suite: 11 passed (up from 10), same 2 pre-existing *_topk failures as main (unrelated).
  • cargo test --release --lib -p control_plane — 732/732.
  • cargo test --release --lib -p data_plane — 915/915.

…ne really serves from it

New end-to-end test, real wire round trip (no mocking): control_plane's
actual backend_plan::from_stage_config + BackendClient::post_backend_plan_typed
build and push a real encoded BackendPlan; data_plane really decodes and
installs it (verified via GET /api/v1/backend-plan reflecting the
installed plan_id/materialization_count, and directly via the shared
HotReloadBackendPlan handle); a live PromQL query against real ingested
DDSketch data returns a correct, finite p99 value with the plan installed.

Also extracts plan_backend_stage_config() out of plan_streaming_config_json()
so both the legacy JSON emit and the new BackendPlan construction share
the exact same BackendStageConfig -- no behavior change to existing tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zzylol
zzylol merged commit 95f108b into main Jul 30, 2026
@zzylol
zzylol deleted the test/backend-plan-e2e-real-push branch July 30, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant