Commit 9510f5e
authored
fix: Don't call Tables gRPC method at the beginning of the sync (#21180)
#### Summary
Since this PR https://github.com/cloudquery/cloudquery/pull/20909/files the S3 source plugin fails to sync and result in the following error `failed to get tables: tables only discovered during sync`.
The reason is that the S3 source dynamically discovers all files/tables during the sync, and errors out if you call the tables endpoint before the sync is done, see https://github.com/cloudquery/cloudquery-private/blob/334760529da4815dc83659c7f529154682b2c8a0/plugins/source/s3/resources/plugin/client.go#L91
Instead of calling the tables endpoint we can keep track of the tables during the sync. This works even if you pass `--no-migrate` since we skip those a bit after the new code https://github.com/cloudquery/cloudquery/blob/7b5980236005db31be536f4ffd2c390752f12309/cli/cmd/sync_v3.go#L6001 parent 7b59802 commit 9510f5e
2 files changed
Lines changed: 19 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | 360 | | |
377 | 361 | | |
378 | 362 | | |
| |||
491 | 475 | | |
492 | 476 | | |
493 | 477 | | |
| 478 | + | |
| 479 | + | |
494 | 480 | | |
495 | 481 | | |
496 | 482 | | |
| |||
518 | 504 | | |
519 | 505 | | |
520 | 506 | | |
| 507 | + | |
521 | 508 | | |
522 | 509 | | |
523 | 510 | | |
| |||
591 | 578 | | |
592 | 579 | | |
593 | 580 | | |
| 581 | + | |
594 | 582 | | |
595 | 583 | | |
596 | 584 | | |
| |||
664 | 652 | | |
665 | 653 | | |
666 | 654 | | |
| 655 | + | |
| 656 | + | |
667 | 657 | | |
668 | 658 | | |
669 | 659 | | |
| |||
674 | 664 | | |
675 | 665 | | |
676 | 666 | | |
677 | | - | |
| 667 | + | |
678 | 668 | | |
679 | 669 | | |
680 | 670 | | |
681 | 671 | | |
682 | 672 | | |
683 | 673 | | |
684 | | - | |
| 674 | + | |
685 | 675 | | |
686 | 676 | | |
687 | 677 | | |
688 | | - | |
| 678 | + | |
689 | 679 | | |
690 | 680 | | |
691 | 681 | | |
| |||
0 commit comments