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

versioning idea #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions proto/self_serve/app/self_serve.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto3";

package self_serve.app;
Copy link
Member

Choose a reason for hiding this comment

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

JFYI putting v1 in the way it was before, is because protobuf linters suggest so. We are using buf which actually follows Google and FB best practices. I think we should stay on this path :/

Also, I think your concern is that we need to bump the version on every change. That's not the case. This v1 is only if we introduce breaking changes. We can add and augment the structs and messages here without changing the versions. The same for the enums. We just need to make sure that our clients are able to handle unknown states.


message AppSelfServeModeMessage {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not against this and I'm actually proposing the same here: 9df4605. Let's do it!

Copy link
Member Author

Choose a reason for hiding this comment

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

wrong commit hash? :D

oneof message {
StartCapture start_capture = 1;
RequestState request_state = 2;
}
}

message StartCapture {}
message RequestState {}
6 changes: 0 additions & 6 deletions proto/self_serve/app/v1/app.proto

This file was deleted.

21 changes: 21 additions & 0 deletions proto/self_serve/orb/orb.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
syntax = "proto3";

package self_serve.orb;

enum OrbMode {
ldulcic marked this conversation as resolved.
Show resolved Hide resolved
ORB_MODE_UNSPECIFIED = 0;
LEGACY = 1;
SELF_SERVE = 2;
}

enum OrbType {
ORB_TYPE_UNSPECIFIED = 0;
PEARL = 1;
DIAMOND = 2;
}

message OrbMetadata {
ldulcic marked this conversation as resolved.
Show resolved Hide resolved
string orb_id = 1;
OrbType orb_type = 2;
OrbMode orb_mode = 3;
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
syntax = "proto3";

package self_serve.orb.v1;
package self_serve.orb;

enum OrbMode {
ORB_MODE_UNSPECIFIED = 0;
LEGACY = 1;
SELF_SERVE = 2;
}

enum OrbType {
ORB_TYPE_UNSPECIFIED = 0;
PEARL = 1;
DIAMOND = 2;
message OrbSelfServeModeMessage {
oneof message {
NoState no_state = 1;
SelfServeStatus self_serve_status = 2;
CaptureStarted capture_started = 3;
CaptureTriggerTimeout capture_trigger_timeout = 4;
CaptureEnded capture_ended = 5;
SignupEnded signup_ended = 6;
AgeVerificationRequiredFromOperator age_verification_required_from_operator = 7;
}
}

message NoState {}
message SelfServeStatus {
bool is_self_serve_enabled = 1;
}
message AnnounceOrbId {
string orb_id = 1;
OrbType orb_type = 2;
OrbMode orb_mode = 3;
}
message CaptureStarted {}
message CaptureTriggerTimeout {}
message CaptureEnded {
Expand Down
Loading