)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":9684,"name":"Jia Dong","email":"joey5566@yeah.net","username":"joey5678"},"change_message_id":"c59d8f1ed5296a186c86bad8d1e5ca5fe29268f7","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                   max\u003d9,"},{"line_number":698,"context_line":"                   avg\u003d4.5,"},{"line_number":699,"context_line":"                   sum\u003d45,"},{"line_number":700,"context_line":"                   count\u003d10,"},{"line_number":701,"context_line":"                   duration_start\u003ddatetime.datetime(2013, 1, 4, 16, 42),"},{"line_number":702,"context_line":"                   duration_end\u003ddatetime.datetime(2013, 1, 4, 16, 47),"},{"line_number":703,"context_line":"                   period\u003d7200,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Fbvw%3D","line":700,"updated":"2014-02-13 08:56:17.000000000","message":"Whether a corresponding change needs to be done here?   like \u0027aggregate\u003d{...}\u0027","commit_id":"4d24d61fe6c0d99238fb14afa4f7abbb929f099d"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"bc28d645eed3e68560981b7cddc1b4ca76be4437","unresolved":false,"context_lines":[{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def __init__(self, **kwargs):"},{"line_number":722,"context_line":"        super(Aggregate, self).__init__(**kwargs)"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    @staticmethod"},{"line_number":725,"context_line":"    def validate(aggregate):"},{"line_number":726,"context_line":"        return aggregate"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F9AI%3D","line":723,"updated":"2014-03-03 08:31:16.000000000","message":"Validation TBD?","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"be69d298fe23d18cf254fced69b3d6d3e3efb1dc","unresolved":false,"context_lines":[{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def __init__(self, **kwargs):"},{"line_number":722,"context_line":"        super(Aggregate, self).__init__(**kwargs)"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    @staticmethod"},{"line_number":725,"context_line":"    def validate(aggregate):"},{"line_number":726,"context_line":"        return aggregate"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F1pM%3D","line":723,"in_reply_to":"AAAAVn%2F%2F8PU%3D","updated":"2014-03-03 21:23:05.000000000","message":"Yep, kudos for spotting that.\n\nHowever I feel it makes more sense to do the validation selectively in the storage layer, because (a) the aggregates supported may in time differ from driver to driver, and (b) the valid values for a parameter to an aggregate function like cardinality may also be dependent on the details of the storage driver\u0027s schema (attribute naming etc.)\n\nI\u0027ve now added validation logic for parameterizable aggregates in a subsequent patch in this series.","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"a2f787b8f9ad215616f721e8ed14a44a1cd3c51f","unresolved":false,"context_lines":[{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    def __init__(self, **kwargs):"},{"line_number":722,"context_line":"        super(Aggregate, self).__init__(**kwargs)"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    @staticmethod"},{"line_number":725,"context_line":"    def validate(aggregate):"},{"line_number":726,"context_line":"        return aggregate"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F8PU%3D","line":723,"in_reply_to":"AAAAVn%2F%2F9AI%3D","updated":"2014-03-03 09:32:48.000000000","message":"We really needs a validation method, because currently the \u0027param\u0027 appear into the mongo mapreduce bson without any check, \n\nI think something like this is possible:\n\n   \"] ; put_code_to_inject_here ; bla[\".","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"06c08167dc022c58b14d1b6f23c92657377969e7","unresolved":false,"context_lines":[{"line_number":735,"context_line":"    @staticmethod"},{"line_number":736,"context_line":"    def _stats_result_aggregates(result, aggregate):"},{"line_number":737,"context_line":"        stats_args \u003d {}"},{"line_number":738,"context_line":"        if isinstance(result.count, (int, long)):"},{"line_number":739,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":740,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"},{"line_number":741,"context_line":"            if hasattr(result, attr):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2FzUk%3D","line":738,"updated":"2014-02-28 08:32:06.000000000","message":"Just wondering if it is possible that the result.count is not integer?\n\nAlso I think it\u0027s possible that result.count is not even available here.","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c2b871e00ac30d5979eec6c8255ae0f9d0f40158","unresolved":false,"context_lines":[{"line_number":735,"context_line":"    @staticmethod"},{"line_number":736,"context_line":"    def _stats_result_aggregates(result, aggregate):"},{"line_number":737,"context_line":"        stats_args \u003d {}"},{"line_number":738,"context_line":"        if isinstance(result.count, (int, long)):"},{"line_number":739,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":740,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"},{"line_number":741,"context_line":"            if hasattr(result, attr):"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2FxnM%3D","line":738,"in_reply_to":"AAAAVX%2F%2FzUk%3D","updated":"2014-02-28 11:32:23.000000000","message":"Yes, unfortunately we\u0027ve allowed a situation to arise where IIUC the built-in count method on the standard python tuple type (as extended here by sqlalchemy.util.KeyedTuple) is shadowed by our own sample count.\n\nSo result.count is indeed always available, either set to an integer sample count that we construct when the count aggregate is selected (always the case prior to this patch) or else as the builtin method count().\n\nThis is a not ideal situation, but the type checking logic in line 738 allowed me to work around the issue.","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"06c08167dc022c58b14d1b6f23c92657377969e7","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":740,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"},{"line_number":741,"context_line":"            if hasattr(result, attr):"},{"line_number":742,"context_line":"                stats_args[attr] \u003d getattr(result, attr)"},{"line_number":743,"context_line":"        if aggregate:"},{"line_number":744,"context_line":"            stats_args[\u0027aggregate\u0027] \u003d dict("},{"line_number":745,"context_line":"                (\u0027%s%s\u0027 % (a.func, \u0027/%s\u0027 % a.param if a.param else \u0027\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2Fy0Y%3D","line":742,"updated":"2014-02-28 08:32:06.000000000","message":"I believe the duplication between this and the content under the key \u0027aggregate\u0027 is meant to provide backward compatibility, right? no objection.","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c2b871e00ac30d5979eec6c8255ae0f9d0f40158","unresolved":false,"context_lines":[{"line_number":739,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":740,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"},{"line_number":741,"context_line":"            if hasattr(result, attr):"},{"line_number":742,"context_line":"                stats_args[attr] \u003d getattr(result, attr)"},{"line_number":743,"context_line":"        if aggregate:"},{"line_number":744,"context_line":"            stats_args[\u0027aggregate\u0027] \u003d dict("},{"line_number":745,"context_line":"                (\u0027%s%s\u0027 % (a.func, \u0027/%s\u0027 % a.param if a.param else \u0027\u0027),"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2Fyl4%3D","line":742,"in_reply_to":"AAAAVX%2F%2Fy0Y%3D","updated":"2014-02-28 11:32:23.000000000","message":"Yes, that was the idea, to chart a course between the standard aggregate values (if selected) being available at the top-level as before, but also within the new aggregate structure alongside any further aggregates chosen (e.g. cardinality, stddev).\n\nOnly the standard aggregates are duplicated in this way.","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"bc28d645eed3e68560981b7cddc1b4ca76be4437","unresolved":false,"context_lines":[{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    @staticmethod"},{"line_number":685,"context_line":"    def _stats_result_aggregates(result, aggregate):"},{"line_number":686,"context_line":"        stats_args \u003d {}"},{"line_number":687,"context_line":"        if isinstance(result.count, (int, long)):"},{"line_number":688,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":689,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F86Y%3D","line":686,"updated":"2014-03-03 08:31:16.000000000","message":"Why do you need this? Cast to int if the value is already int?","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"be69d298fe23d18cf254fced69b3d6d3e3efb1dc","unresolved":false,"context_lines":[{"line_number":683,"context_line":""},{"line_number":684,"context_line":"    @staticmethod"},{"line_number":685,"context_line":"    def _stats_result_aggregates(result, aggregate):"},{"line_number":686,"context_line":"        stats_args \u003d {}"},{"line_number":687,"context_line":"        if isinstance(result.count, (int, long)):"},{"line_number":688,"context_line":"            stats_args[\u0027count\u0027] \u003d int(result.count)"},{"line_number":689,"context_line":"        for attr in [\u0027min\u0027, \u0027max\u0027, \u0027sum\u0027, \u0027avg\u0027]:"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F1ng%3D","line":686,"in_reply_to":"AAAAVn%2F%2F86Y%3D","updated":"2014-03-03 21:23:05.000000000","message":"Good point, I must have been thinking belt and braces ;)\n\nFixed in latest.","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"}],"ceilometer/tests/api/v2/test_statistics_scenarios.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"4d60afc0c45fbe978f1caf21a0fa410d90f21944","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"            grp \u003d r[\u0027groupby\u0027]"},{"line_number":1408,"context_line":"            if grp \u003d\u003d {\u0027project_id\u0027: \u0027project-1\u0027}:"},{"line_number":1409,"context_line":"                expected \u003d expected_values[0]"},{"line_number":1410,"context_line":"                self.assertEqual(r[\u0027unit\u0027], \u0027instance\u0027)"},{"line_number":1411,"context_line":"                self.assertAlmostEqual(r[aggregate], expected)"},{"line_number":1412,"context_line":"                self.assertIn(\u0027aggregate\u0027, r)"},{"line_number":1413,"context_line":"                self.assertIn(aggregate, r[\u0027aggregate\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2FysQ%3D","line":1410,"updated":"2014-02-28 08:41:50.000000000","message":"Maybe we  should follow the (expected, actual) order?","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"c2b871e00ac30d5979eec6c8255ae0f9d0f40158","unresolved":false,"context_lines":[{"line_number":1407,"context_line":"            grp \u003d r[\u0027groupby\u0027]"},{"line_number":1408,"context_line":"            if grp \u003d\u003d {\u0027project_id\u0027: \u0027project-1\u0027}:"},{"line_number":1409,"context_line":"                expected \u003d expected_values[0]"},{"line_number":1410,"context_line":"                self.assertEqual(r[\u0027unit\u0027], \u0027instance\u0027)"},{"line_number":1411,"context_line":"                self.assertAlmostEqual(r[aggregate], expected)"},{"line_number":1412,"context_line":"                self.assertIn(\u0027aggregate\u0027, r)"},{"line_number":1413,"context_line":"                self.assertIn(aggregate, r[\u0027aggregate\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAVX%2F%2Fxmk%3D","line":1410,"in_reply_to":"AAAAVX%2F%2FysQ%3D","updated":"2014-02-28 11:32:23.000000000","message":"Fair point, though Ilya has patches in the works that will convert the tests over en masse to use the correct ordering.\n\nI just followed the existing incorrect ordering used by the pre-existing code in the test for consistency.","commit_id":"bf4b1f276479242aa4a600eb0c784ef294fc611e"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"bc28d645eed3e68560981b7cddc1b4ca76be4437","unresolved":false,"context_lines":[{"line_number":1398,"context_line":"        groupby_keys_set \u003d set(x for sub_dict in data"},{"line_number":1399,"context_line":"                               for x in sub_dict[\u0027groupby\u0027].keys())"},{"line_number":1400,"context_line":"        groupby_vals_set \u003d set(x for sub_dict in data"},{"line_number":1401,"context_line":"                               for x in sub_dict[\u0027groupby\u0027].values())"},{"line_number":1402,"context_line":"        self.assertEqual(groupby_keys_set, set([\u0027project_id\u0027]))"},{"line_number":1403,"context_line":"        self.assertEqual(groupby_vals_set, set([\u0027project-1\u0027, \u0027project-2\u0027]))"},{"line_number":1404,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F8yg%3D","line":1401,"updated":"2014-03-03 08:31:16.000000000","message":"hm, there are several patches that change an order in assertEquals and assertEqual. Could you please fix this here? The order should be (expected, actual)","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"be69d298fe23d18cf254fced69b3d6d3e3efb1dc","unresolved":false,"context_lines":[{"line_number":1398,"context_line":"        groupby_keys_set \u003d set(x for sub_dict in data"},{"line_number":1399,"context_line":"                               for x in sub_dict[\u0027groupby\u0027].keys())"},{"line_number":1400,"context_line":"        groupby_vals_set \u003d set(x for sub_dict in data"},{"line_number":1401,"context_line":"                               for x in sub_dict[\u0027groupby\u0027].values())"},{"line_number":1402,"context_line":"        self.assertEqual(groupby_keys_set, set([\u0027project_id\u0027]))"},{"line_number":1403,"context_line":"        self.assertEqual(groupby_vals_set, set([\u0027project-1\u0027, \u0027project-2\u0027]))"},{"line_number":1404,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2F1mc%3D","line":1401,"in_reply_to":"AAAAVn%2F%2F8yg%3D","updated":"2014-03-03 21:23:05.000000000","message":"Yeah, we discussed that earlier in the gerrit trail. The idea is to keep it consistent with the (incorrect) ordering in the pre-existing test cases - as Ilya\u0027s patches are auto-generated, it\u0027s easy to pick up any new test cases and then simply regenerate these patches last before i3 closes.\n\nOnce Ilya\u0027s global re-ordering patches land, we should require that all new patches follow the correct param ordering in asserts.","commit_id":"4cd4e6d9b14ae8bb2b12fe29c8efd44d1474b441"}]}
