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/03/24 00:15:01 UTC
mesos git commit: Updated FrameworkInfo::Capability::Type enum for
upgradability.
Repository: mesos
Updated Branches:
refs/heads/master d5c3771bb -> 6af80ec95
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/6af80ec9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6af80ec9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6af80ec9
Branch: refs/heads/master
Commit: 6af80ec955d82d628462bcf8af48eb33a049de42
Parents: d5c3771
Author: Benjamin Mahler <bm...@apache.org>
Authored: Mon Mar 21 22:58:20 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Mar 23 16:14:26 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/6af80ec9/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index b965f5a..e870565 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/6af80ec9/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index d2ab6ed..6556a1c 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