You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mz...@apache.org on 2019/08/05 21:21:13 UTC

[mesos] 03/03: Marked `SET_QUOTA` and `REMOVE_QUOTA` as deprecated.

This is an automated email from the ASF dual-hosted git repository.

mzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 6ce10107346d65ea12a60667dd222096a042b938
Author: Meng Zhu <mz...@mesosphere.io>
AuthorDate: Tue Jul 30 17:50:55 2019 -0700

    Marked `SET_QUOTA` and `REMOVE_QUOTA` as deprecated.
    
    These are deprecated in favor of `UPDATE_QUOTA`.
    
    Review: https://reviews.apache.org/r/71214
---
 include/mesos/master/master.proto    | 29 ++++++++++-------------------
 include/mesos/v1/master/master.proto | 29 ++++++++++-------------------
 2 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/include/mesos/master/master.proto b/include/mesos/master/master.proto
index 153be68..8386bd6 100644
--- a/include/mesos/master/master.proto
+++ b/include/mesos/master/master.proto
@@ -95,18 +95,14 @@ message Call {
     REACTIVATE_AGENT = 39; // See 'ReactivateAgent' below.
 
     GET_QUOTA = 28;
-
-    // EXPERIMENTAL DO NOT USE.
-    //
-    // This feature is not implementation complete.
-    //
-    // TODO(bmahler): Remove this when complete and deprecate the
-    // `REMOVE_QUOTA` and `SET_QUOTA` calls in favor of this. Be
-    // sure to document what's different for users.
     UPDATE_QUOTA = 36;       // See 'UpdateQuota' below.
 
-    SET_QUOTA = 29;          // See 'SetQuota' below.
-    REMOVE_QUOTA = 30;       // See 'RemoveQuota' below.
+    // `SET_QUOTA` and `REMOVE_QUOTA` are deprecated in favor
+    // of `UPDATE_QUOTA`. To reset a role's quota back to the default
+    // (no guarantees and no limits), simply update the role's quota
+    // with empty guarantees and limits.
+    SET_QUOTA = 29 [deprecated = true];
+    REMOVE_QUOTA = 30 [deprecated = true];
 
     TEARDOWN = 31;       // See 'Teardown' below.
 
@@ -292,14 +288,12 @@ message Call {
     repeated quota.QuotaConfig quota_configs = 2;
   }
 
-  // Sets the quota for resources to be used by a particular role.
-  //
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message SetQuota {
     required quota.QuotaRequest quota_request = 1;
   }
 
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message RemoveQuota {
     required string role = 1;
   }
@@ -348,11 +342,8 @@ message Call {
   optional Teardown teardown = 16;
   optional MarkAgentGone mark_agent_gone = 17;
 
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional SetQuota set_quota = 14;
-
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional RemoveQuota remove_quota = 15;
+  optional SetQuota set_quota = 14 [deprecated = true];
+  optional RemoveQuota remove_quota = 15 [deprecated = true];
 }
 
 
diff --git a/include/mesos/v1/master/master.proto b/include/mesos/v1/master/master.proto
index 4906b94..893162d 100644
--- a/include/mesos/v1/master/master.proto
+++ b/include/mesos/v1/master/master.proto
@@ -96,18 +96,14 @@ message Call {
     REACTIVATE_AGENT = 39; // See 'ReactivateAgent' below.
 
     GET_QUOTA = 28;
-
-    // EXPERIMENTAL DO NOT USE.
-    //
-    // This feature is not implementation complete.
-    //
-    // TODO(bmahler): Remove this when complete and deprecate the
-    // `REMOVE_QUOTA` and `SET_QUOTA` calls in favor of this. Be
-    // sure to document what's different for users.
     UPDATE_QUOTA = 36;       // See 'UpdateQuota' below.
 
-    SET_QUOTA = 29;          // See 'SetQuota' below.
-    REMOVE_QUOTA = 30;       // See 'RemoveQuota' below.
+    // `SET_QUOTA` and `REMOVE_QUOTA` are deprecated in favor
+    // of `UPDATE_QUOTA`. To reset a role's quota back to the default
+    // (no guarantees and no limits), simply update the role's quota
+    // with empty guarantees and limits.
+    SET_QUOTA = 29 [deprecated = true];
+    REMOVE_QUOTA = 30 [deprecated = true];
 
     TEARDOWN = 31;       // See 'Teardown' below.
 
@@ -293,14 +289,12 @@ message Call {
     repeated quota.QuotaConfig quota_configs = 2;
   }
 
-  // Sets the quota for resources to be used by a particular role.
-  //
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message SetQuota {
     required quota.QuotaRequest quota_request = 1;
   }
 
-  // TODO(bmahler): Deprecate this in favor of `UpdateQuota`.
+  // Deprecated in favor of `UpdateQuota`.
   message RemoveQuota {
     required string role = 1;
   }
@@ -349,11 +343,8 @@ message Call {
   optional Teardown teardown = 16;
   optional MarkAgentGone mark_agent_gone = 17;
 
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional SetQuota set_quota = 14;
-
-  // TODO(bmahler): Deprecate in favor of `UPDATE_QUOTA`.
-  optional RemoveQuota remove_quota = 15;
+  optional SetQuota set_quota = 14 [deprecated = true];
+  optional RemoveQuota remove_quota = 15 [deprecated = true];
 }