Skip to content

mvp phase γ: delete entire asap-planner-rs workspace member - #99

Merged
zzylol merged 2 commits into
mainfrom
mvp/phase-gamma-full-delete-asap-planner-rs
May 7, 2026
Merged

zzylol merged 2 commits into
mainfrom
mvp/phase-gamma-full-delete-asap-planner-rs

Conversation

@zzylol

@zzylol zzylol commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Phase γ of the planner consolidation: delete the entire asap-planner-rs/ workspace member (library + CLI). Phase α (#96) made the ASAPCollector controller the sole emitter of BackendStorageRouting; Phase β migrated all 5 PromQL pattern matchers and 11 archive-only intents into the controller; Step 2.3 (#97) wired the backend to forward archive queries to thanos-query. The library code in this repo is now redundant, and earlier scope kept the CLI binary — that constraint has been rescinded.

  • Delete asap-planner-rs/ directory — 49 files, ~5.1k LOC (src, tests, Cargo.toml, Dockerfile, installation/, controller-cli-compose.yml.j2, docker-compose.yml.j2).
  • Drop the workspace member + workspace internal dep in the root Cargo.toml.
  • Surgically remove the only remaining backend importer in asap-query-engine:
    • src/planner_client.rs (the LocalPlannerClient bridge that called asap_planner::Controller::generate() from the backend's tracker).
    • src/query_tracker/ (passive auto-discovery loop that drained PromQL queries and called the planner client). Both are superseded by the controller observing queries via its own scrape side-channel and pushing plans / routing tables back via POST /api/v1/streaming-config and POST /api/v1/storage_routing.
    • --enable-query-tracker / --tracker-observation-window-secs CLI flags and the asap_planner workspace dependency on asap-query-engine.
    • HttpServer::new loses its Option<Arc<QueryTracker>> arg; record_instant / record_range hooks in instant- and range-query handlers are removed.
    • asap-query-engine/Dockerfile no longer COPYs asap-planner-rs sources or stubs them in the dependency cache layer.
  • Refresh README.md, asap-quickstart/, asap-summary-ingest/README.md, and docs/ to point at the canonical planner location (ASAPCollector/controller/).
  • asap-quickstart/docker-compose.yml and benchmarks/docker-compose.yml continue to reference the published ghcr.io/projectasap/asap-planner-rs:v0.2.0 image; that's an external artifact that still works. The Phase δ rewrite of the quickstart will replace the init container with a controller HTTP push.

Test plan

  • cargo build --release is green (workspace and individual crate).
  • cargo test --release --lib shows the same 34 pre-existing failures as origin/main; no new test regressions introduced by this PR.
  • No source file in any retained workspace member still imports asap_planner::*.
  • Auto-merge if CI is green (CI is not configured in this repo today; build + test verified locally).

🤖 Generated with Claude Code

zzylol and others added 2 commits May 7, 2026 17:25
…lanner driver

Phase α (#96) made the ASAPCollector controller the sole emitter of
BackendStorageRouting; Phase β migrated all 5 PromQL pattern matchers
and 11 archive-only intents into the controller; Step 2.3 (#97) wired
the backend to forward archive queries to thanos-query. The
`asap-planner-rs/` library + CLI in this repo is now redundant.

Delete the entire `asap-planner-rs/` workspace member (49 files, ~5.1k
LOC) and surgically remove its only remaining importer in
`asap-query-engine`:

  - `src/planner_client.rs` — `LocalPlannerClient` was the in-process
    bridge that called `asap_planner::Controller::generate()` from the
    backend's query tracker.
  - `src/query_tracker/` — the passive auto-discovery loop that
    drained observed PromQL queries and called the planner client.
    Both are superseded by the controller observing queries via its
    own scrape side-channel and pushing plans / routing tables back
    via `POST /api/v1/streaming-config` and
    `POST /api/v1/storage_routing`.
  - `--enable-query-tracker` / `--tracker-observation-window-secs`
    CLI args and the `asap_planner` workspace dependency on
    `asap-query-engine` are dropped.
  - `HttpServer::new` loses its `Option<Arc<QueryTracker>>` arg; the
    `record_instant` / `record_range` hooks in instant- and
    range-query handlers are removed.
  - `asap-query-engine/Dockerfile` no longer COPYs `asap-planner-rs`
    sources or stubs them in the dependency cache layer.

Backend builds clean (`cargo build --release`); lib tests show the
same 34 pre-existing failures as origin/main with no new regressions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… deletion

- `README.md`: drop the `asap-planner-rs/` entry from the repo-tree
  diagram; refine the "Where the planner lives" prose to say the
  legacy crate was deleted (not "CLI retained"); point external
  scripters at the controller's HTTP / CLI surface.
- `asap-quickstart/README.md`: rename the planner role to "Plan
  emitter (init container)" and note that the demo currently uses the
  published `ghcr.io/projectasap/asap-planner-rs:v0.2.0` image but
  will switch to a controller HTTP push under Phase δ. Update the
  "Edit the asap-planner-rs Config" subsection accordingly.
- `asap-quickstart/docker-compose.dev.yml`: drop the local
  `asap-planner-rs` build override (the source no longer exists in
  this repo); the base compose still pins the published image.
- `asap-quickstart/Dockerfile.queryengine-local`: drop the stale
  comment cross-referencing `asap-planner-rs/Cargo.toml`.
- `asap-summary-ingest/README.md`: redirect references to the
  controller in `ASAPCollector/`.
- `docs/`: refresh component indexes, architecture diagrams, the
  add-new-sketch guide, the bootstrap-config-from-query-log how-to,
  and the publishing-docker-images table to point at the
  ASAPCollector controller as the canonical planner location.
  Historical design docs that mention the old path are left as-is
  (they are records of past state).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 5329ed9 into main May 7, 2026
@zzylol
zzylol deleted the mvp/phase-gamma-full-delete-asap-planner-rs branch May 7, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant