-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make external API a separate module #4298
Conversation
Deploy preview for chef-automate ready! Built with commit 0f190e3 |
c1a8a73
to
38cb682
Compare
I wonder if this is a time to re-look at our vendoring in this repository. Having to re-vendor our own code anytime we make a change to it feels like it will trip people up regularly. |
@stevendanna you're suggesting that we stop vendoring, and rely completely on go modules instead? It has worked fine for the other project, I'd say. π |
.bldr.toml
Outdated
@@ -439,6 +439,7 @@ paths = [ | |||
"vendor/github.com/grpc-ecosystem/grpc-gateway/*", | |||
"vendor/github.com/grpc-ecosystem/grpc-opentracing/*", | |||
"vendor/github.com/hashicorp/hcl/*", | |||
"vendor/github.com/josharian/intern/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π€ I wonder how this got dragged in
I think we should consider it, yes. We started vendoring when using In my views, if we stop vendoring, the cons are:
The pros are:
|
Yeah, it's still in the I agree with your pros and cons there, thanks for summing this up. :) |
b927f2f
to
39d4223
Compare
Signed-off-by: Daniel DeLeo <dan@chef.io>
Signed-off-by: Daniel DeLeo <dan@chef.io>
39d4223
to
340a2b1
Compare
Signed-off-by: Daniel DeLeo <dan@chef.io>
340a2b1
to
1bac447
Compare
Signed-off-by: Daniel DeLeo <dan@chef.io>
Signed-off-by: Daniel DeLeo <dan@chef.io>
Update: in #4314 we have removed vendoring, so now this change is mostly transparent for an Automate developer. I checked that you can update a proto in api/external, compile it, and then use it right away (no need to revendor or git commit or anything). Updating deps that appear in both modules may be confusing, and I'm not sure what I could do about that (or rather, I would like to have some practical experience of the problem before attempting to fix). So I think this is ready to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything worked the same for me.
π© Description: What code changed, and why?
Make the api/external directory a separate golang module. When using golang modules, when you depend on any package within a module, you depend on that module and therefore also all of that module's dependencies. Currently all of Automate is one big module which is nice for our internal dependency management but for external users it means you have to take on a lot of deps even if you only intend to use a few structs from api/external directory.
At present the goal is to support a project that is integrating some Chef Workstation functionality with Chef Automate, but this would be helpful to anyone who wishes to write code using Automate's API in go.
βοΈ Related Resources
π Definition of Done
π How to Build and Test the Change
β Checklist
π· Screenshots, if applicable