Skip to content
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

Wrap types to prepare for the Any type #30

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Conversation

andronat
Copy link
Member

@andronat andronat commented Oct 3, 2024

No description provided.

@@ -112,7 +112,6 @@ message RelayPayload {
self_serve.orb.v1.AgeVerificationRequiredFromOperator age_verification_required_from_operator = 14;
self_serve.app.v1.StartCapture start_capture = 15;
self_serve.app.v1.RequestState request_state = 16;
self_serve.orb.v1.SelfServeStatus self_serve_status = 17;
self_serve.orb.v1.NoState no_state = 18;
Copy link
Contributor

@paulquinn00 paulquinn00 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im a bit torn if the Any field should be inside the oneof at this moment. When we move fully to using the any_payload field we will want to remove the oneof completely and have the any_payload remain alone (is this agreeable to all?).

I believe doing this is not a breaking change so it may not be urgent, but there are side-effects: https://stackoverflow.com/questions/72746051/do-oneof-fields-show-up-on-the-wire-is-it-safe-to-move-a-field-out-of-a-oneof

One nit for hygiene is to number the any_payload field to be 100 (or any number outside the range used in the oneof) so we can cleanly reserve those old field numbers when the oneof goes away.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree and I have further changes later on. But I wanted to break this down to smaller, easier to review steps. Here is how I envision the final message: 164632d

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the preview. I like it!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also like the preview, that would be my choice also

@@ -112,7 +112,6 @@ message RelayPayload {
self_serve.orb.v1.AgeVerificationRequiredFromOperator age_verification_required_from_operator = 14;
self_serve.app.v1.StartCapture start_capture = 15;
self_serve.app.v1.RequestState request_state = 16;
self_serve.orb.v1.SelfServeStatus self_serve_status = 17;
self_serve.orb.v1.NoState no_state = 18;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the preview. I like it!

@andronat andronat enabled auto-merge (squash) October 3, 2024 19:26
@andronat andronat merged commit cf85e80 into main Oct 3, 2024
10 checks passed
@andronat andronat deleted the andronat/wrap-types branch October 3, 2024 19:27
@ldulcic ldulcic mentioned this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants