You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2016/06/29 13:49:47 UTC
[1/3] mesos git commit: Fixed lambda capture list for consistency.
Repository: mesos
Updated Branches:
refs/heads/master 6c0a6e150 -> b221e640b
Fixed lambda capture list for consistency.
Review: https://reviews.apache.org/r/49368/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/85641675
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/85641675
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/85641675
Branch: refs/heads/master
Commit: 856416754f09530582f74858566202cb5b244c70
Parents: 6c0a6e1
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Wed Jun 29 15:36:30 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Jun 29 15:43:13 2016 +0200
----------------------------------------------------------------------
src/master/http.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/85641675/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 311db1a..e891383 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -1188,10 +1188,13 @@ Future<Response> Master::Http::frameworks(
return collect(frameworksApprover, tasksApprover, executorsApprover)
.then(defer(master->self(),
- [=](const tuple<Owned<ObjectApprover>,
- Owned<ObjectApprover>,
- Owned<ObjectApprover>>& approvers) -> Response {
- auto frameworks = [this, approvers](JSON::ObjectWriter* writer) {
+ [this, request](const tuple<Owned<ObjectApprover>,
+ Owned<ObjectApprover>,
+ Owned<ObjectApprover>>& approvers)
+ -> Response {
+ // This lambda is consumed before the outer lambda
+ // returns, hence capture by reference is fine here.
+ auto frameworks = [this, &approvers](JSON::ObjectWriter* writer) {
// Get approver from tuple.
Owned<ObjectApprover> frameworksApprover;
Owned<ObjectApprover> tasksApprover;
@@ -1201,7 +1204,7 @@ Future<Response> Master::Http::frameworks(
// Model all of the frameworks.
writer->field(
"frameworks",
- [this, frameworksApprover, executorsApprover, tasksApprover](
+ [this, &frameworksApprover, &executorsApprover, &tasksApprover](
JSON::ArrayWriter* writer) {
foreachvalue (Framework* framework,
master->frameworks.registered) {
@@ -1223,7 +1226,7 @@ Future<Response> Master::Http::frameworks(
// Model all of the completed frameworks.
writer->field(
"completed_frameworks",
- [this, frameworksApprover, executorsApprover, tasksApprover](
+ [this, &frameworksApprover, &executorsApprover, &tasksApprover](
JSON::ArrayWriter* writer) {
foreach (const std::shared_ptr<Framework>& framework,
master->frameworks.completed) {
[3/3] mesos git commit: Fixed a typo in authorization test
description.
Posted by al...@apache.org.
Fixed a typo in authorization test description.
Review: https://reviews.apache.org/r/49326/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b221e640
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b221e640
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b221e640
Branch: refs/heads/master
Commit: b221e640b26c17d9a1bea55b089c28acf273cdb9
Parents: 356c8b9
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Wed Jun 29 15:45:37 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Jun 29 15:45:37 2016 +0200
----------------------------------------------------------------------
src/tests/master_authorization_tests.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b221e640/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index 9088d7d..207dfb2 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -1516,7 +1516,7 @@ TYPED_TEST(MasterAuthorizerTest, FilterFrameworksEndpoint)
// This test verifies that authorization based endpoint filtering
-// works correctly on the /state endpoint.
+// works correctly on the /tasks endpoint.
// Both default users are allowed to to view high level frameworks, but only
// one is allowed to view the tasks.
TYPED_TEST(MasterAuthorizerTest, FilterTasksEndpoint)
[2/3] mesos git commit: Fixed indentation error for comment.
Posted by al...@apache.org.
Fixed indentation error for comment.
Review: https://reviews.apache.org/r/49368/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/356c8b9d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/356c8b9d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/356c8b9d
Branch: refs/heads/master
Commit: 356c8b9d72d10db80daebe0f2eaace9c99db075e
Parents: 8564167
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Wed Jun 29 15:43:55 2016 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Wed Jun 29 15:43:55 2016 +0200
----------------------------------------------------------------------
src/common/http.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/356c8b9d/src/common/http.cpp
----------------------------------------------------------------------
diff --git a/src/common/http.cpp b/src/common/http.cpp
index 95e8fb6..daf5672 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -692,7 +692,7 @@ bool approveViewTask(
Try<bool> approved = tasksApprover->approved(object);
if (approved.isError()) {
LOG(WARNING) << "Error during Task authorization: " << approved.error();
- // TODO(joerg84): Consider exposing these errors to the caller.
+ // TODO(joerg84): Consider exposing these errors to the caller.
return false;
}
return approved.get();