swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

proto: Consistent enums

Open aluzzardi opened this issue 10 years ago • 3 comments

We have a few inconsistencies in our various enums.

We should make sure they all conform to our reference TaskState:

enum Foo {
        option (gogoproto.goproto_enum_prefix) = false;
        option (gogoproto.enum_customname) = "Foo";
        BAR = 0 [(gogoproto.enumvalue_customname)="FooBar"];
}

Some of our enums don't use the right set of gogo options while others use FOO_BAR rather than BAR.

/cc @docker/fiesta-cucaracha-maintainers

aluzzardi avatar Apr 22 '16 05:04 aluzzardi

@aluzzardi My recommendations here are the following:

  1. All Enum values should have enumvalue_customname.
  2. All Enums should have goproto_enum_prefix = false.
  3. Protobuf enum values should be namespaced in a consistent manner.

stevvooe avatar Apr 27 '16 17:04 stevvooe

This is a backward compatible change - tentatively setting it as P3/1.13

/cc @stevvooe

aluzzardi avatar Aug 04 '16 20:08 aluzzardi

Thanks for opening this issue. We haven’t seen any recent activity, so I’m closing it for now.

If it’s still relevant, feel free to reopen it or open a new issue with additional details. Thanks!

smerkviladze avatar May 04 '26 13:05 smerkviladze