Skip to content

refactor: remove asap-planner's promql/sql/metricsql features (#1065) - #1087

Merged
milindsrivastava1997 merged 1 commit into
mainfrom
1065-refactor-remove-the-unused-promqlsqlmetricsql-frontend-features-of-asap-planner
Oct 30, 2026
Merged

milindsrivastava1997 merged 1 commit into
mainfrom
1065-refactor-remove-the-unused-promqlsqlmetricsql-frontend-features-of-asap-planner

Conversation

@milindsrivastava1997

Copy link
Copy Markdown
Collaborator

Closes #1065.

Why

asap-planner put each frontend behind a cargo feature so that a PromQL-only runtime could avoid linking DataFusion and the MetricsQL parser. ASAPQuery-backend was that runtime, but it now has to support every language, so no consumer needs the PromQL-only build. Keeping the features costs 25 cfg sites in lib.rs, feature-gated tests, a public error variant and a CI step.

What and how

  • asap-frontend-{promql,sql,metricsql} become regular dependencies.
  • Removed:
    • the promql/sql/metricsql features and every cfg that used them;
    • UserInputError::FrontendDisabled and the hidden FrontendInput::NoSqlFeature placeholder;
    • the not(sql) test in e2e_plan.rs;
    • the CI step "Check and test asap-planner with the PromQL frontend alone".
  • UserInput::validate now only checks that the frontend name matches the language. ElasticDSL still fails with FrontendMismatch.
  • integration-tests asks only for test-support, which stays.
  • Comments that described the features are removed.

The backend gets the matching change in ProjectASAP/ASAPQuery-backend#850. That change works against the backend's current pinned rev, so the two PRs can merge in either order. The #1056 fix on ci-speed was reverted in #1071, so removing the CI step here does not conflict with it.

Key code interfaces added / modified

  • Removed: the promql, sql and metricsql cargo features of asap-planner.
  • Removed: UserInputError::FrontendDisabled.

Major algorithm changes: None.

Snapshot changes: None.

Before this PR

asap-planner = { ..., default-features = false, features = ["promql"] }   # links only the PromQL frontend

A SQL workload in that build fails with UserInputError::FrontendDisabled { feature: "sql" }.

After this PR

asap-planner = { ... }   # always links all three frontends

default-features = false or features = ["promql"] no longer resolves. Every language is always available, and planning results are unchanged.

Testing

  • cargo clippy --workspace --all-targets -- -D warnings is clean.
  • cargo test --workspace has no failures.
  • The corpus snapshots are unchanged.

🤖 Generated with Claude Code

Every consumer needs all three frontends, so the frontend crates become
regular dependencies. Removes the features, their cfgs,
UserInputError::FrontendDisabled, the not(sql) test and the PromQL-only
CI step. test-support stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milindsrivastava1997
milindsrivastava1997 force-pushed the 1065-refactor-remove-the-unused-promqlsqlmetricsql-frontend-features-of-asap-planner branch from a167f8b to 8c13368 Compare October 30, 2026 00:27
@milindsrivastava1997
milindsrivastava1997 merged commit 979cb8b into main Oct 30, 2026
3 checks passed
@milindsrivastava1997
milindsrivastava1997 deleted the 1065-refactor-remove-the-unused-promqlsqlmetricsql-frontend-features-of-asap-planner branch October 30, 2026 01:38
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.

[Refactor] Remove the unused promql/sql/metricsql frontend features of asap-planner

1 participant