You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2017/06/13 19:18:02 UTC

mesos git commit: Revert "Disabled support for hierarchical roles."

Repository: mesos
Updated Branches:
  refs/heads/master 83391c8b4 -> 2ef06aec4


Revert "Disabled support for hierarchical roles."

This reverts commit e0d8cc7c4ef7a0905044159ca47f64b0923e9788.


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

Branch: refs/heads/master
Commit: 2ef06aec4ac69a869ab0dc40a4de191e6e08bb3f
Parents: 83391c8
Author: Michael Park <mp...@apache.org>
Authored: Mon May 22 14:28:18 2017 -0700
Committer: Michael Park <mc...@gmail.com>
Committed: Tue Jun 13 12:10:40 2017 -0700

----------------------------------------------------------------------
 src/common/roles.cpp                 |  5 -----
 src/tests/master_allocator_tests.cpp |  4 +---
 src/tests/role_tests.cpp             | 15 +++++----------
 3 files changed, 6 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2ef06aec/src/common/roles.cpp
----------------------------------------------------------------------
diff --git a/src/common/roles.cpp b/src/common/roles.cpp
index 139ae87..123e990 100644
--- a/src/common/roles.cpp
+++ b/src/common/roles.cpp
@@ -68,11 +68,6 @@ Option<Error> validate(const string& role)
     return None();
   }
 
-  // TODO(neilc): Remove this restriction when MESOS-7505 is fixed.
-  if (role.find_first_of('/') != string::npos) {
-    return Error("Role '" + role + "' cannot contain a slash");
-  }
-
   if (strings::startsWith(role, '/')) {
     return Error("Role '" + role + "' cannot start with a slash");
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/2ef06aec/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index a301c16..f83ca66 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -1802,9 +1802,7 @@ TYPED_TEST(MasterAllocatorTest, RebalancedForUpdatedWeights)
 
 // Checks that accepting offers and launching tasks works as expected
 // with nested roles.
-//
-// TODO(neilc): Re-enable this when MESOS-7505 is fixed.
-TYPED_TEST(MasterAllocatorTest, DISABLED_NestedRoles)
+TYPED_TEST(MasterAllocatorTest, NestedRoles)
 {
   Clock::pause();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/2ef06aec/src/tests/role_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/role_tests.cpp b/src/tests/role_tests.cpp
index 03b6f7b..56422b5 100644
--- a/src/tests/role_tests.cpp
+++ b/src/tests/role_tests.cpp
@@ -810,12 +810,10 @@ TEST_F(RoleTest, Validate)
   EXPECT_NONE(roles::validate("foo.bar"));
   EXPECT_NONE(roles::validate("foo..bar"));
   EXPECT_NONE(roles::validate("..."));
-
-  // TODO(neilc): These expectations will change when MESOS-7505 is fixed.
-  EXPECT_SOME(roles::validate("foo/bar"));
-  EXPECT_SOME(roles::validate("foo/.bar"));
-  EXPECT_SOME(roles::validate("foo/bar/baz"));
-  EXPECT_SOME(roles::validate("a/b/c/d/e/f/g/h"));
+  EXPECT_NONE(roles::validate("foo/bar"));
+  EXPECT_NONE(roles::validate("foo/.bar"));
+  EXPECT_NONE(roles::validate("foo/bar/baz"));
+  EXPECT_NONE(roles::validate("a/b/c/d/e/f/g/h"));
 
   EXPECT_SOME(roles::validate(""));
   EXPECT_SOME(roles::validate("."));
@@ -900,10 +898,7 @@ TEST_F(RoleTest, EndpointBadAuthentication)
 // subdirectory).
 //
 // TODO(bbannier): Figure out a way to run the test command on Windows.
-//
-// TODO(neilc): Re-enable this when MESOS-7505 is fixed.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(
-    RoleTest, DISABLED_VolumesInOverlappingHierarchies)
+TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, VolumesInOverlappingHierarchies)
 {
   constexpr char PATH[] = "path";
   constexpr Megabytes DISK_SIZE(1);