{"action":"created","comment":{"url":"https://api.github.com/repos/apache/mesos/pulls/comments/70072622","id":70072622,"diff_hunk":"@@ -1475,6 +1475,20 @@ ostream& operator<<(ostream& stream, const Volume& volume)\n   return stream;\n }\n \n+ostream& operator<<(ostream& stream, const Resource::DiskInfo::Source& source)\n+{\n+  stream << source.type();\n+\n+  if (source.has_path()) {","path":"src/common/resources.cpp","position":8,"original_position":8,"commit_id":"bdb533c5de2b44f9dab873b16c3c7e28d53bcca4","original_commit_id":"bdb533c5de2b44f9dab873b16c3c7e28d53bcca4","user":{"login":"rukletsov","id":2613999,"avatar_url":"https://avatars.githubusercontent.com/u/2613999?v=3","gravatar_id":"","url":"https://api.github.com/users/rukletsov","html_url":"https://github.com/rukletsov","followers_url":"https://api.github.com/users/rukletsov/followers","following_url":"https://api.github.com/users/rukletsov/following{/other_user}","gists_url":"https://api.github.com/users/rukletsov/gists{/gist_id}","starred_url":"https://api.github.com/users/rukletsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rukletsov/subscriptions","organizations_url":"https://api.github.com/users/rukletsov/orgs","repos_url":"https://api.github.com/users/rukletsov/repos","events_url":"https://api.github.com/users/rukletsov/events{/privacy}","received_events_url":"https://api.github.com/users/rukletsov/received_events","type":"User","site_admin":false},"body":"It looks like the common pattern is to switch on the type. Could you please follow this pattern? You can convert `has_*()` into `CHECK`s.","created_at":"2016-07-08T13:25:05Z","updated_at":"2016-07-08T13:25:06Z","html_url":"https://github.com/apache/mesos/pull/133#discussion_r70072622","pull_request_url":"https://api.github.com/repos/apache/mesos/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/apache/mesos/pulls/comments/70072622"},"html":{"href":"https://github.com/apache/mesos/pull/133#discussion_r70072622"},"pull_request":{"href":"https://api.github.com/repos/apache/mesos/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/apache/mesos/pulls/133","id":76722335,"html_url":"https://github.com/apache/mesos/pull/133","diff_url":"https://github.com/apache/mesos/pull/133.diff","patch_url":"https://github.com/apache/mesos/pull/133.patch","issue_url":"https://api.github.com/repos/apache/mesos/issues/133","number":133,"state":"open","locked":false,"title":"Output disk resource source information.","user":{"login":"timcharper","id":183,"avatar_url":"https://avatars.githubusercontent.com/u/183?v=3","gravatar_id":"","url":"https://api.github.com/users/timcharper","html_url":"https://github.com/timcharper","followers_url":"https://api.github.com/users/timcharper/followers","following_url":"https://api.github.com/users/timcharper/following{/other_user}","gists_url":"https://api.github.com/users/timcharper/gists{/gist_id}","starred_url":"https://api.github.com/users/timcharper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timcharper/subscriptions","organizations_url":"https://api.github.com/users/timcharper/orgs","repos_url":"https://api.github.com/users/timcharper/repos","events_url":"https://api.github.com/users/timcharper/events{/privacy}","received_events_url":"https://api.github.com/users/timcharper/received_events","type":"User","site_admin":false},"body":"This information is obscured when formatted via `stringify`, leading to confusing error messages such as:\r\n\r\n```\r\nTask uses more resources\r\ncpus(*):4; mem(*):4096;     ports(*):[31000-31000]; disk(kafka, kafka)[kafka_0:data]:960679\r\nthan available\r\ncpus(*):32; mem(*):256819;  ports(*):[31000-32000]; disk(kafka, kafka)[kafka_0:data]:960679;   disk(*):240169;\r\n```\r\n\r\n(above was formatted and aligned for clarity)\r\n\r\nThe validation error here is actually complaining that the disk requested didn't have any source information (and therefore defaulted to a root volume), but the available persistent volume was a mount source.\r\n","created_at":"2016-07-08T09:06:48Z","updated_at":"2016-07-08T13:25:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83c24e40c466b1c043c0c67883c9bcc1bc8a9c93","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/mesos/pulls/133/commits","review_comments_url":"https://api.github.com/repos/apache/mesos/pulls/133/comments","review_comment_url":"https://api.github.com/repos/apache/mesos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/mesos/issues/133/comments","statuses_url":"https://api.github.com/repos/apache/mesos/statuses/bdb533c5de2b44f9dab873b16c3c7e28d53bcca4","head":{"label":"vivint-smarthome:0.28.x","ref":"0.28.x","sha":"bdb533c5de2b44f9dab873b16c3c7e28d53bcca4","user":{"login":"vivint-smarthome","id":17858460,"avatar_url":"https://avatars.githubusercontent.com/u/17858460?v=3","gravatar_id":"","url":"https://api.github.com/users/vivint-smarthome","html_url":"https://github.com/vivint-smarthome","followers_url":"https://api.github.com/users/vivint-smarthome/followers","following_url":"https://api.github.com/users/vivint-smarthome/following{/other_user}","gists_url":"https://api.github.com/users/vivint-smarthome/gists{/gist_id}","starred_url":"https://api.github.com/users/vivint-smarthome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivint-smarthome/subscriptions","organizations_url":"https://api.github.com/users/vivint-smarthome/orgs","repos_url":"https://api.github.com/users/vivint-smarthome/repos","events_url":"https://api.github.com/users/vivint-smarthome/events{/privacy}","received_events_url":"https://api.github.com/users/vivint-smarthome/received_events","type":"Organization","site_admin":false},"repo":{"id":62874819,"name":"mesos","full_name":"vivint-smarthome/mesos","owner":{"login":"vivint-smarthome","id":17858460,"avatar_url":"https://avatars.githubusercontent.com/u/17858460?v=3","gravatar_id":"","url":"https://api.github.com/users/vivint-smarthome","html_url":"https://github.com/vivint-smarthome","followers_url":"https://api.github.com/users/vivint-smarthome/followers","following_url":"https://api.github.com/users/vivint-smarthome/following{/other_user}","gists_url":"https://api.github.com/users/vivint-smarthome/gists{/gist_id}","starred_url":"https://api.github.com/users/vivint-smarthome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vivint-smarthome/subscriptions","organizations_url":"https://api.github.com/users/vivint-smarthome/orgs","repos_url":"https://api.github.com/users/vivint-smarthome/repos","events_url":"https://api.github.com/users/vivint-smarthome/events{/privacy}","received_events_url":"https://api.github.com/users/vivint-smarthome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vivint-smarthome/mesos","description":"Mirror of Apache Mesos","fork":true,"url":"https://api.github.com/repos/vivint-smarthome/mesos","forks_url":"https://api.github.com/repos/vivint-smarthome/mesos/forks","keys_url":"https://api.github.com/repos/vivint-smarthome/mesos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vivint-smarthome/mesos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vivint-smarthome/mesos/teams","hooks_url":"https://api.github.com/repos/vivint-smarthome/mesos/hooks","issue_events_url":"https://api.github.com/repos/vivint-smarthome/mesos/issues/events{/number}","events_url":"https://api.github.com/repos/vivint-smarthome/mesos/events","assignees_url":"https://api.github.com/repos/vivint-smarthome/mesos/assignees{/user}","branches_url":"https://api.github.com/repos/vivint-smarthome/mesos/branches{/branch}","tags_url":"https://api.github.com/repos/vivint-smarthome/mesos/tags","blobs_url":"https://api.github.com/repos/vivint-smarthome/mesos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vivint-smarthome/mesos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vivint-smarthome/mesos/git/refs{/sha}","trees_url":"https://api.github.com/repos/vivint-smarthome/mesos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vivint-smarthome/mesos/statuses/{sha}","languages_url":"https://api.github.com/repos/vivint-smarthome/mesos/languages","stargazers_url":"https://api.github.com/repos/vivint-smarthome/mesos/stargazers","contributors_url":"https://api.github.com/repos/vivint-smarthome/mesos/contributors","subscribers_url":"https://api.github.com/repos/vivint-smarthome/mesos/subscribers","subscription_url":"https://api.github.com/repos/vivint-smarthome/mesos/subscription","commits_url":"https://api.github.com/repos/vivint-smarthome/mesos/commits{/sha}","git_commits_url":"https://api.github.com/repos/vivint-smarthome/mesos/git/commits{/sha}","comments_url":"https://api.github.com/repos/vivint-smarthome/mesos/comments{/number}","issue_comment_url":"https://api.github.com/repos/vivint-smarthome/mesos/issues/comments{/number}","contents_url":"https://api.github.com/repos/vivint-smarthome/mesos/contents/{+path}","compare_url":"https://api.github.com/repos/vivint-smarthome/mesos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vivint-smarthome/mesos/merges","archive_url":"https://api.github.com/repos/vivint-smarthome/mesos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vivint-smarthome/mesos/downloads","issues_url":"https://api.github.com/repos/vivint-smarthome/mesos/issues{/number}","pulls_url":"https://api.github.com/repos/vivint-smarthome/mesos/pulls{/number}","milestones_url":"https://api.github.com/repos/vivint-smarthome/mesos/milestones{/number}","notifications_url":"https://api.github.com/repos/vivint-smarthome/mesos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vivint-smarthome/mesos/labels{/name}","releases_url":"https://api.github.com/repos/vivint-smarthome/mesos/releases{/id}","deployments_url":"https://api.github.com/repos/vivint-smarthome/mesos/deployments","created_at":"2016-07-08T09:02:16Z","updated_at":"2016-07-08T09:02:21Z","pushed_at":"2016-07-08T09:03:03Z","git_url":"git://github.com/vivint-smarthome/mesos.git","ssh_url":"git@github.com:vivint-smarthome/mesos.git","clone_url":"https://github.com/vivint-smarthome/mesos.git","svn_url":"https://github.com/vivint-smarthome/mesos","homepage":null,"size":292158,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:0.28.x","ref":"0.28.x","sha":"9bcdc69763263c80273f9a92e4dc9f0ee3b2f2d8","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":11469439,"name":"mesos","full_name":"apache/mesos","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/mesos","description":"Mirror of Apache Mesos","fork":false,"url":"https://api.github.com/repos/apache/mesos","forks_url":"https://api.github.com/repos/apache/mesos/forks","keys_url":"https://api.github.com/repos/apache/mesos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/mesos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/mesos/teams","hooks_url":"https://api.github.com/repos/apache/mesos/hooks","issue_events_url":"https://api.github.com/repos/apache/mesos/issues/events{/number}","events_url":"https://api.github.com/repos/apache/mesos/events","assignees_url":"https://api.github.com/repos/apache/mesos/assignees{/user}","branches_url":"https://api.github.com/repos/apache/mesos/branches{/branch}","tags_url":"https://api.github.com/repos/apache/mesos/tags","blobs_url":"https://api.github.com/repos/apache/mesos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/mesos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/mesos/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/mesos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/mesos/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/mesos/languages","stargazers_url":"https://api.github.com/repos/apache/mesos/stargazers","contributors_url":"https://api.github.com/repos/apache/mesos/contributors","subscribers_url":"https://api.github.com/repos/apache/mesos/subscribers","subscription_url":"https://api.github.com/repos/apache/mesos/subscription","commits_url":"https://api.github.com/repos/apache/mesos/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/mesos/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/mesos/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/mesos/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/mesos/contents/{+path}","compare_url":"https://api.github.com/repos/apache/mesos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/mesos/merges","archive_url":"https://api.github.com/repos/apache/mesos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/mesos/downloads","issues_url":"https://api.github.com/repos/apache/mesos/issues{/number}","pulls_url":"https://api.github.com/repos/apache/mesos/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/mesos/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/mesos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/mesos/labels{/name}","releases_url":"https://api.github.com/repos/apache/mesos/releases{/id}","deployments_url":"https://api.github.com/repos/apache/mesos/deployments","created_at":"2013-07-17T07:00:13Z","updated_at":"2016-07-08T12:06:47Z","pushed_at":"2016-07-08T13:08:47Z","git_url":"git://github.com/apache/mesos.git","ssh_url":"git@github.com:apache/mesos.git","clone_url":"https://github.com/apache/mesos.git","svn_url":"https://github.com/apache/mesos","homepage":null,"size":297910,"stargazers_count":2410,"watchers_count":2410,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":941,"mirror_url":"git://git.apache.org/mesos.git","open_issues_count":49,"forks":941,"open_issues":49,"watchers":2410,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/mesos/pulls/133"},"html":{"href":"https://github.com/apache/mesos/pull/133"},"issue":{"href":"https://api.github.com/repos/apache/mesos/issues/133"},"comments":{"href":"https://api.github.com/repos/apache/mesos/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/mesos/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/mesos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/mesos/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/apache/mesos/statuses/bdb533c5de2b44f9dab873b16c3c7e28d53bcca4"}}}}
{"actor":{"display_login":"rukletsov"}}