You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by as...@apache.org on 2020/08/19 12:46:42 UTC

[mesos] branch master updated: Removed `evolve(const scheduler::Call&)`.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new b07e6bb  Removed `evolve(const scheduler::Call&)`.
b07e6bb is described below

commit b07e6bb0dc6c14ac229e34874461b25755404e8d
Author: Andrei Sekretenko <as...@apache.org>
AuthorDate: Wed Aug 12 15:27:33 2020 +0200

    Removed `evolve(const scheduler::Call&)`.
    
    This patch removes a non-trivial `evolve()` overload that is not used
    anywhere in Mesos code and is not covered by tests.
    
    Review: https://reviews.apache.org/r/72771
---
 src/internal/evolve.cpp | 19 -------------------
 src/internal/evolve.hpp |  1 -
 2 files changed, 20 deletions(-)

diff --git a/src/internal/evolve.cpp b/src/internal/evolve.cpp
index c5e4151..9152ccb 100644
--- a/src/internal/evolve.cpp
+++ b/src/internal/evolve.cpp
@@ -283,25 +283,6 @@ v1::resource_provider::Event evolve(const resource_provider::Event& event)
 }
 
 
-// TODO(xujyan): Do we need this conversion when Mesos never sends out
-// `scheduler::Call` thus never needs to evovle internal call to a v1 call?
-// Perhaps we should remove the method so there's no need to maintain it.
-v1::scheduler::Call evolve(const scheduler::Call& call)
-{
-  v1::scheduler::Call _call = evolve<v1::scheduler::Call>(call);
-
-  // Certain conversions require special handling.
-  if (_call.type() == v1::scheduler::Call::SUBSCRIBE) {
-    // v1 Subscribe.suppressed_roles cannot be automatically converted
-    // because its tag is used by another field in the internal Subscribe.
-    *(_call.mutable_subscribe()->mutable_suppressed_roles()) =
-      call.subscribe().suppressed_roles();
-  }
-
-  return _call;
-}
-
-
 v1::scheduler::Event evolve(const scheduler::Event& event)
 {
   return evolve<v1::scheduler::Event>(event);
diff --git a/src/internal/evolve.hpp b/src/internal/evolve.hpp
index e4e3ab4..1669650 100644
--- a/src/internal/evolve.hpp
+++ b/src/internal/evolve.hpp
@@ -117,7 +117,6 @@ google::protobuf::RepeatedPtrField<T1> evolve(
 }
 
 
-v1::scheduler::Call evolve(const mesos::scheduler::Call& call);
 v1::scheduler::Event evolve(const mesos::scheduler::Event& event);
 v1::scheduler::Response evolve(const mesos::scheduler::Response& response);