Move Hasura/GraphQL e2e tests to dedicated e2e suite - #1523
Conversation
The two MockIndexer tests that queried GraphQL asserted how Hasura serves the generated DDL, not indexer behaviour, and forced a Hasura service into the scenarios-test CI job for their sake alone. Both move to the e2e suite, which already runs a real indexer behind Hasura: - numeric arrays: NUMERIC[] columns are created as TEXT[] so Hasura serves the elements as strings. The e2e_test scenario gains a NumericArrays entity whose values sit beyond float64 precision, so a regression changes the digits rather than only the type. - _meta / chain_metadata: events_processed is cast to float4 in both views so Hasura returns a number instead of stringifying it. The e2e suite now skips when Docker is unavailable, keeping a local run usable, and hard-fails instead of skipping when CI is set. MockIndexer loses its enableHasura/graphql plumbing and always initialises storage without Hasura, and the scenarios-test job drops the Hasura service.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughThe changes move numeric precision and metadata coverage to the E2E suite. Scenario tests no longer configure Hasura. The scenarios CI job now requires PostgreSQL only, while Docker availability controls local E2E execution. ChangesNumeric E2E coverage
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Consolidates Hasura and GraphQL integration testing into the dedicated e2e test suite (
packages/e2e-tests), removing it from the scenario tests that now run without Hasura.Summary
The scenario tests (
scenarios/test_codegen) previously required both Postgres and Hasura to run. This change moves Hasura-specific tests to the e2e suite where they belong alongside ClickHouse integration, and removes the Hasura dependency from the scenario test CI job. The scenario tests now run faster (~1.9s per indexer) by not initializing Hasura tracking.Key Changes
e2e test suite (
packages/e2e-tests):NUMERIC[]columns are served as strings by Hasura to preserve precision on large values_metaandchain_metadataviews: verifiesevents_processedis returned as a number (float4 cast) with expected precision lossScenario tests (
scenarios/test_codegen):~enableHasuraparameter fromMockIndexer.Indexer.make()— now always disables Hasuragraphqlmethod from mock indexer (no longer needed without Hasura)Async.itSkipInClaudeCloudhelper (no longer used)CI workflow (
build_and_verify.yml):scenarios-testjobTest scenario (
scenarios/e2e_test):NumericArraysentity to schema withBigIntandBigDecimalarray fieldsImplementation Details
The Docker availability check uses
execFile("docker", ["info"])with a 15-second timeout. In CI environments (detected viaprocess.env.CI), an unavailable Docker daemon throws an error rather than skipping, ensuring broken infrastructure is caught immediately. Locally, tests skip gracefully, keepingpnpm testusable on machines without Docker.Test data for numeric arrays uses values specifically chosen to exceed float64 precision (e.g.,
9007199254740993n,1000000000000000000000000000n) so any regression that allows Hasura to serve these as numbers would change the actual digits, not just the type.https://claude.ai/code/session_01Pp1W67qx9M3BbgPzsEG3H2
Summary by CodeRabbit
New Features
Bug Fixes