Commit bfdae6c
authored
allow ignoring partition by diff (#2946)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Adds partition-by-aware table diffs and normalization-based ignoring
(TTL/partition_by) wired through planning, admin/remote plan, and
migration; updates APIs/types and tests accordingly.
>
> - **Core infra map/diffing**:
> - Add `PartitionByChange`; include in `TableChange::Updated` and
`TableDiffStrategy::diff_table_update`.
> - Extend simple/table diffs to compute and carry
`partition_by_change`.
> - `diff_with_table_strategy(...)` now accepts `ignore_ops` and
normalizes tables before comparison.
> - **ClickHouse integration**:
> - Add `IgnorableOperation::ModifyPartitionBy` and
`normalize_table_for_diff` to strip ignored fields (table TTL, column
TTL, partition_by).
> - Update `diff_strategy` to take `partition_by_change` and trigger
drop+create on partition-by changes; add tests.
> - **Planning/CLI**:
> - Pass `ignore_ops` from project config (prod) into diffs in `plan.rs`
and admin `/admin/plan`.
> - Client-side `calculate_plan_diff_local(...)` accepts `ignore_ops`;
remote plan/migration paths updated accordingly.
> - Drift detection (`migrate.rs`) strips metadata and ignored fields
via normalization.
> - Remove prior operation-level ignore filtering from `MigrationPlan`
(and related tests).
> - **Webserver**:
> - Use `clickhouse::{create_client, check_ready}`; minor
health/ready/reality-check refactors.
> - **Tests**:
> - Update signatures/usages across tests; add tests for normalization
and partition-by behavior.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
ff98322. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 57bc05c commit bfdae6c
File tree
9 files changed
+605
-448
lines changed- apps/framework-cli/src
- cli
- routines
- framework/core
- infrastructure
- olap
- clickhouse
9 files changed
+605
-448
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
854 | | - | |
855 | | - | |
| 853 | + | |
856 | 854 | | |
857 | 855 | | |
858 | 856 | | |
| |||
910 | 908 | | |
911 | 909 | | |
912 | 910 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
| 911 | + | |
| 912 | + | |
917 | 913 | | |
918 | 914 | | |
919 | 915 | | |
| |||
999 | 995 | | |
1000 | 996 | | |
1001 | 997 | | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
| 998 | + | |
1005 | 999 | | |
1006 | 1000 | | |
1007 | 1001 | | |
| |||
3119 | 3113 | | |
3120 | 3114 | | |
3121 | 3115 | | |
3122 | | - | |
3123 | | - | |
| 3116 | + | |
3124 | 3117 | | |
3125 | 3118 | | |
3126 | 3119 | | |
| |||
3352 | 3345 | | |
3353 | 3346 | | |
3354 | 3347 | | |
3355 | | - | |
3356 | | - | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
3357 | 3354 | | |
3358 | 3355 | | |
3359 | 3356 | | |
3360 | 3357 | | |
3361 | 3358 | | |
| 3359 | + | |
3362 | 3360 | | |
3363 | 3361 | | |
3364 | 3362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
868 | 869 | | |
869 | 870 | | |
870 | 871 | | |
| 872 | + | |
871 | 873 | | |
872 | 874 | | |
873 | 875 | | |
874 | 876 | | |
875 | 877 | | |
876 | | - | |
| 878 | + | |
877 | 879 | | |
878 | 880 | | |
879 | 881 | | |
| |||
1056 | 1058 | | |
1057 | 1059 | | |
1058 | 1060 | | |
1059 | | - | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1060 | 1066 | | |
1061 | 1067 | | |
1062 | 1068 | | |
| |||
1149 | 1155 | | |
1150 | 1156 | | |
1151 | 1157 | | |
1152 | | - | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1153 | 1163 | | |
1154 | 1164 | | |
1155 | 1165 | | |
| |||
1159 | 1169 | | |
1160 | 1170 | | |
1161 | 1171 | | |
1162 | | - | |
| 1172 | + | |
1163 | 1173 | | |
1164 | 1174 | | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | 1175 | | |
1169 | 1176 | | |
1170 | 1177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
0 commit comments