test(e2e): real BackendPlan push + serve round trip - #442
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
backend_plan::from_stage_configbuilds aBackendPlanfrom the sameBackendStageConfigthe legacy streaming-config emit uses.BackendClient::post_backend_plan_typedencodes and POSTs it — the exact client code a live control plane process uses.ArcSwap— verified two ways:GET /api/v1/backend-planreflects the installedplan_id/materialization_count, and theHotReloadBackendPlanhandle shared withASAPQueryEngine(permain.rs's wiring) shows the same state directly.quantile_over_timequery against real ingested DDSketch data returns a correct, finite p99 value with the plan installed.Also extracts
plan_backend_stage_config()out ofplan_streaming_config_json()so both the legacy JSON path and the newBackendPlanconstruction share the exact sameBackendStageConfig— no behavior change to any existing test.Test plan
*_topkfailures asmain(unrelated).cargo test --release --lib -p control_plane— 732/732.cargo test --release --lib -p data_plane— 915/915.