Problem
_build_engine_config in asap-tools/experiments/experiment_utils/services/query_engine.py was written against the old two-value query_language CLI interface (PROMQL or SQL). PR #323 replaced that with a proper four-variant BackendConfig tagged union in asap-query-engine/src/engine_config.rs:
prometheus — PromQL, server URL
clickhouse — SQL, url + database
elastic_querydsl — Elasticsearch QueryDSL, url + index
elastic_sql — Elasticsearch SQL, url + index
The experiment infra was never updated to match, leaving several gaps:
-
ClickHouse URL is wrong. When query_language="SQL", _build_engine_config reuses prometheus_server (built from prometheus_host:prometheus_port) as the ClickHouse url. The ClickHouse database field is silently dropped entirely.
-
Elasticsearch backends are unreachable. elastic_querydsl and elastic_sql have no representation in the experiment config or _build_engine_config. There is no way to run an experiment against an Elasticsearch backend.
-
start() encodes backend config as Prometheus-specific kwargs. prometheus_host and prometheus_port live in **kwargs because they are the infrastructure-level encoding of "where is the backend." This only makes sense for the Prometheus case. Other backends require different fields (database, index), which have no kwargs equivalent.
-
query_language in Hydra config is the wrong abstraction. config.yaml exposes query_language: PROMQL|SQL as a flat string. The engine now expects a backend: block with a type tag and backend-specific fields.
Affected files
asap-tools/experiments/experiment_utils/services/query_engine.py — _build_engine_config, start()
asap-tools/experiments/config/config.yaml — query_language field
- All experiment scripts that pass
query_language/prometheus_host/prometheus_port to query_engine_service.start()
Problem
_build_engine_configinasap-tools/experiments/experiment_utils/services/query_engine.pywas written against the old two-valuequery_languageCLI interface (PROMQLorSQL). PR #323 replaced that with a proper four-variantBackendConfigtagged union inasap-query-engine/src/engine_config.rs:prometheus— PromQL,serverURLclickhouse— SQL,url+databaseelastic_querydsl— Elasticsearch QueryDSL,url+indexelastic_sql— Elasticsearch SQL,url+indexThe experiment infra was never updated to match, leaving several gaps:
ClickHouse URL is wrong. When
query_language="SQL",_build_engine_configreusesprometheus_server(built fromprometheus_host:prometheus_port) as the ClickHouseurl. The ClickHousedatabasefield is silently dropped entirely.Elasticsearch backends are unreachable.
elastic_querydslandelastic_sqlhave no representation in the experiment config or_build_engine_config. There is no way to run an experiment against an Elasticsearch backend.start()encodes backend config as Prometheus-specific kwargs.prometheus_hostandprometheus_portlive in**kwargsbecause they are the infrastructure-level encoding of "where is the backend." This only makes sense for the Prometheus case. Other backends require different fields (database,index), which have no kwargs equivalent.query_languagein Hydra config is the wrong abstraction.config.yamlexposesquery_language: PROMQL|SQLas a flat string. The engine now expects abackend:block with atypetag and backend-specific fields.Affected files
asap-tools/experiments/experiment_utils/services/query_engine.py—_build_engine_config,start()asap-tools/experiments/config/config.yaml—query_languagefieldquery_language/prometheus_host/prometheus_porttoquery_engine_service.start()