Repository navigation
refactor(query-engine): extract asap-adapters crate - #936
Draft
milindsrivastava1997 wants to merge 2 commits into
Draft
milindsrivastava1997 wants to merge 2 commits into
milindsrivastava1997 wants to merge 2 commits into
Conversation
Move protocol adapters, fallback clients, the OTLP receiver, the query tracker, planner client and every binary into a new workspace crate that depends on the engine crate. The engine crate becomes a library and no longer depends on asap-planner-rs. The Prometheus and VictoriaMetrics remote-write decoders stay in the engine crate: precompute_engine's ingest sources use DecodedSample and the decoders, and those sources use precompute internals. Imports, manifests, Dockerfiles, install script and CI path filters only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aths Remove reqwest, rusqlite, uuid and structopt from the engine manifest; nothing in the crate uses them. Point asap-tools build/edit instructions at asap-adapters and the manual-stack docs at the workspace target dir. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
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.
Plan step 1 of
.design_docs/asapplanner-engine-boundaries.md(decision 46): extractasap-adaptersas a pure move.What moved to
asap-adaptersdrivers/query/(protocol adapters, fallback clients,HttpServer) anddrivers/ingest/otel.rs(OtlpReceiver)query_tracker/,planner_client.rs(with the asap-planner-rs dependency)main.rs,engine_config.rs(only used bymain.rs) and everysrc/bin/*binary. Binary names are unchanged.HttpServer:rqe_query_tests,{prometheus,clickhouse,elastic}_forwarding_testsasap-query-engineis now a library and no longer depends on asap-planner-rs.Deviations from the plan
drivers/ingest/{prometheus_remote_write,victoriametrics_remote_write}.rs).precompute_engine/{ingest_source,csv_ingest,json_ingest,ingest_handler}.rsuseDecodedSampleand the decoders, and they also use precompute internals (SeriesRouter,pub(crate) route_decoded_samples). Moving the decoders would create a crate cycle, and moving the ingest sources would require visibility changes. Both move together in the wiring step, as the plan already says for the ingest sources.tests/sql_query_support.rsandtests/e2e_precompute_equivalence.rsmove toasap-adapters/tests/. The alternative was to keep asap-planner-rs as an engine dev-dependency. Moving them keeps the engine crate free of any planner dependency, as decision 46 requires. Both tests use only public engine APIs.asap-adapters/src/bin/run.shgets a shebang so shellcheck passes on the moved file. It refers to a binary that no longer exists, so it is dead either way.Other changes (build config only)
Cargo.toml: new member, plus aquery_engine_rustworkspace dependency.rusqlite,uuid,structopt) stay in the engine manifest untouched.asap-adaptersforwardsnative_query_legacy_test_supportto the engine. The defaultjemallocfeature stays on the engine library.asap-query-engine/Dockerfilebuilds fromasap-adapterswith stubs for the new layout.asap-planner-rs/Dockerfilestubs the new member.asap-query-engine/installation/install.sh:-p query_engine_rust→-p asap-adapters.asap-adapters/**.asap-quickstart/Dockerfile.queryengine-localis unchanged: it copies a prebuiltquery_engine_rustbinary, and that name is the same.No logic changes. Imports were rewritten from
crate::toquery_engine_rust::/asap_adapters::, andcargo fmtreordered them.Verification
cargo fmt --all -- --checkandcargo clippy --workspace --all-targets --all-features --locked -- -D warningspass.cargo test --workspace --locked: 1529 passed, 0 failed, the same count asmain.docker build -f asap-query-engine/Dockerfile .and-f asap-planner-rs/Dockerfile .both succeed. The image contains/usr/local/bin/query_engine_rustand--helpruns.Follow-ups (not in this PR)
asap-query-engine/docs/adding-{protocol-adapter,protocol-server,fallback-backend}.mdanddocs/README.mdstill givesrc/drivers/...paths relative to the engine crate.pub(crate).🤖 Generated with Claude Code