test(testing-drivers): isolate pre-aggregations schema per run to fix shared-cloud races#11151
Conversation
… shared-cloud races Parallel CI legs (use_tesseract_sql_planner false/true) for the same shared-cloud database pointed at the same hardcoded pre-aggregations schema, so they raced building, refreshing, and dropping the same pre-agg tables non-deterministically (confirmed on BigQuery; athena and databricks-jdbc have the identical latent race). Make the schema overridable via docker-compose interpolation, defaulting to each fixture's existing value so local/other runs are unaffected. The companion cube-runtime workflow sets DRIVERS_TESTS_CUBEJS_PRE_AGGREGATIONS_SCHEMA per matrix leg so each concurrent leg gets its own pre-aggregations schema. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MhpNg5eCmC34941RWYvnw
|
Claude finished @paveltiunov's task in 25s —— View job Code ReviewVerdict: LGTM ✅ — Targeted, minimal fix. 0 high, 0 medium, 1 low. DetailsSummaryThe change swaps a hardcoded Correctness
Low-severity observations
TestingNo unit-test changes needed — this is CI infra. Validation is the green/non-flaky CI matrix itself. |
Redshift also runs the use_tesseract_sql_planner false/true matrix against the same cloud cluster and shared export bucket, but had no explicit CUBEJS_PRE_AGGREGATIONS_SCHEMA, so both legs fell back to the same default schema and raced on the same pre-agg tables. Add the overridable schema (default dev_pre_aggregations) so each concurrent leg gets its own pre-aggregations schema via DRIVERS_TESTS_CUBEJS_PRE_AGGREGATIONS_SCHEMA. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015MhpNg5eCmC34941RWYvnw
|
Claude finished @paveltiunov's task in 28s —— View job Code ReviewVerdict: LGTM ✅ — Minimal, targeted CI fix. 0 high, 0 medium, 1 low. Details
SummaryThis iteration extends the original fix (athena/bigquery/databricks-jdbc) to redshift, which was previously inheriting whatever default Correctness
Security / Performance
Low
TestingCI-infra change; validation is a green non-flaky matrix. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11151 +/- ##
===========================================
- Coverage 79.18% 58.80% -20.38%
===========================================
Files 474 217 -257
Lines 96895 17511 -79384
Branches 3563 3563
===========================================
- Hits 76727 10298 -66429
+ Misses 19650 6695 -12955
Partials 518 518
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…e env
The fixture env pre-pass in runEnvironment resolved only bare ${VAR} and
treated the whole inner string as the variable name, so the new
${DRIVERS_TESTS_CUBEJS_PRE_AGGREGATIONS_SCHEMA:-dev_pre_aggregations}
values threw 'Env variable ...:-dev_pre_aggregations must be defined' and
failed every shared-cloud driver test.
Parse an optional ':-default' suffix (docker-compose semantics): use the
env var when set, otherwise the default. Bare ${VAR} still throws when
undefined, preserving required-secret validation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015MhpNg5eCmC34941RWYvnw
|
Claude finished @paveltiunov's task in 48s —— View job Code ReviewVerdict: LGTM ✅ — 0 high, 0 medium, 2 low. Details
SummaryNew commit Correctness —
|
|
@claude Question, does anyone setup |
|
Claude finished @ovr's task in 46s —— View job AnswerShort version: It is not referenced anywhere under Where it's supposed to be setPer this PR's description, the value is set by the companion For comparison, the analogous knob that is wired up in this repo is
- name: Run tests
...
env:
DRIVERS_TESTS_CUBEJS_TRANSPILATION_NATIVE: false
DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner) || matrix.use_tesseract_sql_planner }}
Practical implications
If you'd like, I can add a |
Parallel CI legs (use_tesseract_sql_planner false/true) for the same
shared-cloud database pointed at the same hardcoded pre-aggregations
schema, so they raced building, refreshing, and dropping the same
pre-agg tables non-deterministically (confirmed on BigQuery; athena and
databricks-jdbc have the identical latent race).
Make the schema overridable via docker-compose interpolation, defaulting
to each fixture's existing value so local/other runs are unaffected. The
companion cube-runtime workflow sets
DRIVERS_TESTS_CUBEJS_PRE_AGGREGATIONS_SCHEMA per matrix leg so each
concurrent leg gets its own pre-aggregations schema.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015MhpNg5eCmC34941RWYvnw