)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d8850aee9aaf17eb1805a72ca9eb406ab0fbbc8a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Eoghan Glynn \u003ceglynn@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-02-24 19:42:19 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Per pipeline plubbale resource discovery"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Addresses: BP decoupled-source-sink-discoverable-resources"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAU3%2F%2FyNk%3D","line":7,"updated":"2014-02-24 20:18:22.000000000","message":"s/plubbale/pluggable/","commit_id":"9d1c675d01142115030a4575055ec0c6fdc77f35"}],"ceilometer/agent.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"3a701fd1b7b0750f09cb78c8d341a755e782f996","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __init__(self, agent_manager):"},{"line_number":59,"context_line":"        self.manager \u003d agent_manager"},{"line_number":60,"context_line":"        self.pollsters \u003d set()"},{"line_number":61,"context_line":"        # we extend the amalgation of all static resources for this"},{"line_number":62,"context_line":"        # set of pollsters with a common interval, so as to also"},{"line_number":63,"context_line":"        # include any dynamically discovered resources specific to"},{"line_number":64,"context_line":"        # the matching pipelines (if either is present, the per-agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FsjI%3D","line":61,"updated":"2014-03-04 16:38:59.000000000","message":"amalgamation","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e12cc400146f1847808bbd95d0ef9b5ca092a3cf","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def __init__(self, agent_manager):"},{"line_number":59,"context_line":"        self.manager \u003d agent_manager"},{"line_number":60,"context_line":"        self.pollsters \u003d set()"},{"line_number":61,"context_line":"        # we extend the amalgation of all static resources for this"},{"line_number":62,"context_line":"        # set of pollsters with a common interval, so as to also"},{"line_number":63,"context_line":"        # include any dynamically discovered resources specific to"},{"line_number":64,"context_line":"        # the matching pipelines (if either is present, the per-agent"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FrsM%3D","line":61,"in_reply_to":"AAAAVn%2F%2FsjI%3D","updated":"2014-03-04 17:46:39.000000000","message":"Hmmm, if I make a spelling mistake once, my fingers seem to remember it and repeat endlessly ;)\n\nFixed in latest.","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5e120f624529b5b15b00d15ff2621652070c1fdb","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @property"},{"line_number":47,"context_line":"    def resources(self):"},{"line_number":48,"context_line":"        source_discovery \u003d (self.agent_manager.discover(self._discovery)"},{"line_number":49,"context_line":"                            if self._discovery else [])"},{"line_number":50,"context_line":"        return self._resources + source_discovery"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Fqco%3D","line":48,"updated":"2014-03-04 19:34:22.000000000","message":"I think it\u0027d be simpler if discover() would do nothing with [] and return [].","commit_id":"d011ec00970e4da6aee41d61b069265cc79f88b5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"b5479ad1e7f0b4e3058cd31494900d1726ba7bd7","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @property"},{"line_number":47,"context_line":"    def resources(self):"},{"line_number":48,"context_line":"        source_discovery \u003d (self.agent_manager.discover(self._discovery)"},{"line_number":49,"context_line":"                            if self._discovery else [])"},{"line_number":50,"context_line":"        return self._resources + source_discovery"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Fp8I%3D","line":48,"in_reply_to":"AAAAVn%2F%2Fqco%3D","updated":"2014-03-04 20:34:11.000000000","message":"Hmmm, that would be slightly problematic the way the logic is currently structured as [] passed to AgentManager.discover() means \"fallback to default per-agent discovery\" not \"do nothing\".\n\nNow I guess I could change AgentManager.discover() so that say a None and [] had different meanings but that seems to complicate discover() at least as much it simplifies Resources.resources.","commit_id":"d011ec00970e4da6aee41d61b069265cc79f88b5"}],"ceilometer/pipeline.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"5e120f624529b5b15b00d15ff2621652070c1fdb","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if not isinstance(self.resources, list):"},{"line_number":109,"context_line":"            raise PipelineException(\"Resources should be a list\", cfg)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        self.discovery \u003d cfg.get(\u0027discovery\u0027) or []"},{"line_number":112,"context_line":"        if not isinstance(self.discovery, list):"},{"line_number":113,"context_line":"            raise PipelineException(\"Discovery should be a list\", cfg)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2FqcM%3D","line":111,"updated":"2014-03-04 19:34:22.000000000","message":"cfg.get(\u0027discovery\u0027, [])","commit_id":"d011ec00970e4da6aee41d61b069265cc79f88b5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"32a841518b043319c6060963b1eb21e2483ae4ce","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if not isinstance(self.resources, list):"},{"line_number":109,"context_line":"            raise PipelineException(\"Resources should be a list\", cfg)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        self.discovery \u003d cfg.get(\u0027discovery\u0027) or []"},{"line_number":112,"context_line":"        if not isinstance(self.discovery, list):"},{"line_number":113,"context_line":"            raise PipelineException(\"Discovery should be a list\", cfg)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Fpls%3D","line":111,"in_reply_to":"AAAAVn%2F%2Fp5M%3D","updated":"2014-03-04 21:10:42.000000000","message":"Actually there\u0027s a bit of subtlety here, wereby\n\n   self.discovery \u003d cfg.get(\u0027discovery\u0027) or []\n\nis not equivalent to:\n\n  self.discovery \u003d cfg.get(\u0027discovery\u0027, [])\n\nwhere cfg[\u0027discovery\u0027] \u003d\u003d None (i.e. the \u0027discovery\u0027 element exists in the source YAML, but just has no values enumerated).\n\nSeems this distinction was relied upon in the similar construct for \u0027resources\u0027 on line 107 above, as that case would have arisen for the meter_pipeline in the old boilerplate pipeline.yaml:\n\n  https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/deprecated_pipeline.yaml#L7\n\nSo I think it safer to leave as is in order to maintain the tolerance to \u0027resources\u0027 or \u0027discovery\u0027 existing in the YAML, but with no values provided.","commit_id":"d011ec00970e4da6aee41d61b069265cc79f88b5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"b5479ad1e7f0b4e3058cd31494900d1726ba7bd7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        if not isinstance(self.resources, list):"},{"line_number":109,"context_line":"            raise PipelineException(\"Resources should be a list\", cfg)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        self.discovery \u003d cfg.get(\u0027discovery\u0027) or []"},{"line_number":112,"context_line":"        if not isinstance(self.discovery, list):"},{"line_number":113,"context_line":"            raise PipelineException(\"Discovery should be a list\", cfg)"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVn%2F%2Fp5M%3D","line":111,"in_reply_to":"AAAAVn%2F%2FqcM%3D","updated":"2014-03-04 20:34:11.000000000","message":"Yep, good spot.","commit_id":"d011ec00970e4da6aee41d61b069265cc79f88b5"}],"ceilometer/tests/agentbase.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"3a701fd1b7b0750f09cb78c8d341a755e782f996","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        self.DiscoveryAnother.params \u003d []"},{"line_number":261,"context_line":"        self.DiscoveryException.params \u003d []"},{"line_number":262,"context_line":"        self.Discovery.resources \u003d []"},{"line_number":263,"context_line":"        self.DiscoveryAnother.resources \u003d []"},{"line_number":264,"context_line":"        super(BaseAgentManagerTestCase, self).tearDown()"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def test_setup_polling_tasks(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Fsdk%3D","line":263,"updated":"2014-03-04 16:38:59.000000000","message":"probably out of scope of this patch, but i think we missed self.DiscoveryException.resources in another patch","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e12cc400146f1847808bbd95d0ef9b5ca092a3cf","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        self.DiscoveryAnother.params \u003d []"},{"line_number":261,"context_line":"        self.DiscoveryException.params \u003d []"},{"line_number":262,"context_line":"        self.Discovery.resources \u003d []"},{"line_number":263,"context_line":"        self.DiscoveryAnother.resources \u003d []"},{"line_number":264,"context_line":"        super(BaseAgentManagerTestCase, self).tearDown()"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def test_setup_polling_tasks(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FrtE%3D","line":263,"in_reply_to":"AAAAVn%2F%2Fsdk%3D","updated":"2014-03-04 17:46:39.000000000","message":"Well IIUC there\u0027s no need to clear self.DiscoveryException.resources, as unlike the other two, this attribute is not set for the exception-raising discoverer:\n\n  https://github.com/openstack/ceilometer/blob/master/ceilometer/tests/agentbase.py#L160","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"3a701fd1b7b0750f09cb78c8d341a755e782f996","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        self.setup_pipeline()"},{"line_number":443,"context_line":"        polling_tasks \u003d self.mgr.setup_polling_tasks()"},{"line_number":444,"context_line":"        self.mgr.interval_task(polling_tasks.get(60))"},{"line_number":445,"context_line":"        discovery \u003d self.Discovery.resources + self.DiscoveryAnother.resources"},{"line_number":446,"context_line":"        # compare resource lists modulo ordering"},{"line_number":447,"context_line":"        self.assertEqual(set(self.Pollster.resources),"},{"line_number":448,"context_line":"                         set(static_resources + discovery))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2FsVY%3D","line":445,"updated":"2014-03-04 16:38:59.000000000","message":"i don\u0027t really get why discovery \u003d self.Discovery.resources + self.DiscoveryAnother.resources? that seems like it\u0027s just the same list appended together in opposite orders...but than when we use set below it\u0027ll end up clearing the dups","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e12cc400146f1847808bbd95d0ef9b5ca092a3cf","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        self.setup_pipeline()"},{"line_number":443,"context_line":"        polling_tasks \u003d self.mgr.setup_polling_tasks()"},{"line_number":444,"context_line":"        self.mgr.interval_task(polling_tasks.get(60))"},{"line_number":445,"context_line":"        discovery \u003d self.Discovery.resources + self.DiscoveryAnother.resources"},{"line_number":446,"context_line":"        # compare resource lists modulo ordering"},{"line_number":447,"context_line":"        self.assertEqual(set(self.Pollster.resources),"},{"line_number":448,"context_line":"                         set(static_resources + discovery))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAVn%2F%2Frvs%3D","line":445,"in_reply_to":"AAAAVn%2F%2FsVY%3D","updated":"2014-03-04 17:46:39.000000000","message":"No the reversal is done on the list elements themselves, as opposed to lists.\n\nSo we end up with:\n\n  [\u0027discovered_1\u0027, \u0027discovered_2\u0027] + [\u00271_derevocsid\u0027, \u00272_derevocsid\u0027]\n\nso the string reversal ensures no dupes (in the absence of palindromes ;)","commit_id":"d1692bf81126653305d559df8de9ce33340c43ae"}]}
