You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gr...@apache.org on 2018/01/10 22:04:41 UTC

[2/2] mesos git commit: Improved the documentation of protos related to operation feedback.

Improved the documentation of protos related to operation feedback.

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


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

Branch: refs/heads/master
Commit: b9bf0b54b85a054eb48b1f33de460b1f05e06b1c
Parents: 93c6809
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Wed Jan 10 10:42:25 2018 -0800
Committer: Greg Mann <gr...@gmail.com>
Committed: Wed Jan 10 14:03:59 2018 -0800

----------------------------------------------------------------------
 include/mesos/mesos.proto                  | 5 +++++
 include/mesos/scheduler/scheduler.proto    | 6 ++++++
 include/mesos/v1/mesos.proto               | 5 +++++
 include/mesos/v1/scheduler/scheduler.proto | 6 ++++++
 4 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 01b05f9..2c5ae4c 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -2306,7 +2306,12 @@ enum OperationState {
  * Describes the current status of an operation.
  */
 message OperationStatus {
+  // While frameworks will only receive status updates for operations on which
+  // they have set an ID, this field is optional because this message is also
+  // used internally by Mesos components when the operation's ID has not been
+  // set.
   optional OperationID operation_id = 1;
+
   required OperationState state = 2;
   optional string message = 3;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index 4258fb3..7a90355 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -404,8 +404,14 @@ message Call {
   // Such status updates are retried by the agent or resource provider until
   // they are acknowledged by the scheduler.
   message AcknowledgeOperationStatus {
+    // If the operation affects resources that belong to a SLRP, both
+    // `slave_id` and `resource_provider_id` have to be set.
+    //
+    // If the operation affects resources that belong to a SERP, only
+    // `resource_provider_id` has to be set.
     optional SlaveID slave_id = 1;
     optional ResourceProviderID resource_provider_id = 2;
+
     required bytes uuid = 3;
     required OperationID operation_id = 4;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index b35b3f8..b8e016e 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -2287,7 +2287,12 @@ enum OperationState {
  * Describes the current status of an operation.
  */
 message OperationStatus {
+  // While frameworks will only receive status updates for operations on which
+  // they have set an ID, this field is optional because this message is also
+  // used internally by Mesos components when the operation's ID has not been
+  // set.
   optional OperationID operation_id = 1;
+
   required OperationState state = 2;
   optional string message = 3;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/b9bf0b54/include/mesos/v1/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index 688ba55..f08fdfb 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -389,8 +389,14 @@ message Call {
   // Such status updates are retried by the agent or resource provider
   // until they are acknowledged by the scheduler.
   message AcknowledgeOperationStatus {
+    // If the operation affects resources that belong to a SLRP, both
+    // `agent_id` and `resource_provider_id` have to be set.
+    //
+    // If the operation affects resources that belong to a SERP, only
+    // `resource_provider_id` has to be set.
     optional AgentID agent_id = 1;
     optional ResourceProviderID resource_provider_id = 2;
+
     required bytes uuid = 3;
     required OperationID operation_id = 4;
   }