{"action":"created","comment":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/36433007","id":36433007,"diff_hunk":"@@ -80,25 +80,74 @@ def consume(self, routingKey, msg):\n         send them to the storage backends.\n         \"\"\"\n         builder_info = yield self.master.data.get((\"builders\", msg['builderid']))\n-        if self._builder_name == builder_info['name']:\n+\n+        if self._builder_name_matches(builder_info):\n             properties = yield self.master.data.get((\"builds\", msg['buildid'], \"properties\"))\n-            try:\n-                ret_val = self._callback(properties, self._property_name)\n-            except KeyError:\n-                config.error(\"CaptureProperty failed.\"\n-                             \" The property %s not found for build number %s on builder %s.\"\n-                             % (self._property_name, msg['number'], self._builder_name))\n-            context = self._defaultContext(msg)\n-            series_name = '%s-%s' % (self._builder_name, self._property_name)\n-            post_data = {\n-                \"name\": self._property_name,\n-                \"value\": ret_val\n-            }\n-            yield self._store(post_data, series_name, context)\n+            filtered_prop_names = []\n+            if self._regex:\n+                prop_names = properties.keys()\n+                for pn in prop_names:\n+                    if re.match(self._property_name, pn):\n+                        filtered_prop_names.append(pn)\n+            else:\n+                filtered_prop_names.append(self._property_name)\n+\n+            for pn in filtered_prop_names:\n+                try:\n+                    ret_val = self._callback(properties, pn)\n+                except KeyError:\n+                    config.error(\"CaptureProperty failed.\"","path":"master/buildbot/statistics/capture.py","position":75,"original_position":75,"commit_id":"c79454c60eea453b2d01375fa168296d32f47faf","original_commit_id":"c79454c60eea453b2d01375fa168296d32f47faf","user":{"login":"sa2ajj","id":447092,"avatar_url":"https://avatars.githubusercontent.com/u/447092?v=3","gravatar_id":"","url":"https://api.github.com/users/sa2ajj","html_url":"https://github.com/sa2ajj","followers_url":"https://api.github.com/users/sa2ajj/followers","following_url":"https://api.github.com/users/sa2ajj/following{/other_user}","gists_url":"https://api.github.com/users/sa2ajj/gists{/gist_id}","starred_url":"https://api.github.com/users/sa2ajj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sa2ajj/subscriptions","organizations_url":"https://api.github.com/users/sa2ajj/orgs","repos_url":"https://api.github.com/users/sa2ajj/repos","events_url":"https://api.github.com/users/sa2ajj/events{/privacy}","received_events_url":"https://api.github.com/users/sa2ajj/received_events","type":"User","site_admin":false},"body":"Open question: is use of `config.error` warranted here?","created_at":"2015-08-06T16:10:35Z","updated_at":"2015-08-06T16:10:35Z","html_url":"https://github.com/buildbot/buildbot/pull/1804#discussion_r36433007","pull_request_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1804","_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/36433007"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1804#discussion_r36433007"},"pull_request":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1804"}}},"pull_request":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/1804","id":41707827,"html_url":"https://github.com/buildbot/buildbot/pull/1804","diff_url":"https://github.com/buildbot/buildbot/pull/1804.diff","patch_url":"https://github.com/buildbot/buildbot/pull/1804.patch","issue_url":"https://api.github.com/repos/buildbot/buildbot/issues/1804","number":1804,"state":"open","locked":false,"title":"Added capture classes to capture on all builders, regexes.","user":{"login":"prasoon2211","id":2565248,"avatar_url":"https://avatars.githubusercontent.com/u/2565248?v=3","gravatar_id":"","url":"https://api.github.com/users/prasoon2211","html_url":"https://github.com/prasoon2211","followers_url":"https://api.github.com/users/prasoon2211/followers","following_url":"https://api.github.com/users/prasoon2211/following{/other_user}","gists_url":"https://api.github.com/users/prasoon2211/gists{/gist_id}","starred_url":"https://api.github.com/users/prasoon2211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasoon2211/subscriptions","organizations_url":"https://api.github.com/users/prasoon2211/orgs","repos_url":"https://api.github.com/users/prasoon2211/repos","events_url":"https://api.github.com/users/prasoon2211/events{/privacy}","received_events_url":"https://api.github.com/users/prasoon2211/received_events","type":"User","site_admin":false},"body":"This is the third PR in the series of changes. This adds new capture classes that can be used to capture properties/build times/data on all builders. Also, this class adds supports for capturing properties using regular expressions.\r\n\r\nI've added the tests. Docs will go in PR-4.\r\n\r\n@sa2ajj @Stibbons @benallard ","created_at":"2015-08-05T18:04:17Z","updated_at":"2015-08-06T16:10:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a065329c33e6b1b197445c9c8d6211bf3164df9e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1804/commits","review_comments_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1804/comments","review_comment_url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildbot/buildbot/issues/1804/comments","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/c79454c60eea453b2d01375fa168296d32f47faf","head":{"label":"prasoon2211:todo-pr-3","ref":"todo-pr-3","sha":"c79454c60eea453b2d01375fa168296d32f47faf","user":{"login":"prasoon2211","id":2565248,"avatar_url":"https://avatars.githubusercontent.com/u/2565248?v=3","gravatar_id":"","url":"https://api.github.com/users/prasoon2211","html_url":"https://github.com/prasoon2211","followers_url":"https://api.github.com/users/prasoon2211/followers","following_url":"https://api.github.com/users/prasoon2211/following{/other_user}","gists_url":"https://api.github.com/users/prasoon2211/gists{/gist_id}","starred_url":"https://api.github.com/users/prasoon2211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasoon2211/subscriptions","organizations_url":"https://api.github.com/users/prasoon2211/orgs","repos_url":"https://api.github.com/users/prasoon2211/repos","events_url":"https://api.github.com/users/prasoon2211/events{/privacy}","received_events_url":"https://api.github.com/users/prasoon2211/received_events","type":"User","site_admin":false},"repo":{"id":31753664,"name":"buildbot","full_name":"prasoon2211/buildbot","owner":{"login":"prasoon2211","id":2565248,"avatar_url":"https://avatars.githubusercontent.com/u/2565248?v=3","gravatar_id":"","url":"https://api.github.com/users/prasoon2211","html_url":"https://github.com/prasoon2211","followers_url":"https://api.github.com/users/prasoon2211/followers","following_url":"https://api.github.com/users/prasoon2211/following{/other_user}","gists_url":"https://api.github.com/users/prasoon2211/gists{/gist_id}","starred_url":"https://api.github.com/users/prasoon2211/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prasoon2211/subscriptions","organizations_url":"https://api.github.com/users/prasoon2211/orgs","repos_url":"https://api.github.com/users/prasoon2211/repos","events_url":"https://api.github.com/users/prasoon2211/events{/privacy}","received_events_url":"https://api.github.com/users/prasoon2211/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prasoon2211/buildbot","description":"Python-based continuous integration testing framework; send pull requests for your patches!","fork":true,"url":"https://api.github.com/repos/prasoon2211/buildbot","forks_url":"https://api.github.com/repos/prasoon2211/buildbot/forks","keys_url":"https://api.github.com/repos/prasoon2211/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prasoon2211/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prasoon2211/buildbot/teams","hooks_url":"https://api.github.com/repos/prasoon2211/buildbot/hooks","issue_events_url":"https://api.github.com/repos/prasoon2211/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/prasoon2211/buildbot/events","assignees_url":"https://api.github.com/repos/prasoon2211/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/prasoon2211/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/prasoon2211/buildbot/tags","blobs_url":"https://api.github.com/repos/prasoon2211/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prasoon2211/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prasoon2211/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/prasoon2211/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prasoon2211/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/prasoon2211/buildbot/languages","stargazers_url":"https://api.github.com/repos/prasoon2211/buildbot/stargazers","contributors_url":"https://api.github.com/repos/prasoon2211/buildbot/contributors","subscribers_url":"https://api.github.com/repos/prasoon2211/buildbot/subscribers","subscription_url":"https://api.github.com/repos/prasoon2211/buildbot/subscription","commits_url":"https://api.github.com/repos/prasoon2211/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/prasoon2211/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/prasoon2211/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/prasoon2211/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/prasoon2211/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/prasoon2211/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prasoon2211/buildbot/merges","archive_url":"https://api.github.com/repos/prasoon2211/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prasoon2211/buildbot/downloads","issues_url":"https://api.github.com/repos/prasoon2211/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/prasoon2211/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/prasoon2211/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/prasoon2211/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prasoon2211/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/prasoon2211/buildbot/releases{/id}","created_at":"2015-03-06T05:11:29Z","updated_at":"2015-05-26T11:38:56Z","pushed_at":"2015-08-05T17:59:17Z","git_url":"git://github.com/prasoon2211/buildbot.git","ssh_url":"git@github.com:prasoon2211/buildbot.git","clone_url":"https://github.com/prasoon2211/buildbot.git","svn_url":"https://github.com/prasoon2211/buildbot","homepage":"http://buildbot.net","size":36923,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"buildbot:master","ref":"master","sha":"02100a20263bb3274317d77c170bbeed8ffea661","user":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"repo":{"id":760165,"name":"buildbot","full_name":"buildbot/buildbot","owner":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildbot/buildbot","description":"Python-based continuous integration testing framework; your pull requests are more than welcome!","fork":false,"url":"https://api.github.com/repos/buildbot/buildbot","forks_url":"https://api.github.com/repos/buildbot/buildbot/forks","keys_url":"https://api.github.com/repos/buildbot/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildbot/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildbot/buildbot/teams","hooks_url":"https://api.github.com/repos/buildbot/buildbot/hooks","issue_events_url":"https://api.github.com/repos/buildbot/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/buildbot/buildbot/events","assignees_url":"https://api.github.com/repos/buildbot/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/buildbot/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/buildbot/buildbot/tags","blobs_url":"https://api.github.com/repos/buildbot/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildbot/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildbot/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildbot/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/buildbot/buildbot/languages","stargazers_url":"https://api.github.com/repos/buildbot/buildbot/stargazers","contributors_url":"https://api.github.com/repos/buildbot/buildbot/contributors","subscribers_url":"https://api.github.com/repos/buildbot/buildbot/subscribers","subscription_url":"https://api.github.com/repos/buildbot/buildbot/subscription","commits_url":"https://api.github.com/repos/buildbot/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildbot/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildbot/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildbot/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildbot/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/buildbot/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildbot/buildbot/merges","archive_url":"https://api.github.com/repos/buildbot/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildbot/buildbot/downloads","issues_url":"https://api.github.com/repos/buildbot/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/buildbot/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/buildbot/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/buildbot/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildbot/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/buildbot/buildbot/releases{/id}","created_at":"2010-07-06T17:56:53Z","updated_at":"2015-08-06T04:42:22Z","pushed_at":"2015-08-06T02:13:34Z","git_url":"git://github.com/buildbot/buildbot.git","ssh_url":"git@github.com:buildbot/buildbot.git","clone_url":"https://github.com/buildbot/buildbot.git","svn_url":"https://github.com/buildbot/buildbot","homepage":"http://buildbot.net","size":52893,"stargazers_count":1670,"watchers_count":1670,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":737,"mirror_url":null,"open_issues_count":22,"forks":737,"open_issues":22,"watchers":1670,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1804"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1804"},"issue":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1804"},"comments":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1804/comments"},"review_comments":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1804/comments"},"review_comment":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1804/commits"},"statuses":{"href":"https://api.github.com/repos/buildbot/buildbot/statuses/c79454c60eea453b2d01375fa168296d32f47faf"}}}}