Commit 0474b9f
authored
fix: Fix Transform hang in CLI sync (#2001)
When CLI runs sync_v3 and a transformer is in the spec, if the
transformer errors at transform time, the CLI can hang forever.
This fix makes sure that the `.Transform()` function always returns
after an error.
Tested 20 times:
```bash
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: EOF
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
Loading spec(s) from cmd/testdata/transformer-errors.yml
Starting sync for: test (cloudquery/[email protected]) -> [test (cloudquery/[email protected])]
Error: failed to sync v3 source test: rpc error: code = Internal desc = failing at the transformer stage according to spec requirements
exit status 1
```1 parent 88a7833 commit 0474b9f
File tree
2 files changed
+29
-29
lines changed- internal/servers/plugin/v3
- plugin
2 files changed
+29
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
415 | 413 | | |
416 | 414 | | |
417 | 415 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
422 | 420 | | |
423 | 421 | | |
424 | 422 | | |
| |||
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
445 | 437 | | |
446 | 438 | | |
| 439 | + | |
447 | 440 | | |
448 | 441 | | |
449 | 442 | | |
| |||
463 | 456 | | |
464 | 457 | | |
465 | 458 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
| 459 | + | |
470 | 460 | | |
471 | 461 | | |
472 | 462 | | |
473 | 463 | | |
474 | 464 | | |
475 | 465 | | |
476 | 466 | | |
477 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
478 | 476 | | |
479 | 477 | | |
480 | 478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
0 commit comments