)]}'
{"cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"cdc3560de274160d4368fc3466be79a0e87e2eeb","unresolved":true,"context_lines":[{"line_number":6135,"context_line":"                            rccg \u003d self._helpers.get_rccg(rccg_name)"},{"line_number":6136,"context_line":""},{"line_number":6137,"context_line":"                    if (rccg[\u0027copy_type\u0027] !\u003d \u0027empty_group\u0027 and"},{"line_number":6138,"context_line":"                        (rccg[\u0027copy_type\u0027] !\u003d rcrel[\u0027copy_type\u0027] or"},{"line_number":6139,"context_line":"                         rccg[\u0027state\u0027] !\u003d rcrel[\u0027state\u0027] or"},{"line_number":6140,"context_line":"                         rccg[\u0027primary\u0027] !\u003d rcrel[\u0027primary\u0027] or"},{"line_number":6141,"context_line":"                         rccg[\u0027cycling_mode\u0027] !\u003d rcrel[\u0027cycling_mode\u0027] or"}],"source_content_type":"text/x-python","patch_set":13,"id":"4c3af17e_4e76e7d4","line":6138,"updated":"2021-08-17 16:46:48.000000000","message":"This might be a lot simpler as:\n    if any(k for k in (\u0027copy_type\u0027, \u0027state\u0027, \u0027primary\u0027, \u0027cycling_mode\u0027) if rccg[k] !\u003d rcrel[k])\n        LOG.error(\"Failed to update rccg: %(rccg)s - rcrel %(rcrel)s\" % {\u0027rccg\u0027: rccg, \u0027rcrel\u0027: rcrel)\n\nor so  (just log the whole dict)","commit_id":"9c79bf68a06d745520db1fa55b80e40b1eada3be"},{"author":{"_account_id":32036,"name":"katari manoj kumar","email":"katkumar@in.ibm.com","username":"katarimanojkumar"},"change_message_id":"8dbe2a47705f6f5556cc277ac00f2df6f07a353b","unresolved":true,"context_lines":[{"line_number":6135,"context_line":"                            rccg \u003d self._helpers.get_rccg(rccg_name)"},{"line_number":6136,"context_line":""},{"line_number":6137,"context_line":"                    if (rccg[\u0027copy_type\u0027] !\u003d \u0027empty_group\u0027 and"},{"line_number":6138,"context_line":"                        (rccg[\u0027copy_type\u0027] !\u003d rcrel[\u0027copy_type\u0027] or"},{"line_number":6139,"context_line":"                         rccg[\u0027state\u0027] !\u003d rcrel[\u0027state\u0027] or"},{"line_number":6140,"context_line":"                         rccg[\u0027primary\u0027] !\u003d rcrel[\u0027primary\u0027] or"},{"line_number":6141,"context_line":"                         rccg[\u0027cycling_mode\u0027] !\u003d rcrel[\u0027cycling_mode\u0027] or"}],"source_content_type":"text/x-python","patch_set":13,"id":"b56d9e3f_f43bca47","line":6138,"in_reply_to":"4c3af17e_4e76e7d4","updated":"2021-08-18 14:29:05.000000000","message":"I can simplify the if condition as\n\n    any(k for k in (\u0027copy_type\u0027, \u0027state\u0027, \u0027primary\u0027, \n                    \u0027cycling_mode\u0027, \u0027cycle_period_seconds\u0027)  \n        if rccg[k] !\u003d rcrel[k])):\n\nBut for the error log,i feel the current log gives good readability to the user as shown below.\n\"Failed to update rccg rccg-23db-144d2: remote copy type of 76ebda4c-256e-4721-8791-04f64b434e85 is global, the rccg type is global. rcrel state is consistent_stopped, rccg state is consistent_synchronized. rcrel primary is master, rccg primary is master\"\n\nAs per your comment , we will have to print the two dict as whole and user cannot find varied attributes at first look. use should compare the dictionaries.","commit_id":"9c79bf68a06d745520db1fa55b80e40b1eada3be"}]}
