Skip to content

Reporting test suite is slow (41m in CI); parallelise it #101

Description

@tombonfert

Problem: The reporting CI job takes 41m (PR #98), far longer than query_engine. All ~42 reporting tests run serially in one Spark session.

Context: CI already parallelises across components (matrix over query_engine/reporting in acceptance.yml), but within the reporting job pytest is single-process. pytest-xdist is not a dependency. The 15 integration tests likely dominate runtime.

Catch: Tests share global catalog state under fixed names (setup_basic_db rebuilds spark_catalog.silver; cleanup_gold drops all gold tables after every test). Any process-level parallelism needs per-worker isolation of the Spark warehouse/metastore or per-worker schema names.

Proposed steps:

  1. Profile: pytest tests/impulse_reporting --durations=25 to confirm the hot spots.
  2. Quick win: split the reporting matrix entry into sub-path shards (integration vs unit). No code change.
  3. Bigger win: add pytest-xdist (-n auto) and make the spark fixture worker-aware so shared-state fixtures stop colliding.

Done when: reporting CI is well under 20m, with no coverage loss and no cross-worker state bleed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions