)]}'
{"cinder/objects/base.py":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"f2e8ab51d93a2fdecaa6c948e835e82913a24b48","unresolved":false,"context_lines":[{"line_number":446,"context_line":"              callable(entity.obj_to_primitive)):"},{"line_number":447,"context_line":"            # NOTE(dulek): Backport outgoing object to the capped version."},{"line_number":448,"context_line":"            backport_ver \u003d self._get_capped_obj_version(entity)"},{"line_number":449,"context_line":"            if backport_ver and backport_ver !\u003d entity.VERSION:"},{"line_number":450,"context_line":"                LOG.debug(\u0027Backporting %(obj_name)s from version %(src_vers)s \u0027"},{"line_number":451,"context_line":"                          \u0027to version %(dst_vers)s\u0027,"},{"line_number":452,"context_line":"                          {\u0027obj_name\u0027: entity.obj_name(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_f8a9977c","line":449,"updated":"2016-05-31 02:29:44.000000000","message":"Just reminder here: In the case which parent\u0027s version is not changed but child\u0027s version is changed, the debug info will not recorded but backport happened. Better we give some comments here.","commit_id":"54750ac522e3c6d2580475e3089b820273dc5b13"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"c27019ad7c1b251d6575c970901dd485a5a431a0","unresolved":false,"context_lines":[{"line_number":446,"context_line":"              callable(entity.obj_to_primitive)):"},{"line_number":447,"context_line":"            # NOTE(dulek): Backport outgoing object to the capped version."},{"line_number":448,"context_line":"            backport_ver \u003d self._get_capped_obj_version(entity)"},{"line_number":449,"context_line":"            if backport_ver and backport_ver !\u003d entity.VERSION:"},{"line_number":450,"context_line":"                LOG.debug(\u0027Backporting %(obj_name)s from version %(src_vers)s \u0027"},{"line_number":451,"context_line":"                          \u0027to version %(dst_vers)s\u0027,"},{"line_number":452,"context_line":"                          {\u0027obj_name\u0027: entity.obj_name(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_820a8c77","line":449,"in_reply_to":"9abb7d3a_18f45b84","updated":"2016-05-31 10:07:05.000000000","message":"You are right, I didn\u0027t change the logic here after changing the mechanism, which will lead to a very poor solution.  I\u0027ll change it to be more in sync with current approach and report all performed backports.","commit_id":"54750ac522e3c6d2580475e3089b820273dc5b13"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"35f53edad03e27259513b739bfeef5c6694662da","unresolved":false,"context_lines":[{"line_number":446,"context_line":"              callable(entity.obj_to_primitive)):"},{"line_number":447,"context_line":"            # NOTE(dulek): Backport outgoing object to the capped version."},{"line_number":448,"context_line":"            backport_ver \u003d self._get_capped_obj_version(entity)"},{"line_number":449,"context_line":"            if backport_ver and backport_ver !\u003d entity.VERSION:"},{"line_number":450,"context_line":"                LOG.debug(\u0027Backporting %(obj_name)s from version %(src_vers)s \u0027"},{"line_number":451,"context_line":"                          \u0027to version %(dst_vers)s\u0027,"},{"line_number":452,"context_line":"                          {\u0027obj_name\u0027: entity.obj_name(),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_18f45b84","line":449,"in_reply_to":"9abb7d3a_f8a9977c","updated":"2016-05-31 02:32:07.000000000","message":"When calling serialize_entity to serialize the parent in above case, LOG.debug will not be called. I think we need to give comments about such cases so that when people debug such cases they notice this point.","commit_id":"54750ac522e3c6d2580475e3089b820273dc5b13"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"816e6c247925b4e9c841517337b9cb20c01b8731","unresolved":false,"context_lines":[{"line_number":407,"context_line":"class ObjectListBase(base.ObjectListBase):"},{"line_number":408,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":409,"context_line":"        _log_backport(self, target_version)"},{"line_number":410,"context_line":"        super(CinderObject, self).obj_make_compatible(primitive,"},{"line_number":411,"context_line":"                                                      target_version)"},{"line_number":412,"context_line":""},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_c1dc8975","line":410,"range":{"start_line":410,"start_character":14,"end_line":410,"end_character":26},"updated":"2016-05-31 11:57:52.000000000","message":"-1: ObjectListBase","commit_id":"f21c07a7e8c654d9cc7f623c3184ac16f4363295"}],"cinder/tests/unit/objects/test_base.py":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"08eb7bdf9d36475186dec5b818b25c9925b2a301","unresolved":false,"context_lines":[{"line_number":731,"context_line":"        self.obj \u003d TestObject(scheduled_at\u003dNone, uuid\u003duuid.uuid4(),"},{"line_number":732,"context_line":"                              text\u003d\u0027text\u0027)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    @mock.patch(\u0027oslo_log.log.KeywordArgumentAdapter.debug\u0027)"},{"line_number":735,"context_line":"    def test_serialize_entity_backport(self, log_debug_mock):"},{"line_number":736,"context_line":"        serializer \u003d objects.base.CinderObjectSerializer(\u00271.0\u0027)"},{"line_number":737,"context_line":"        primitive \u003d serializer.serialize_entity(self.context, self.obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_98de6b0f","line":734,"updated":"2016-05-26 06:23:48.000000000","message":"I think it is better not to touch oslo_log inside. We can check LOG. debug is called like following:\n\nhttps://github.com/openstack/cinder/blob/master/cinder/tests/unit/test_backup.py#L429\n\nThe reason is that later if something changes in oslo, like name of KeywordArgumentAdapter is changed,  Cinder unit test will not fail.","commit_id":"fc81342823093158130d7b4fb47ec94cc31063c7"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"3628ff3fd6ff16470c0a3588933cb7822a50c994","unresolved":false,"context_lines":[{"line_number":731,"context_line":"        self.obj \u003d TestObject(scheduled_at\u003dNone, uuid\u003duuid.uuid4(),"},{"line_number":732,"context_line":"                              text\u003d\u0027text\u0027)"},{"line_number":733,"context_line":""},{"line_number":734,"context_line":"    @mock.patch(\u0027oslo_log.log.KeywordArgumentAdapter.debug\u0027)"},{"line_number":735,"context_line":"    def test_serialize_entity_backport(self, log_debug_mock):"},{"line_number":736,"context_line":"        serializer \u003d objects.base.CinderObjectSerializer(\u00271.0\u0027)"},{"line_number":737,"context_line":"        primitive \u003d serializer.serialize_entity(self.context, self.obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_6f75b8f8","line":734,"in_reply_to":"bab6814e_98de6b0f","updated":"2016-05-26 09:46:53.000000000","message":"You are totally right, my bad.  :-)","commit_id":"fc81342823093158130d7b4fb47ec94cc31063c7"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"08eb7bdf9d36475186dec5b818b25c9925b2a301","unresolved":false,"context_lines":[{"line_number":742,"context_line":"                             \u0027src_vers\u0027: \u00271.1\u0027,"},{"line_number":743,"context_line":"                             \u0027dst_vers\u0027: \u00271.0\u0027})"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    @mock.patch(\u0027oslo_log.log.KeywordArgumentAdapter.debug\u0027)"},{"line_number":746,"context_line":"    def test_serialize_entity_unknown_version(self, log_debug_mock):"},{"line_number":747,"context_line":"        serializer \u003d objects.base.CinderObjectSerializer(\u00270.9\u0027)"},{"line_number":748,"context_line":"        primitive \u003d serializer.serialize_entity(self.context, self.obj)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_18d39b05","line":745,"updated":"2016-05-26 06:23:48.000000000","message":"Same above.","commit_id":"fc81342823093158130d7b4fb47ec94cc31063c7"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"43fe26ab3b7d0bdb7a3e39c93d8af3850f16b5da","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        data \u003d primitive[\u0027versioned_object.data\u0027]"},{"line_number":762,"context_line":"        self.assertNotIn(\u0027integer\u0027, data)"},{"line_number":763,"context_line":"        self.assertEqual(\u0027text\u0027, data[\u0027text\u0027])"},{"line_number":764,"context_line":"        log_debug_mock.assert_called_once_with("},{"line_number":765,"context_line":"            \u0027Backporting %(obj_name)s from version %(src_vers)s to version \u0027"},{"line_number":766,"context_line":"            \u0027%(dst_vers)s\u0027, {\u0027obj_name\u0027: \u0027ChildObject\u0027,"},{"line_number":767,"context_line":"                             \u0027src_vers\u0027: \u00271.2\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_433d12dc","line":764,"updated":"2016-05-26 17:28:44.000000000","message":"In some of my patches, I was asked to remove assertions like this. I think they have a point-- the tests will be become difficult to maintain if we are going to assert for each and every log statement. Since this patch is not addressing a bug, I don\u0027t think there is no need to add/update a unit test which would fail without the fix.","commit_id":"cce19b54bb1214bab60a025103fe9c26f0569219"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"fb2e4a13feaf1e7a242f214a3ad72a1a5b4254f6","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        data \u003d primitive[\u0027versioned_object.data\u0027]"},{"line_number":762,"context_line":"        self.assertNotIn(\u0027integer\u0027, data)"},{"line_number":763,"context_line":"        self.assertEqual(\u0027text\u0027, data[\u0027text\u0027])"},{"line_number":764,"context_line":"        log_debug_mock.assert_called_once_with("},{"line_number":765,"context_line":"            \u0027Backporting %(obj_name)s from version %(src_vers)s to version \u0027"},{"line_number":766,"context_line":"            \u0027%(dst_vers)s\u0027, {\u0027obj_name\u0027: \u0027ChildObject\u0027,"},{"line_number":767,"context_line":"                             \u0027src_vers\u0027: \u00271.2\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9abb7d3a_e4396043","line":764,"in_reply_to":"bab6814e_433d12dc","updated":"2016-05-27 09:06:52.000000000","message":"Let me start by saying that in general I agree with your comment, and I evaluated both options but finally decided to go with this one, and the reason was that I see it as different when you are adding code that adds functionality and has log calls than when you are adding a patch with the only purpose of logging something.\n\nAlso the reason to check the calls both in L753 and here is to confirm that in one case it\u0027s not being called as it would generate tremendous amounts of entries during normal operation since it would be on every RPC call, and in the other case that we are actually giving the right data, as this is really important to troubleshoot a feature we are not yet comfortable with.\n\nBy the way, this code will probably go away in a couple of releases, once we know there\u0027s nothing wrong here anymore.  ;-)","commit_id":"cce19b54bb1214bab60a025103fe9c26f0569219"}]}
