Repository navigation
Pre-commit/CI gaps: asap-summary-ingest tests unrun, asap-planner-rs CI path filter, dead correctness.yml job #439
Copy link
Copy link
Closed
Labels
Description
Surveyed all Python and Rust tests in the repo against .pre-commit-config.yaml and .github/workflows/*.yml (found while working on #398). Three gaps, none fixed yet — tracked here for a separate PR.
1. asap-summary-ingest/tests/ is not run anywhere
36 pytest tests (test_integration.py, test_sql_schema.py) — the only real pytest suite in the repo. Not referenced in .pre-commit-config.yaml or any workflow under .github/workflows/.
- Currently 4 of these fail locally because the live
promql_utilitiesinstall (editable, pointing at the separateasap-internal/CommonDependenciesrepo) hasn't picked up thewindowSize→windowSizeMsrename from feat(asap-planner-rs): add millisecond precision support for sub-second scrape intervals #398. - Verified separately: against this worktree's vendored
asap-common/dependencies/py/promql_utilities/(already fixed), all 36 pass. So wiring this into CI should install the vendored copy the same waycorrectness.ymlalready does (pip install -e asap-common/dependencies/py/promql_utilities/), not rely on a local editable install of an external sibling repo. - To add: a pre-commit hook (pytest,
language: system) and a CI job/path-filter entry (inpython.ymlor a new workflow) forasap-summary-ingest/.
2. asap-planner-rs unit tests don't trigger CI
asap-planner-rs is a cargo test --workspace member with 11 source files containing #[cfg(test)] unit tests.
- Pre-commit: covered — any
.rsfile change triggers thecargo-testhook (cargo test --workspace). - CI (
rust.yml): not covered — itspush/pull_requestpath filters listasap-query-engine/**,asap-common/dependencies/rs/**,asap-common/tests/**,asap-common/sketch-core/**,Cargo.toml,Cargo.lock— but notasap-planner-rs/**. A PR touching only planner files never triggers the GitHub Actions Rust job (onlyworkflow_dispatchwould). - To add:
asap-planner-rs/**to both path-filter lists in.github/workflows/rust.yml.
3. correctness.yml's rust-pattern-matching job is a dead stub
Job 3 in .github/workflows/correctness.yml ("Rust pattern matching unit tests") installs Rust/protoc/sccache/cache but has no run step — it does nothing every time it runs.
- History: it used to run
cargo test --releaseinasap-common/tests/rust_pattern_matching(a directory that no longer exists). The run step was deleted in commit2bad8c5("remove rust_pattern_matching from CI") when that directory was removed/consolidated, but the rest of the job (checkout, toolchain, protoc, sccache, cache) was left behind as a no-op. - The actual pattern-matching unit tests now live in
asap-common/dependencies/rs/promql_utilities/src/ast_matching/promql_pattern.rsand are already exercised bycargo test --workspaceinrust.yml'stestjob (path filter includesasap-common/dependencies/rs/**). - To fix: delete the dead job from
correctness.yml(it's redundant withrust.yml), or give it a real run step if there's a reason to keep it separate.
Not gaps (checked and ruled out)
- The other
asap-common/tests/*Python files (compare_matched_tokens/python_tests/*,compare_patterns/*.py) aren't pytest — they're driven bymaster_test_runner.py/compare_serialized_patterns.py, whichcorrectness.ymlalready runs directly. - The 10 standalone (non-workspace) Rust crates under
asap-tools/**(kafka producers/consumer, otlp-exporters, cluster_data_exporter ×2, fake_kafka_exporter, fake_exporter ×2, clickhouse data_exporter) have zero#[test]/#[cfg(test)]code — nothing to wire up. asap-common/tests/compare_matched_tokens/rust_testsandasap-common/tests/compare_patternsare workspace members but are plain binaries (fn main), not test crates — their actual test logic runs via the Python comparison scripts above, already in CI.
Reactions are currently unavailable
Activity