You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/09/27 02:59:51 UTC
[2/3] mesos git commit: Added TODOs to validate against empty task
and persistence IDs.
Added TODOs to validate against empty task and persistence IDs.
Review: https://reviews.apache.org/r/52291
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/512eaa66
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/512eaa66
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/512eaa66
Branch: refs/heads/master
Commit: 512eaa661fa75482394d8d3ff7b2b9529acbf2d9
Parents: 398dd56
Author: Benjamin Mahler <bm...@apache.org>
Authored: Mon Sep 26 17:03:19 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Mon Sep 26 19:52:17 2016 -0700
----------------------------------------------------------------------
src/master/validation.cpp | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/512eaa66/src/master/validation.cpp
----------------------------------------------------------------------
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index aa743d7..e5da3c9 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -429,6 +429,8 @@ Option<Error> validateDiskInfo(const RepeatedPtrField<Resource>& resources)
}
// Ensure persistence ID does not have invalid characters.
+ //
+ // TODO(bmahler): Validate against empty id!
string id = resource.disk().persistence().id();
if (std::any_of(id.begin(), id.end(), invalidCharacter)) {
return Error("Persistence ID '" + id + "' contains invalid characters");
@@ -700,6 +702,7 @@ Option<Error> validateTaskID(const TaskInfo& task)
{
const string& id = task.task_id().value();
+ // TODO(bmahler): Validate against empty id!
if (std::any_of(id.begin(), id.end(), invalidCharacter)) {
return Error("TaskID '" + id + "' contains invalid characters");
}