Open nitrocode opened 1 year ago
Couple comments on the different approaches to plugins here:
golang's plugin system From my experience go's plugin system has a pretty major limitation that makes it very difficult to work with. Specifically, plugins must all be built from the exact same version of the go toolchain as the host system. If I am not mistaken, they also require that any package dependencies are versioned in lockstep between the plugin and host. This feels to me like it wouldn't be a great fit since it comes with most the same downsides of the code living in the same repository.
separate golang modules This is definitely the closest approach to the current structure. My only concern here is that this doesn't quite get us to the stated goals. It would reduce the LOC in atlantis true and, by virtue of the VCS specific tests moving to their repos with them, would reduce the test run time. The module code would still ultimately need to be included in the atlantis build and not have any real impact on build times for Atlantis itself. In some respects this also makes the prospect of including custom VCS providers a bit more of a black box than they are currently. (As it is now just a version bump and likely a include _ at the root of the Atlantis server)
go-plugin Since this creates a true process boundary between plugin and host, it seems to be the most in line with the stated goals. This is also most likely the biggest change for atlantis users as we will need to come up with a method of finding and "installing" these plugins. This could be as simple as a known location on disk to scan on startup, and we could likely make this change transparent to customers by including the current, in-tree, plugins in our docker images. Anyone who is just consuming the Atlantis binary we release directly would need an outlined upgrade path laid out for them to not be broken by this type of change.
My 2c - embracing go-plugin is the way to go here
Community Note
Describe the user story
It would be nice to separate VCS code from this repo using a plugin based architecture.
This has been successful in projects such as terraform and tflint.
This would give us the following benefits
atlantis
repoatlantis
github
,gitlab
,bitbucket
,azuredevops
, etc into its own reposDescribe the solution you'd like
github
runatlantis
orgatlantis
Describe the drawbacks of your solution
Some effort
Describe alternatives you've considered
Do nothing (status quo)