You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2018/02/23 00:46:35 UTC

mesos git commit: Allowed empty resource provider selector in `UriDiskProfileAdaptor`.

Repository: mesos
Updated Branches:
  refs/heads/master 9635d4a2d -> 2ddc3c6a1


Allowed empty resource provider selector in `UriDiskProfileAdaptor`.

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


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

Branch: refs/heads/master
Commit: 2ddc3c6a18de01eb51448779de1dff311d5dbe51
Parents: 9635d4a
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Thu Feb 22 16:32:00 2018 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Feb 22 16:32:00 2018 -0800

----------------------------------------------------------------------
 src/resource_provider/storage/disk_profile_utils.cpp |  6 ------
 src/tests/disk_profile_tests.cpp                     | 11 -----------
 2 files changed, 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2ddc3c6a/src/resource_provider/storage/disk_profile_utils.cpp
----------------------------------------------------------------------
diff --git a/src/resource_provider/storage/disk_profile_utils.cpp b/src/resource_provider/storage/disk_profile_utils.cpp
index a243bd6..3e8b0c5 100644
--- a/src/resource_provider/storage/disk_profile_utils.cpp
+++ b/src/resource_provider/storage/disk_profile_utils.cpp
@@ -107,12 +107,6 @@ static Option<Error> validateSelector(
 
       const auto& selector = profileManifest.resource_provider_selector();
 
-      if (selector.resource_providers_size() == 0) {
-        return Error(
-            "Expecting one or more 'resource_providers' for "
-            "ResourceProviderSelector");
-      }
-
       foreach (const auto& resourceProvider, selector.resource_providers()) {
         if (resourceProvider.type().empty()) {
           return Error(

http://git-wip-us.apache.org/repos/asf/mesos/blob/2ddc3c6a/src/tests/disk_profile_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/disk_profile_tests.cpp b/src/tests/disk_profile_tests.cpp
index 1bbbde0..577ccfe 100644
--- a/src/tests/disk_profile_tests.cpp
+++ b/src/tests/disk_profile_tests.cpp
@@ -205,17 +205,6 @@ TEST_F(UriDiskProfileTest, ParseInvalids)
         }
       })~",
 
-    // Empty 'resource_providers' in 'resource_provider_selector'.
-    R"~({
-        "profile_matrix" : {
-          "profile" : {
-            "resource_provider_selector" : {
-              "resource_providers" : []
-            }
-          }
-        }
-      })~",
-
     R"~({
         "profile_matrix" : {
           "profile" : {