Skip to content

refactor: eval/scripts, eval/baselines and deployment Dockerfile (layout step 9) - #884

Draft
zzylol wants to merge 2 commits into
refactor/layout-query-adaptersfrom
refactor/layout-eval-deploy
Draft

zzylol wants to merge 2 commits into
refactor/layout-query-adaptersfrom
refactor/layout-eval-deploy

Conversation

@zzylol

@zzylol zzylol commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Problem: Step 9 of docs/design/repo-layout.md (docs(design): repository layout and engine boundaries #874): eval/ had its entry-point scripts at the top level and no place for compared systems that run as their own service, and deployment/ had only the monitoring stack, with no image of the backend itself.
  • Change:
    • eval/scripts/: run_vm_demo.sh, fetch_binaries.sh, build.sh and profile/profile_query_phase.sh move here (content unchanged except their own paths). Every reference is updated.
    • eval/baselines/{clickhouse,elasticsearch}/docker-compose.yml: pinned single-server ClickHouse (25.8.33.6) and single-node Elasticsearch (9.5.3), localhost only, named volumes. They are the servers data_plane --clickhouse-url / --elastic-url forward to (feat: ClickHouse and Elasticsearch query adapters and fallback clients (layout step 8) #883).
    • eval/README.md gets a Baselines section: every compared system, where its version is pinned, how it runs, which harness arm uses it, and what is not ported yet.
    • deployment/Dockerfile (multi-stage, rust:1.99.0-slim-bookworm → debian:bookworm-20261104-slim, non-root): control_plane and data_plane in one image. deployment/Dockerfile.dockerignore keeps the context to what cargo build needs. deployment/docker-compose.yml plans a workload once (WORKLOAD, Example 1 by default) and serves the plan on port 8088.
  • Effect: No Rust code changes; the binaries behave as on feat: ClickHouse and Elasticsearch query adapters and fallback clients (layout step 8) #883. Eval scripts are invoked as scripts/<name>.sh from eval/.

Review guide

File moves

Before After
eval/run_vm_demo.sh eval/scripts/run_vm_demo.sh
eval/fetch_binaries.sh eval/scripts/fetch_binaries.sh
eval/build.sh eval/scripts/build.sh
eval/profile/profile_query_phase.sh eval/scripts/profile_query_phase.sh (eval/profile/ removed)
root .gitignore eval/results/ removed: nothing writes it; run outputs are ignored by eval/.gitignore
(new) eval/baselines/clickhouse/docker-compose.yml, eval/baselines/elasticsearch/docker-compose.yml
(new) deployment/Dockerfile, deployment/Dockerfile.dockerignore, deployment/docker-compose.yml

Reference updates: $BASE/scripts/... in the moved scripts and deployment/monitoring/run_binaries.sh; ./scripts/run_vm_demo.sh, the harness hash inputs and the pgrep pattern in eval/campaign/*.sh; ../scripts/... in eval/harness/README.md and common.py; comments in run.py, make_dashboard.py, deployment/monitoring/.gitignore (which also gains /data/, written by run_binaries.sh).

What was ported, what was not

Ported read-only from ASAPQuery's main: the ClickHouse experiment service template (asap-tools/experiments/experiment_utils/services/docker-compose.clickhouse.yml.j2), with the image pinned and the Jinja parameters dropped. ASAPQuery has no Elasticsearch compose (only a pointer to Elastic's start-local script), so that file is new. ASAPQuery and ASAPPlanner are unchanged.

Not ported (listed in eval/README.md):

  • ClickHouse and Elasticsearch arms in eval/harness/run.py (data loading, SQL / Query DSL workloads). The backend forwards every SQL and Query DSL query today, so such an arm would measure only the forward path.
  • ASAPQuery's ClickHouse experiment runner and loaders (ClickBench, H2O) and its Elasticsearch benchmarking scripts: tied to ASAPQuery's experiment framework and query engine.
  • PilotDB-style sampling baselines: no infrastructure in ASAPQuery to port.
  • VictoriaMetrics cluster binaries are still installed by hand (not in fetch_binaries.sh); unchanged by this PR.

No results are added.

How verified

  • Gate on the restacked head (659d53b) (fmt, clippy --all-targets -D warnings, full cargo test --workspace, ulimit -n raised): fmt and clippy clean; tests 236 passed, 0 failed, 3 ignored (56 suites), the same as feat: ClickHouse and Elasticsearch query adapters and fallback clients (layout step 8) #883. No Rust file changes in this PR.
  • Parity: the uncommitted HTTP//metrics dump of refactor: split precompute and query crates out of data-plane (layout step 5a) #879–feat: ClickHouse and Elasticsearch query adapters and fallback clients (layout step 8) #883, run on this head and on this PR's head before the whole-stack review fixes (7862cb6): byte-identical (32,469 bytes).
  • Docker image: docker build -f deployment/Dockerfile . succeeds (BuildKit). data_plane --help and control_plane --help run in the image. Building it found two missing build packages (make for jemalloc; cmake, g++, libclang-dev for HiGHS), which are now installed in the build stage.
  • Compose: docker compose config passes for all three files. deployment/docker-compose.yml up: plan exits 0 (wrote /data/plan.json (2 queries, 8 nodes)), data-plane serves /metrics (200) and forwards an unplanned query (502 with no Prometheus, as expected).
  • Baselines: both compose files come up. ClickHouse answers SELECT version() with 25.8.33.6 (timezone UTC), Elasticsearch reports 9.5.3, and _sql answers. The image's data_plane --clickhouse-url ... --elastic-url ... forwards POST /clickhouse/query (SELECT 1 + 1 → 2) and POST /_sql (SELECT 2 + 3 → 5), both x-asap-execution: forwarded.
  • Scripts: bash -n on every moved and edited script. Dry runs: scripts/fetch_binaries.sh <unknown pin> exits 0, scripts/profile_query_phase.sh prints usage, scripts/run_vm_demo.sh and scripts/build.sh stop on a missing ASAPQ_BENCH, and run_binaries.sh prints usage. py_compile on the edited Python files. A repo-wide grep finds no reference to the old paths outside docs/design.
  • Reviews: three independent reviews (moved paths, doc alignment, dead or duplicate material). Fixed: Dockerfile build packages, runtime stage without packages (rustls bundles its roots), Baselines table points at the files that pin each version (no copied versions), arms backend_alone and asap_forward added, compose settings that restate defaults dropped, unused --report in compose dropped, a stale README.md pointer in build.sh, and design doc rows for Elasticsearch and profile_query_phase.sh.
  • All containers, volumes, images and build cache created for verification were removed afterwards.

README

This PR adds the deployment/Dockerfile paragraph to the README's run section and widens the layout table's deployment/ row to the image and Compose file.

Design doc

#874 updated (docs/repo-layout): Layout tree (eval/{baselines,harness,scripts,demo,campaign}, deployment/ contents), the results note, the file table rows for eval/scripts/ and both baselines, and the step 9 text.

@zzylol zzylol added area: data plane Runtime ingestion, storage, and query-serving data paths area: query engine PromQL lowering, execution, result shaping, and fallback behavior feature: PromQL PromQL compatibility and execution semantics labels Nov 26, 2026
@zzylol zzylol added enhancement New feature or request and removed feature: PromQL PromQL compatibility and execution semantics area: query engine PromQL lowering, execution, result shaping, and fallback behavior labels Nov 27, 2026
…compose (layout step 9)

Move the eval entry points (run_vm_demo.sh, fetch_binaries.sh, build.sh,
profile_query_phase.sh) into eval/scripts/ and update every reference.
Add pinned ClickHouse and Elasticsearch compose files under
eval/baselines/, a Baselines section in eval/README.md, and
deployment/Dockerfile (control_plane + data_plane, multi-stage, pinned
bases) with a compose file that plans a workload and serves the plan.
…E and compose files

The build stage needs make (jemalloc) and cmake, g++, libclang-dev
(HiGHS); the runtime stage needs no packages (rustls ships its roots).
Baselines table points at the files that pin each version; compose
files drop settings that restate defaults.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: data plane Runtime ingestion, storage, and query-serving data paths enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant