Loading
Test ClickHouse 25.1 and fix compatibility regressions
What does this MR do and why?
Runs the existing ClickHouse 25.x CI lane on 25.1.8.25 instead of 25.12.3, retaining the 26.x lane. This covers the oldest minor in our documented 25.x support range.
Fixes the compatibility failures this exposed:
- Cast TTL expressions to
DateTimeforsiphon_internal_events,query_log_usage, andmerge_requests_base. Correct the original migrations for fresh installations and add forward migrations for existing tables, with automatic TTL materialization disabled. - Normalize aggregation boolean results so integer
0becomesfalsein GraphQL. Database specs also cast returned values to Ruby booleans. - Regenerate schema/cache artifacts on 25.1, including its
Nullengine quoting.
Stored column types and retention periods remain unchanged. Rollbacks retain the compatible TTL expressions.
References
Closes #630182 (closed)
- Compatibility finding
- Original Siphon migration
- TTL compatibility discussion
- Supported ClickHouse versions
Screenshots or screen recordings
Not applicable: backend and CI changes.
How to set up and validate locally
Configure config/click_house.yml's test connection to a fresh, isolated ClickHouse 25.1.8.25 instance. Run:
bundle exec rspec spec/db/click_house/migrate/ttl_compatibility_spec.rb --tag click_house
bundle exec rspec spec/lib/gitlab/database/aggregation/click_house/part_definition_spec.rbRepeat against a current ClickHouse version.
Local checks passed:
- 25.1.8.25: fresh migrations, 466 selected ClickHouse examples, and 148 GraphQL examples.
- 25.12.11.4: 20 affected database examples and 45 merge-request GraphQL examples.
- Both versions: all 11 affected database examples passed again after replacing numeric assertions with boolean casts.
- Upgrade path: all three original TTL expressions upgraded on 25.12, preserving rows without creating mutations.
- Seven boolean unit examples, RuboCop, YAML parsing, migration markers, and whitespace checks passed.
MR acceptance checklist
Evaluate against the MR acceptance checklist. Local validation is complete; remote CI is pending. No jobs are added.
Edited by Pedro Pombeiro (OOO from Oct 12th-23th)