xDS: oneof needs to be discouraged
- Dominant language
- C++
- Stars
- 28.9k
- Forks
- 5.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 428
Description
*Title*: xDS: oneof needs to be discouraged
*Description*:
Say there's a oneof field with 2 entries, and a new entry (entry3) is added.
An xDS-server cannot send back entry3, because an old client won't know what to do with it, and may reject the config.
The proposal is to discourage the use of `oneof` in the API, and to allow a server to send two entries, while defining some prioritization between the fields (e.g., if entry2 and entry3 are set, the client will prefer using entry3 if it supports it).
The following needs to be done:
- [X] Update the style-guide to discourage oneof use (#30851).
- [ ] Add tooling to make sure oneofs aren't updated.
- [ ] Add tooling to simplify prioritization decleration.
- [ ] Improve docs to clarify "oneof" prioritization.
Contributor guide
Assessment
This issue has not been assessed yet.