Comments (7)
Did a few discussions with folks about various risks and tradeoffs
The biggest concerns are around a gogo 2.0 that can't be ripped out easily.
This library is fundamentally different, and intentionally avoids this issue.
Calling looks like this: https://github.com/vitessio/vitess/blob/40f314c1d052db3fa5a52e5fb2ddd2bddaefde44/go/vt/servenv/grpc_codec.go#L40-L49, so there is no code changes required if its removed later. Theoretically you could break yourself, but you would have to use the library in a poor way to do so.
The original proto Go struct is unmodified.
From the internal protobuf side, I am not sure how much of the details I can discuss publicly, but there was not concerns in adoption of vtprotobuf.
from go-control-plane.
Calling looks like this: vitessio/vitess@40f314c/go/vt/servenv/grpc_codec.go#L40-L49, so there is no code changes
That's what calling code should look like. And what happens when an important project writes the equivalent of:
func (vtprotoCodec) Marshal(v any) ([]byte, error) {
return v.(vtprotoMessage).MarshalVT() // panics if the proto doesn't support vtprotoMessage
}
Removing vtproto would be a breaking change.
from go-control-plane.
Calling looks like this: vitessio/vitess@40f314c/go/vt/servenv/grpc_codec.go#L40-L49, so there is no code changes
That's what calling code should look like. And what happens when an important project writes the equivalent of:
func (vtprotoCodec) Marshal(v any) ([]byte, error) { return v.(vtprotoMessage).MarshalVT() // panics if the proto doesn't support vtprotoMessage }Removing vtproto would be a breaking change.
You can go down this rabbit hole with any API really. Someone can always use reflect
or unsafe
to pull out data from private fields, or other crazy shenanigans.
If someone goes out of there way to shoot themselves in the foot, I don't see any issue with breaking them -- it would be far less of a breaking change than go-control-plane has made numerous times over the years as well (not reason to do it again, but still).
Also see build tag discussion in envoyproxy/envoy#31172 (comment)
from go-control-plane.
These aren't private fields, and my example does not use reflection or unsafe. These are exported methods, and removing them is going to be seen as less "okay".
The issue with "just break people who do bad things" is: when you work for a big company (e.g. Google) and someone imports the project doing bad things into your codebase, you might not be able to upgrade your thing without fixing the people that did the bad things first.
If this can go in with a build flag that is opt-in instead of opt-out, that would probably remove all of my concerns.
from go-control-plane.
If this can go in with a build flag that is opt-in instead of opt-out, that would probably remove all of my concerns.
This is my plan, need to merge planetscale/vtprotobuf#122 first though
from go-control-plane.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
from go-control-plane.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
from go-control-plane.
Related Issues (20)
- Requesting support for alt-port in healthcheck HOT 1
- How to find the corresponding relationship between the plane and the supported Envoy versions HOT 3
- Improper use of chan leads to panic HOT 4
- For a given envoy commit, how to find the corresponding go control plane commit? HOT 6
- the resource order is not in line with the description in the xds doc HOT 1
- Go apis are currently being built by gcc
- Add MaxMind GeoIP Provider HOT 4
- Sync is now broken HOT 1
- Issue with Handling HttpConnectionManager as ConfigDiscovery HOT 3
- Outlier detection event log HOT 1
- Add support for async_fetch in remote_jwks in Request Authentication HOT 1
- sotw server impossible to send the eds configuration. HOT 3
- Release schedule for this project? HOT 8
- Support new xds protocol behavior regarding wildcard HOT 2
- This instruction no longer works -> https://github.com/envoyproxy/go-control-plane/blob/main/internal/example/README.md HOT 1
- Deadlock in Delta XDS if number of resources is more than 10 HOT 13
- Excessive Memory Consumption in EnvoyProxy During Continuous snapshot updates for the same node HOT 4
- Is it possible to create a static layer? HOT 3
- How to avoid deprecated warning message for regex matcher? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-control-plane.