Re-enable the controller-plans e2e against the ASAPPlanner path - #726
Merged
Merged
Conversation
The 12 tests were ignored by #725 because their payload construction assumed the summary families the legacy path was told to use via `sketch_type_override`. ASAPPlanner has no such override — it picks from the accuracy target — so the tests now read back what it committed to. Three things had to line up. **Grouping.** The population key the backend materializes under has to match the attributes the producer puts on the wire. The queries carried no grouping, so the planner derived an empty `grouping_labels` while the frames carried `service`/`zone`, and ingest rejected them with `active schema resolves 0` or `frame has no matching transmission rule`. The queries are now registered as `sum by (service) (...)`. **Registration is not readout.** Wrapping the *query* in the same aggregation returns no result: the stored summaries are already per-service, so the inner form reads them and the result carries the label. Registration decides how the materialization is keyed; readout uses the original shape. **Families follow the planner.** Measured, not assumed: | query | old override | planner's choice | |---|---|---| | `quantile_over_time(0.5, request_size_bytes[1s])` | KLL | DDSketch (`alpha`) | | `count_over_time(unique_users_per_min[1s])` | HLL | CountMinSketch (`w`, `d`) | | `topk(3, count_over_time(top_endpoint_qps[1s]))` | CountSketch | CountMinSketch | Payloads are built from `materializations[0].parameters`, so a future planner change moves the fixture with it instead of breaking it. Two harness fixes: the first two tests moved to `start_full_stack` because `start_backend_http_server` never attached the physical-plan handles, and the first test's window went from 60s to 1s to agree with the pane layout the install pins. The KLL and HLL builders, the plain `start_backend_http_server` harness and the legacy streaming-config snapshot accessor go with them — every test now installs through the same physical-plan path. Closes #723. Co-Authored-By: Claude Opus 5 (1M context) <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.
Closes #723. The 12 tests in
data_plane/tests/e2e_controller_plans_and_backend_serves.rsare un-ignored and passing.−415 / +133.
What was wrong
#725 ported the scaffolding — the file compiled — but the tests still built their OTLP payloads for the summary families the legacy path was told to use via
sketch_type_override. ASAPPlanner has no such override; it picks from the accuracy target. Three separate things had to line up.1. Grouping is a contract between the plan and the wire
The population key the backend materializes under has to match the attributes the producer puts on each frame. The registered queries carried no grouping, so the planner derived an empty
grouping_labelswhile the frames carriedservice/zone. Ingest rejected them:Queries are now registered as
sum by (service) (...), which is what putsserviceintogrouping_labels. Verified directly rather than assumed:2. Registration is not readout
Wrapping the query in the same aggregation was my first attempt, and it returned
No result for queryeverywhere. A diagnostic against a populated backend showed why:The data was fine the whole time. The stored summaries are already per-service, so the inner form reads them and the result carries the label without the outer aggregation. Registration decides how the materialization is keyed; readout uses the original query shape. The tests now register with the grouping and read with the inner form.
3. Payload families follow the planner
Measured, not assumed:
sketch_type_overridequantile_over_time(0.5, request_size_bytes[1s])alphacount_over_time(unique_users_per_min[1s])w=55 d=3topk(3, count_over_time(top_endpoint_qps[1s]))Payloads are built from
materializations[0].parametersrather than from constants, so a later planner change moves the fixture with it instead of breaking it. Thetopkcase also needed the plainData::Countminsketchproto envelope — it was declaringData::Countsketch, which is why it kept missing the transmission rule after the other fixes landed.Harness fixes
start_backend_http_server, which never attached the physical-plan handles (503: physical-plan hot-reload handles are not attached). They now usestart_full_stacklike the other ten.post_full_configpins, which was failing asInvalidWindowLayout { reason: "window kind disagrees with size and slide" }.grouping_labels— the invariant it was actually checking.Removed
build_kll_state,build_kll_export,build_hll_state,build_hll_export,build_heap_bearing_msgpack,start_backend_http_server,get_streaming_configand the KLL/HLL proto imports. Every test now installs through the same physical-plan path, so none of them has a caller. The data plane still supports those wire encodings; these are fixture builders, recoverable from history if a future test needs to cover those formats.Testing
cargo +1.98.0 test -p data_plane --test e2e_controller_plans_and_backend_serves— 12 passed, 0 failed.cargo +1.98.0 fmt -- --check— clean.cargo +1.98.0 clippy --workspace --all-targets -- -D warnings— clean.cargo +1.98.0 test --workspace -- --test-threads=1— exit 0, zero failures.🤖 Generated with Claude Code