Skip to content

asap-query-engine: integrate asap-planner-rs library for in-process config generation #241

@milindsrivastava1997

Description

@milindsrivastava1997

Problem

asap-planner-rs already exposes a Rust library crate (asap_planner), but asap-query-engine has no dependency on it and cannot invoke config generation in-process. This is a prerequisite for the embedded auto-discovery query tracker.

Goal

Wire asap-query-engine to call the asap_planner library directly when it needs to generate sketch configs from observed queries.

Details

  • Add asap_planner as a workspace dependency in asap-query-engine/Cargo.toml
  • Identify the correct public API entry points in asap_planner::lib for generating inference_config and streaming_config structs from a list of PromQL expressions
  • Expose an internal PlannerClient trait/struct in asap-query-engine that wraps the library call, so it can be swapped for a mock in tests
  • The embedded query tracker (separate issue) will call this once it identifies queries worth accelerating

Acceptance Criteria

  • asap-query-engine compiles with asap_planner as a dependency
  • A unit test demonstrates calling planner config generation in-process from asap-query-engine with a sample PromQL expression
  • No user-facing change: the planner binary remains usable standalone

Notes

asap-planner-rs is already structured as [lib] + [[bin]], so no refactoring of the planner is needed — this is purely an integration task on the asap-query-engine side.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions