)]}'
{"storlets/sbus/datagram.py":[{"author":{"_account_id":11317,"name":"Eran Rom","email":"eran@itsonlyme.name","username":"eranr"},"change_message_id":"b1d625c141123b226bc937ca6ce6f38015e2a78e","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @property"},{"line_number":35,"context_line":"    def metadata(self):"},{"line_number":36,"context_line":"        storlets_metadata \u003d copy.deepcopy(self.storlets_metadata)"},{"line_number":37,"context_line":"        storlets_metadata[\u0027type\u0027] \u003d self.fdtype"},{"line_number":38,"context_line":"        return {\u0027storlets\u0027: storlets_metadata,"},{"line_number":39,"context_line":"                \u0027storage\u0027: self.storage_metadata}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_a3b95017","line":36,"updated":"2017-01-30 10:05:38.000000000","message":"nit: I wonder if we really need the deep copy here.","commit_id":"eaf0ca23189896225e7549c84879bb643f7aee04"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"4ab1916aaa1702b45b47566bc56054ebd3cecfda","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @property"},{"line_number":35,"context_line":"    def metadata(self):"},{"line_number":36,"context_line":"        storlets_metadata \u003d copy.deepcopy(self.storlets_metadata)"},{"line_number":37,"context_line":"        storlets_metadata[\u0027type\u0027] \u003d self.fdtype"},{"line_number":38,"context_line":"        return {\u0027storlets\u0027: storlets_metadata,"},{"line_number":39,"context_line":"                \u0027storage\u0027: self.storage_metadata}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a461143_363cb1c7","line":36,"in_reply_to":"3a461143_a3b95017","updated":"2017-01-30 15:18:44.000000000","message":"This is required, because we don\u0027t like to include \u0027type\u0027 key in original storlets_metadata, and only add it we get Metadata info via metadata property.\n\nIf we don\u0027t have this deepcopy, storlets_metadata is updated to have type key after we call its metadata property, which I\u0027m afraid seems very strange behavior.","commit_id":"eaf0ca23189896225e7549c84879bb643f7aee04"}],"tests/unit/sbus/test_datagram.py":[{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"bb4841ff5b698a67e937201d4953dd6cb46c6ce6","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_from_metadata_dict(self):"},{"line_number":43,"context_line":"        fd \u003d SBusFileDescriptor.from_metadata_dict("},{"line_number":44,"context_line":"            1,"},{"line_number":45,"context_line":"            {\u0027storlets\u0027: {\u0027type\u0027: \u0027MYTYPE\u0027, \u0027storlets_key\u0027: \u0027storlets_value\u0027},"},{"line_number":46,"context_line":"             \u0027storage\u0027: {\u0027storage_key\u0027: \u0027storage_value\u0027}})"},{"line_number":47,"context_line":"        self.assertEqual(1, fd.fileno)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_e66b251b","line":44,"updated":"2019-09-25 05:18:57.000000000","message":"ah... this is missing the context `from_metadata_dict` because the first arg 1 is not a dict just a fileno.\n\nStrictly, it should be like \"fileno\": 1 in the dict?","commit_id":"fe147986fc678734d00cd04aba152d8bd59d8e74"},{"author":{"_account_id":9816,"name":"Takashi Kajinami","email":"kajinamit@oss.nttdata.com","username":"kajinamit"},"change_message_id":"d39efc6d6865e32f73f93988efc30666a0a5f1af","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_from_metadata_dict(self):"},{"line_number":43,"context_line":"        fd \u003d SBusFileDescriptor.from_metadata_dict("},{"line_number":44,"context_line":"            1,"},{"line_number":45,"context_line":"            {\u0027storlets\u0027: {\u0027type\u0027: \u0027MYTYPE\u0027, \u0027storlets_key\u0027: \u0027storlets_value\u0027},"},{"line_number":46,"context_line":"             \u0027storage\u0027: {\u0027storage_key\u0027: \u0027storage_value\u0027}})"},{"line_number":47,"context_line":"        self.assertEqual(1, fd.fileno)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_3223acbf","line":44,"in_reply_to":"3fa7e38b_e66b251b","updated":"2019-09-25 13:26:08.000000000","message":"I agree that this name is confusing.\n\nHowever, I\u0027m afraid that it is not a good idea to have fileno inside dict.\nIn sbus layer we always get a list of fileno and a list of metadata independently, and placing fd inside metadata cause the following redundant process.\n 1. Get fileno and its metadata independently from sbus c lib\n 2. Merge fileno into metadata in build_datagram\n 3. Then get fileno from metadata here\n\nplease have a look at subsequent patch, where I revert the change in args with fixing this confusing funcname.\n\n[1] https://review.opendev.org/#/c/676962/","commit_id":"fe147986fc678734d00cd04aba152d8bd59d8e74"}]}
