Six Edits One Wire
A team edits a .proto that is already deployed. Old binaries will keep parsing messages written by new binaries for weeks.
message Order {
string id = 1;
int32 quantity = 2; // A: becomes int64 quantity = 2;
string coupon = 3; // B: renamed to string promo_code = 3;
string tag = 7; // C: becomes repeated string tags = 7;
bytes payload = 6; // D: becomes string payload = 6;
int32 status = 5; // E: moved into an existing oneof
string region = 4; // F: swapped with id, so region = 1 and id = 4
}
Select every edit that is safe on the wire. More than one is.
Sign in to answer questions and track your progress
Sign In