feat(fastly): Migrate codegen to transformations#6470
Conversation
This PR has the following changes to source plugin(s) tables:
|
| @@ -1,175 +0,0 @@ | |||
| package services | |||
There was a problem hiding this comment.
I think this file is useful but it can be made part of the make gen-mocks command.
As an aside (not for this PR), I'm also thinking it would be good to move these to the SDK at some point, with it being used in quite a few plugins now I think we can see how it can be generalized. That would reduce the amount of code for this specific plugin as well.
There was a problem hiding this comment.
We can also discuss this live but I looked a bit at the services codegen again and it seems that it is not a lot of work to add a new interface for each table we develop. I think "codegen based development" is a real barrier to entry for developers and if it doesn't provide the 5,10x speed I would skip this completely.
There was a problem hiding this comment.
I very strongly disagree here - most of the time a new plugin author needs to do it only once when setting up the plugin, and after that (if you used the automation) it rarely needs to be changed again. So it shouldn't be a barrier to adding new tables or contribution in general (in fact, the opposite). It's far, far less work to point to one struct and say "generate the interface for it" than it is to copy-paste every relevant function on that struct, modify all the import paths appropriately, and then make sure the mockgen comments for it are correct as well.
There was a problem hiding this comment.
I would add that auto generating the interfaces ensures that when we update dependencies those get auto updated as well
There was a problem hiding this comment.
I chatted with @yevgenypats about this; we agreed to move the interface generation functionality to the plugin SDK for those plugins that use mockgen tests and have complex enough clients to justify it.
🤖 I have created a release *beep* *boop* --- ## [1.1.0](plugins-source-fastly-v1.0.1...plugins-source-fastly-v1.1.0) (2023-01-10) ### Features * **fastly:** Migrate codegen to transformations ([#6470](#6470)) ([60c0f14](60c0f14)) ### Bug Fixes * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.18.0 ([#6339](#6339)) ([158365a](158365a)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.19.0 ([#6363](#6363)) ([ae6967c](ae6967c)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.20.0 ([#6376](#6376)) ([d6187ec](d6187ec)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.21.0 ([#6382](#6382)) ([5baea40](5baea40)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.22.0 ([#6516](#6516)) ([b7e4e73](b7e4e73)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.23.0 ([#6522](#6522)) ([ce24f1d](ce24f1d)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.24.1 ([#6553](#6553)) ([392b848](392b848)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
No description provided.