Commit 52d3e7f
authored
fix: Add more verbose error for when partition and sorting key changes (#21265)
This improves the error message when migrating between plugin versions where sorting key or partition keys have changed. Before, the user was left guessing what changes were needed for certain tables.
### Before
```bash
cloudquery sync aws_to_clickhouse.yaml
Loading spec(s) from aws_to_clickhouse.yaml
Starting sync for: aws (cloudquery/aws@v32.37.1) -> [clickhouse (cloudquery/clickhouse@v7.3.1)]
Error: failed to sync v3 source aws: write client returned error (insert): plugin returned error:
Can't migrate tables automatically, migrate manually or consider using 'migrate_mode: forced'. Non auto migratable tables changes:
aws_ec2_instance_types:
- Column "placement_group_info" added with type "utf8"
- Column "test_column" with type "utf8" removed
- Not null constraint removed from column "v_cpu_info"
aws_eks_cluster_node_groups:
aws_elasticache_replication_groups:
aws_elbv1_load_balancers:
aws_elbv2_load_balancers:
aws_rds_clusters:
aws_rds_instances:
```
### After:
```bash
cloudquery sync aws_to_clickhouse.yaml
Loading spec(s) from aws_to_clickhouse.yaml
Starting sync for: aws (cloudquery/aws@v32.37.1) -> [clickhouse (local@/Users/herman/code/cloudquery/cloudquery/plugins/destination/clickhouse/clickhouse)]
Error: failed to sync v3 source aws: write client returned error (insert): plugin returned error:
Can't migrate tables automatically, migrate manually or consider using 'migrate_mode: forced'.
Non auto-migratable tables:
aws_ec2_instance_types:
- Column "placement_group_info" added with type "utf8"
- Column "test_column" with type "utf8" removed
- Not null constraint removed from column "v_cpu_info"
- Sorting key changed (was [supported_boot_modes,supported_root_device_types,supported_usage_classes,supported_virtualization_types,_cq_id] and would become [_cq_id])
aws_eks_cluster_node_groups:
- Sorting key changed (was [instance_types,subnets,_cq_id] and would become [_cq_id])
aws_elasticache_replication_groups:
- Sorting key changed (was [member_clusters,member_clusters_outpost_arns,user_group_ids,_cq_id] and would become [_cq_id])
aws_elbv1_load_balancers:
- Sorting key changed (was [availability_zones,security_groups,subnets,_cq_id] and would become [_cq_id])
aws_elbv2_load_balancers:
- Sorting key changed (was [security_groups,_cq_id] and would become [_cq_id])
aws_rds_clusters:
- Sorting key changed (was [availability_zones,custom_endpoints,enabled_cloudwatch_logs_exports,read_replica_identifiers,_cq_id] and would become [_cq_id])
aws_rds_instances:
- Sorting key changed (was [enabled_cloudwatch_logs_exports,read_replica_db_cluster_identifiers,read_replica_db_instance_identifiers,_cq_id] and would become [_cq_id])
```1 parent c993d03 commit 52d3e7f
1 file changed
Lines changed: 78 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
26 | 39 | | |
27 | 40 | | |
28 | 41 | | |
| |||
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
54 | | - | |
55 | | - | |
| 67 | + | |
| 68 | + | |
56 | 69 | | |
57 | | - | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
| |||
97 | 110 | | |
98 | 111 | | |
99 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
100 | 146 | | |
101 | 147 | | |
102 | 148 | | |
103 | 149 | | |
104 | 150 | | |
105 | 151 | | |
106 | 152 | | |
107 | | - | |
| 153 | + | |
108 | 154 | | |
109 | 155 | | |
110 | | - | |
| 156 | + | |
| 157 | + | |
111 | 158 | | |
112 | 159 | | |
113 | 160 | | |
114 | 161 | | |
115 | | - | |
| 162 | + | |
| 163 | + | |
116 | 164 | | |
117 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
118 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
119 | 183 | | |
120 | 184 | | |
121 | 185 | | |
| |||
125 | 189 | | |
126 | 190 | | |
127 | 191 | | |
| 192 | + | |
128 | 193 | | |
129 | 194 | | |
130 | 195 | | |
131 | 196 | | |
132 | 197 | | |
133 | 198 | | |
134 | | - | |
| 199 | + | |
135 | 200 | | |
136 | | - | |
| 201 | + | |
137 | 202 | | |
138 | 203 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 204 | + | |
| 205 | + | |
145 | 206 | | |
146 | 207 | | |
147 | | - | |
| 208 | + | |
148 | 209 | | |
149 | 210 | | |
150 | 211 | | |
| |||
0 commit comments