Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Attempt to launch plugin up to 3 times (#395)
#### Summary Fixes cloudquery/cloudquery-issues#2280 (internal issue). Sometimes plugins fail to launch the first time (we're not sure why, seems to be happening only on MacOS and for large plugins). Retrying the same binary works, so this PR implements that. Example logs: ``` 2024-08-26T08:48:08Z INF Loading spec(s) args=["examples/aws-postgres.yml"] invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli 2024-08-26T08:48:08Z DBG starting plugin attempt=1 invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli path=****** 2024-08-26T08:48:13Z INF Plugin server listening address=/var/folders/9s/pgf_fjl160j81k95zb5gm7vw0000gn/T/cq-VIAmPPIOcYreNayw.sock invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli 2024-08-26T08:48:13Z DBG failed to start plugin, retrying error="failed to run plugin ******: signal: killed" attempt=0 invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli 2024-08-26T08:48:14Z DBG starting plugin attempt=2 invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli path=****** 2024-08-26T08:48:14Z INF Plugin server listening address=/var/folders/9s/pgf_fjl160j81k95zb5gm7vw0000gn/T/cq-AscwEzGdxCtujUjO.sock invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli 2024-08-26T08:48:15Z DBG plugin started successfully attempt=2 invocation_id=4356ddcc-f66d-4231-bdcd-90d4e803adb5 module=cli path=****** ``` ---
- Loading branch information