feat(control-plane): lower PromQL with ingestion cadence - #741
Conversation
#702 compilation and non-fallback execution resultsTested against backend
What was testedEach query was tested independently with a 1-second source ingestion interval. Non-quantile queries request exact accuracy; quantile-containing queries use epsilon=0.01, delta=0.01. The fixture renames The test invokes the pinned Planner, enumerates/compiles physical alternatives, and requires a plan without external-exact nodes. Synthetic cost quotes favor the fully accelerated alternative. It then starts the real backend executable, installs the snapshot, ingests Remote Write samples for three series across two jobs, and checks nonempty ASAP responses after two successive ingestion batches. The default mock Prometheus serves health only, not query results. This demonstrates acceleration capability, not measured speedup, production cost-based selection, or a real-Prometheus numerical differential run. Reproduce on this PRPrerequisites: Rust, gh pr checkout 741
unset ASAP_CURRENT_SERIES_PROMETHEUS_URL
# All eight supported #702 queries, independently, through the real process.
cargo test --locked -p data_plane \
--test asapquery_compatibility_process_e2e \
issue_702_individual_queries_execute_without_fallback \
-- --nocapture --test-threads=1
# Assert the known ratio limitation instead of counting fallback as acceleration.
cargo test --locked -p data_plane \
--test asapquery_compatibility_process_e2e \
issue_701_702_uncertified_ratios_require_exact_fallback \
-- --nocapture --test-threads=1
# Combined issue coverage, including mixed workloads and average overflow.
cargo test --locked -p data_plane \
--test asapquery_compatibility_process_e2e issue_ \
-- --nocapture --test-threads=1If CI fixThe failing mixed-workload test incorrectly required uncertified quantile ratios to accelerate. The fix separates supported warm workloads from explicit ratio-fallback coverage, sets the peer data workload's cadence to 1 second, and adds the permanent per-query #702 process regression. The warm checks still reject exact fallback, external exact execution, and exact/candidate-exact subqueries, and require The focused issue tests passed (4/4). Full workspace validation and the new GitHub CI run are being checked separately. This does not implement w14 acceleration. |
|
Validation complete for a8f7572: the full local workspace suite passed (1,789 passed, 0 failed, 2 ignored), workspace Clippy passed with warnings denied, and GitHub CI is green. The permanent #702 per-query process test passes, as does the corrected mixed-workload test. w14 acceleration remains unsupported; its exact-fallback expectation is covered separately. |
Closes #729
Uses merged ASAPPlanner #417 (pinned at merge commit
c9b2aa78), including the merged peer-workload API from ASAPPlanner #442.Before this PR
Instant selectors lost their source horizon during planning. Backend current-series validation assumed a five-minute horizon, physical alternatives reparsed queries with compatibility defaults, and HTTP planning bypassed workload-aware lowering.
After this PR
A top-level
data_workloaddeclaring a 1 s ingestion interval makessum(data)lower asAggregate → TimeRange(1 s) → Scan. Snapshot and HTTP planning pass query and data workloads as peers, check evidence at the planning clock, and preserve the original IR through physical alternatives. Current-series execution expires members at the declared horizon; explicit range selectors retain their query-owned ranges.Changes
Validation
-D warnings: pass.sum/count/avg byandavg_over_timeare not accelerated; instantsumfails to compile #702 per-query acceleration and explicit ratio-fallback tests added; focused issue tests: 4 passed.a8f75721.Ready for review. Uses the merged upstream ASAPPlanner #417 revision; w14 remains fallback-only.
See the query results and reproducible E2E commands.