-
Notifications
You must be signed in to change notification settings - Fork 70
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
Stable release of Go generated protos #2
Comments
@dfawley what do we need to do to make this "stable"? Is it just a release tag that is v1.0.0? I'm not sure why Go doesn't work with < v1.0.0 here, but we can probably do a v1.0.0 and iterate. https://github.com/cncf/xds is now live and the canonical xDS-WG repo. |
Yes, exactly!
Everything technically works fine without a v1 release. This is purely symbolic -- releasing v1 is a signal that the APIs are stable, and that the owners will not break backward compatibility. |
not sure if i follow entirely - but im wondering if a release is created should it not be the version number of the api - ie |
nm - ignore me - this is xds version not envoy's api version |
Exactly. This repo can be at v1 and could eventually have envoy/xds v4-v7 protos in it as well as v3. |
@markdroth @mattklein123 @lizan are you happy with cutting v1 from this repo? If so I can push the button. |
Assuming that we're really treating this just as a checkpoint tag for build-dependency purposes, I think this is fine. Before we would do any sort of really public release, I'd want to finish renaming the protos in the udpa tree to the xds tree. But that seems like not an issue here, so let's not block on it. |
I don't have a strong opinion either, as long as per @markdroth we aren't locking ourselves into anything we can't change. If it's an arbitrary point in time for "reasons" that's fine with me. |
My understanding is that tagging v1 means we are not going to make any semver incompatible changes. If we do, we would need to release as v2 (or v3, v4, etc..) which has impacts on consumers: https://blog.golang.org/v2-go-modules. So the ask here is not just tagging it as v1, but also committing to semver backwards compatibility |
If we're really committing to not making any backward-incompatible changes at this point, then I would like to see us move the protos from the udpa tree to the xds tree before tagging v1. |
Technically Go wouldn't care about the protos themselves being moved, but that would affect the generated code. If the generated code moves from its current location, you will break our users. We currently depend upon: github.com/cncf/udpa/go/udpa/data/orca/v1 |
@markdroth the APIs are already subject to https://github.com/envoyproxy/envoy/blob/main/api/API_VERSIONING.md. At the very least, https://github.com/cncf/udpa/blob/main/udpa/type/v1/typed_struct.proto can't be moved in a breaking way. Annotations can be debated, and ORCA we can probably break as nobody is using it in production as far as anyone knows.. |
At minimum, it seems like we should copy the protos in the udpa tree into the xds tree and tell people to start using those, even if the ones in the udpa tree need to stick around for backward-compatibility. It would be nice if there was a reasonable way to maybe have the ones in the udpa tree be auto-generated from the ones in the xds tree, so that we have only one copy to maintain. |
While no one may be using ORCA in production, grpc-go uses the generated protos in several places. C and Java also use ORCA, but they generate their own protos so there is less concern about breakage being caused by a (re)move. Should we remove all our code that depends upon it? |
No, we shouldn't remove the code that uses ORCA -- we are going to need that functionality. But once we have the protos in the new locations, we should update our code to use those new locations. |
We can copy them to a new location here and update our existing code to reference it. Do we ever need to delete the old generated code (within a year or two)? If not, I think we'll be fine with that. |
(Sorry, hit the wrong button.) Doug, if we copy them to a new location before we tag v1, and we update our current code to use v1 and use the new locations, then why would it matter if we later remove the old locations? Or are you concerned about other users that may be using the old locations? |
If someone is using an old release of gRPC-Go that references the deleted things, their build can break when those things are removed if:
|
When you say "the UDPA repo", I assume you actually mean cncf/xds. I don't think we should be worried about deleting the whole repo. I don't think we're going to plan to do that, and if we were, tagging a v1 in the repo probably wouldn't help anyway. :) Since the second case you mentioned can be mitigated, it sounds like there's no real problem here? |
If we do things right we should be okay for ORCA, but we will need to coordinate things carefully. I don't think we can move the typed struct proto to xds unless it's done in a major envoy version bump, as @htuch was implying. |
Yeah, we can't move at least typed struct, so we can't kill this udpa tree until the next major version bump. ORCA can move. The only discretionary thing is annotations. I think it's safe to just change them in Envoy, in particular if we maintain the same extension IDs, but my intuition is sometimes broken when it comes to the complexities around backwards breaking changes across things like proto language bindings. Anyway, I don't feel super strongly one way or the other. @markdroth I think you get to set the plan here as long as we don't break typed struct. |
Friendly ping @markdroth. What should we do before declaring 1.0? :) |
Are there any blockers before releasing v1? |
Here's my proposal:
Thoughts...? |
@markdroth sounds like a plan to me. Since we never reference |
It occurs to me that we probably won't be able to actually completely remove |
fix #8631: 1. import udpa protos form new git repo `https://github.com/cncf/xds.git` instead of `https://github.com/cncf/udpa.git` 2. use proto from xds directory not udpa directory in `https://github.com/cncf/xds.git`, details was here cncf/xds#2 (comment) 3. support both versions of TypeStruct 4. remove v1 orca service in old directory and use the new one v3, and refer to v3 in ORCA related area
Anyone writing a Go application that wishes to use Envoy protos will need a stable release of this repo. In case you are not aware, proto definitions cannot be generated independently by libraries, since multiple versions of the generated code for a single message that make their way into the same binary will cause a panic at init time. And without a stability guarantee, use of this repo as the official source of the protos is risky. Please create a stable v1.x release of this repo ASAP. Thank you.
Related to cncf/udpa#42 and envoyproxy/go-control-plane#391.
cc @htuch
The text was updated successfully, but these errors were encountered: