fix: Only call newExecutionClient if needed#630
fix: Only call newExecutionClient if needed#630kodiakhq[bot] merged 2 commits intocloudquery:mainfrom
newExecutionClient if needed#630Conversation
⏱️ Benchmark results
|
yevgenypats
left a comment
There was a problem hiding this comment.
Looks good. Seems we need to add then the same workaround for GetDynamicTables. and use GetTablesForSpec in GetDynamicTables. Im also not a fan of this fix but I guess that's fine for now. basically it doesn make sense to authenticate to migrate in a way but yeah if dynamic_tables is nil then in theory this shouldn't be needed so that's the only workaround possible actually
Can you explain this a bit? Not sure I got it, |
yevgenypats
left a comment
There was a problem hiding this comment.
I see. I think it's good then. I missed it in the GitHub UI, sorry.
🤖 I have created a release *beep* *boop* --- ## [1.30.0](v1.29.0...v1.30.0) (2023-01-26) ### Features * **destination:** Filter the duplicate primary keys prior to writing batch ([#629](#629)) ([505709e](505709e)), closes [#627](#627) ### Bug Fixes * Ignore env variables in comments ([#625](#625)) ([08bace8](08bace8)) * Only call `newExecutionClient` if needed ([#630](#630)) ([ece947f](ece947f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Summary
This is more of hot fix/patch to #610.
#610 had an unwanted side effect on the migrate command, as now we init the plugin before running it.
initializing the plugin is expensive, requires credentials and does a whole lot of validations, for example:
https://github.com/cloudquery/cloudquery/blob/a06139efad9a2e8de14f186a223222c9d52ce58a/plugins/source/aws/client/client.go#L383
https://github.com/cloudquery/cloudquery/blob/a06139efad9a2e8de14f186a223222c9d52ce58a/plugins/source/azure/client/client.go#L124
Those seem unnecessary for tables migration (unless one uses dynamic tables).
Use the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)