scionproto / scion

SCION Internet Architecture
https://scion.org
Apache License 2.0
379 stars 159 forks source link

daemon: Encode service strings using enumerations in protobufs #3939

Open scrye opened 3 years ago

scrye commented 3 years ago

In https://github.com/scionproto/scion/pull/3938 a non-obvious protocol-breaking change was introduced in the Daemon API: the string names of services for the Service Information RPC call were changed. While servers and clients compiled on the same version would be able to interact, older clients would no longer be able to talk to newer daemons.

The root cause is more fundamental: because we use the string protobuf type for the service names (in a map, see here), clients and servers can freely change their interpretations in incompatible ways. To prevent this, we should encode the services as enumerations in the protobuf definition. This will ensure we have an easy way to deploy forwards/backwards compatible clients/servers, and will also make it very clear if we ever are forced into a breaking change.

See here for recommendations on how to add enumerations.

matzf commented 1 year ago

Some folks have signaled approval by thumbs-upping this proposal, and no objections have been raised. The the final comment period of 10 days for this proposal starts now. If no objections are raised during this period, this proposal will be accepted.

matzf commented 1 year ago

No objections have been raised, so this proposal is accepted.

A more detailed design document is not required for this proposal, PRs for the implementation can be contributed directly.