You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/04/25 23:15:29 UTC

[13/24] mesos git commit: Updated FrameworkInfo::Capability::Type enum for upgradability.

Updated FrameworkInfo::Capability::Type enum for upgradability.

Review: https://reviews.apache.org/r/45151


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e9f7426d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e9f7426d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e9f7426d

Branch: refs/heads/0.28.x
Commit: e9f7426dddbe899d73eb13ba28faf4cb534d82fd
Parents: 2b1e16c
Author: Benjamin Mahler <bm...@apache.org>
Authored: Mon Mar 21 22:58:20 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Tue Apr 5 15:14:37 2016 -0700

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 9 ++++++++-
 include/mesos/v1/mesos.proto | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e9f7426d/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 3d22ec3..5fd034c 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -258,6 +258,12 @@ message FrameworkInfo {
 
   message Capability {
     enum Type {
+      // This must be the first enum value in this list, to
+      // ensure that if 'type' is not set, the default value
+      // is UNKNOWN. This enables enum values to be added
+      // in a backwards-compatible way. See: MESOS-4997.
+      UNKNOWN = 0;
+
       // Receive offers with revocable resources. See 'Resource'
       // message for details.
       // TODO(vinod): This is currently a no-op.
@@ -269,7 +275,8 @@ message FrameworkInfo {
       TASK_KILLING_STATE = 2;
     }
 
-    required Type type = 1;
+    // Enum fields should be optional, see: MESOS-4997.
+    optional Type type = 1;
   }
 
   // This field allows a framework to advertise its set of

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9f7426d/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 31960a5..022690b 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -258,6 +258,12 @@ message FrameworkInfo {
 
   message Capability {
     enum Type {
+      // This must be the first enum value in this list, to
+      // ensure that if 'type' is not set, the default value
+      // is UNKNOWN. This enables enum values to be added
+      // in a backwards-compatible way. See: MESOS-4997.
+      UNKNOWN = 0;
+
       // Receive offers with revocable resources. See 'Resource'
       // message for details.
       // TODO(vinod): This is currently a no-op.
@@ -269,7 +275,8 @@ message FrameworkInfo {
       TASK_KILLING_STATE = 2;
     }
 
-    required Type type = 1;
+    // Enum fields should be optional, see: MESOS-4997.
+    optional Type type = 1;
   }
 
   // This field allows a framework to advertise its set of