-
Notifications
You must be signed in to change notification settings - Fork 517
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
Support multi-module releases in go-control-plane #714
base: main
Are you sure you want to change the base?
Conversation
7686dfb
to
12c81b1
Compare
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'm not familiar with go workspaces, but overall lgtm
Nice to see independent versioning through this though
|
||
go 1.20 | ||
|
||
replace github.com/envoyproxy/go-control-plane/envoy => ../envoy |
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.
My understanding from go.work
is that it should no longer be needed to add those replace commands
Is that actually not the case?
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 actually couldn't get go mod tidy to play nice without them. I can mess around with it a bit more but figured this was fine for 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.
I was able to drop the replace from ./envoy
but that one still complained so I left it in.
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.
Maybe this is an indication that we don't have the right structure? Since the "envoy" and "contrib" protobufs are bound to the same Envoy release, does it make sense to allow the possibility for a program to import different versions of them?
How hard would it be to move the contrib protobufs to "envoy/contrib"?
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.
And I suppose that a similar question arises for the "./ratelimit" directory.
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.
heres a branch of Contour using the above branch: https://github.com/sunjayBhatia/contour/tree/use-go-control-plane-multi-module
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.
(the above go-control-plane branch also copies the ratelimit
module to a package in the new api
module)
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.
so this branch of Contour works with this PR's branch (plus this commit sunjayBhatia@4be6f62): sunjayBhatia/contour@dc8fa81
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 think either approach will work just fine, though the upgrade/transition UX might be cleaner (no possibility for users complaining about ambiguous package paths if they are requiring mismatched versions) if the new modules have a new package path
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.
(the above go-control-plane branch also copies the
ratelimit
module to a package in the newapi
module)
I'll check later, but me recollection is that the ratelimit protos don't come from the envoy repository. So they probably need to be versioned differently and it might not make sense for them to be in the same module as the envoy api.
12c81b1
to
9ae8c06
Compare
contrib/go.mod
Outdated
@@ -0,0 +1,23 @@ | |||
module github.com/envoyproxy/go-control-plane/contrib | |||
|
|||
go 1.20 |
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.
JFYI, we should be prepared for some pushback on this. It's possible that some consumer of this module will be using earlier Go versions (see #271 for example).
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 can try and roll back to 1.18 but that is a bare minimum requirement for workspaces. Wondering if we should see if it's that problematic and roll back if people complain.
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.
+1 please don't use 1.20. In grpc-go, which uses this, we support 1.18+ and also haven't made any changes AFAIK that would prevent even 1.17 or maybe 1.16 from working (e.g. no use of any
or generics). IMO this (and the use of new language features) should stay at the oldest version you can reasonably handle supporting.
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.
@alecholmez it sounds like this is the most contentious point within this change set.
We probably want to do the same for |
0ab1e02
to
1b350d3
Compare
go.work
Outdated
@@ -0,0 +1,10 @@ | |||
go 1.20 |
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.
Sorry for the dumb question...what do go workspaces actually do for you? Someone wanted to add a go.work
file to our repo, but I didn't fully understand how it would help. We have several modules and don't use a workspace, and things generally work fine.
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 think they are more useful in local development etc. when you have modules side-by-side rather than a module hierarchy like we have here, you should mainly be able to remove the replace
directives but it doesn't seem (from my playing around with it as well) that we get that here because of the package/module structure
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.
e.g. to get the other modules in to actually use the toher modules in this repo all the way, had to do this: sunjayBhatia@4be6f62
so I'm not sure how much the workspace is getting us
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.
Is the decision to ultimately remove the workspace? I'm fine with that
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Hey all, been away for quite a while. Starting to catch back up on this project. Did we ever come to a consensus on the way forward here? I have some cycles I can spend to push this across so we can get onto a more regular release cycle. |
d3be1f4
to
671b920
Compare
go.work
Outdated
@@ -0,0 +1,10 @@ | |||
go 1.21 |
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.
Since this was discussed before but not resolved, and I see this PR was approved:
https://go.dev/ref/mod#go-work-file
It is generally inadvisable to commit go.work files into version control systems, for two reasons:
- A checked-in go.work file might override a developer’s own go.work file from a parent directory, causing confusion when their use directives don’t apply.
- A checked-in go.work file may cause a continuous integration (CI) system to select and thus test the wrong versions of a module’s dependencies. CI systems should generally not be allowed to use the go.work file so that they can test the behavior of the module as it would be used when required by other modules, where a go.work file within the module has no effect.
That said, there are some cases where committing a go.work file makes sense. For example, when the modules in a repository are developed exclusively with each other but not together with external modules, there may not be a reason the developer would want to use a different combination of modules in a workspace. In that case, the module author should ensure the individual modules are tested and released properly.
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.
And the related issue that ultimately led to this addition:
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 don’t mind seeing them removed.
By the way, help on multimodule release is welcome here
3325c95
to
d1ca98d
Compare
Concerning the multimodule publishing mecanism, has anyone considered using opentelemetry/multimod This seems to fit this use case |
f72de1d
to
3ad429a
Compare
Signed-off-by: Alec Holmes <[email protected]> Signed-off-by: Valerian Roche <[email protected]> Signed-off-by: Matthieu MOREL <[email protected]>
77e73b7
to
264890a
Compare
Signed-off-by: Matthieu MOREL <[email protected]>
264890a
to
952bc4c
Compare
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.
LGTM, can we set this PR as ready for review?
I believe we should be able to push on this now.
Thanks for all the work on this!
There is one last part to be added which is the prepare-release Or https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/Makefile#L413-L426 |
This PR introduces support for multi-module releases in go-control-plane following the plan of action outlined in issue #391.
A few things have happened:
./envoy
and./contrib
containing the generated go stubsbuild/
toscripts/
so we have a bucket for more general repo automationWhen this PR is merged, a tag will be cut at
v0.11.2
but a new tag will be introduced withenvoy/v1.26.2
. closes #391