)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"4e53ef8d9976e2cdc003c807d74c3eddeca1c8dc","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Log exceptions for errors happenning during security groups and rules"},{"line_number":10,"context_line":"callbacks. The callback manager triggering these callbacks wont do"},{"line_number":11,"context_line":"any logging for precommit events. On situations like [1], is was"},{"line_number":12,"context_line":"necessary to enable debug logging to check the reason for error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The error will still be logged on debug if there is going to be a retry,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f93b717_2d936b51","line":11,"range":{"start_line":11,"start_character":58,"end_line":11,"end_character":60},"updated":"2018-01-29 14:40:54.000000000","message":"nit: it","commit_id":"7798d18f1399f97a89e553e2d79b1cf26d2a3854"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"4e53ef8d9976e2cdc003c807d74c3eddeca1c8dc","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Log exceptions for errors happenning during security groups and rules"},{"line_number":10,"context_line":"callbacks. The callback manager triggering these callbacks wont do"},{"line_number":11,"context_line":"any logging for precommit events. On situations like [1], is was"},{"line_number":12,"context_line":"necessary to enable debug logging to check the reason for error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The error will still be logged on debug if there is going to be a retry,"},{"line_number":15,"context_line":"and exception logged otherwise. This mimics logging behavior of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f93b717_ed9ca35e","line":12,"range":{"start_line":12,"start_character":54,"end_line":12,"end_character":57},"updated":"2018-01-29 14:40:54.000000000","message":"nit: behind the","commit_id":"7798d18f1399f97a89e553e2d79b1cf26d2a3854"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"4e53ef8d9976e2cdc003c807d74c3eddeca1c8dc","unresolved":false,"context_lines":[{"line_number":11,"context_line":"any logging for precommit events. On situations like [1], is was"},{"line_number":12,"context_line":"necessary to enable debug logging to check the reason for error."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The error will still be logged on debug if there is going to be a retry,"},{"line_number":15,"context_line":"and exception logged otherwise. This mimics logging behavior of"},{"line_number":16,"context_line":"mechanism driver calls."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Regarding [1], see change #536935 for a fix that prevents the exception."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f93b717_6da89376","line":16,"range":{"start_line":14,"start_character":0,"end_line":16,"end_character":23},"updated":"2018-01-29 14:40:54.000000000","message":"This is broader than the scope of the change.\n\nI would write something like:\n\nThis patch adds EXCEPTION-level logging for non-retriable exceptions during the callback","commit_id":"7798d18f1399f97a89e553e2d79b1cf26d2a3854"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"9b3ae986dfe98d35d7afd410663188bbc9e842db","unresolved":false,"context_lines":[{"line_number":17,"context_line":"[1] http://jira.opendaylight.org/browse/NETVIRT-896"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I49872b5b65372ac333ad759bb506fac7348c3fa9"},{"line_number":20,"context_line":"Signed-off-by: Jaime Caamaño Ruiz \u003cjcaamano@suse.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"3fa0c359_bf5bc1f3","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":53},"updated":"2018-02-13 03:20:13.000000000","message":"Please drop s-o-b because openstack doesn\u0027t adapt it.","commit_id":"4dfec4c0b45d1968255fc47a06f2f4fc49be2e77"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"d8a227686f8c15e9e7c469266c3ea311152cd49f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Regarding [1], see change #536935 for a fix that prevents the exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] http://jira.opendaylight.org/browse/NETVIRT-896"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I49872b5b65372ac333ad759bb506fac7348c3fa9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa0c359_6b4a2d84","line":18,"updated":"2018-02-14 17:39:40.000000000","message":"also add\nco-authored-by: Jaime Caamaño Ruiz\u003cjcaamano@suse.com\u003e\n\nas I see you contributed and drove this patch","commit_id":"427517e751ce79587d43f4621cc3c10e79401366"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"085d7275bc79528ab0fa3dc641adb013e3eda48f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Regarding [1], see change #536935 for a fix that prevents the exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] http://jira.opendaylight.org/browse/NETVIRT-896"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I49872b5b65372ac333ad759bb506fac7348c3fa9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa0c359_319d720a","line":18,"in_reply_to":"3fa0c359_6b4a2d84","updated":"2018-02-14 18:42:04.000000000","message":"definitively.","commit_id":"427517e751ce79587d43f4621cc3c10e79401366"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"692ab63433a24ad3e9bad210ad82072c02a26c2d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"own for precommit events. On situations like [1], it was necessary to"},{"line_number":13,"context_line":"enable debug logging to check the reason behind the error."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Regarding [1], see change #536935 for a fix that prevents the exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] http://jira.opendaylight.org/browse/NETVIRT-896"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3fa0c359_1fdd2e6f","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":33},"updated":"2018-02-22 16:15:36.000000000","message":"just a small comment, they are now preferring to use full links to changes, as the commit might end up in different systems and to avoid confusion","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"ccdfaeaad7fb2b49055807148398028d30980d8c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"own for precommit events. On situations like [1], it was necessary to"},{"line_number":13,"context_line":"enable debug logging to check the reason behind the error."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Regarding [1], see change #536935 for a fix that prevents the exception."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"[1] http://jira.opendaylight.org/browse/NETVIRT-896"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3fa0c359_fd4b7527","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":33},"in_reply_to":"3fa0c359_1fdd2e6f","updated":"2018-02-26 10:56:25.000000000","message":"Done","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"}],"networking_odl/common/callback.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"473a4ad38f1852c3f1c9cea6f94df90c1ddd5a06","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            callback(context, odl_ops, odl_res_type, res_id, odl_res_dict,"},{"line_number":94,"context_line":"                     **copy_kwargs)"},{"line_number":95,"context_line":"        except Exception:"},{"line_number":96,"context_line":"            # In case of precommit, neutron registry notification caller"},{"line_number":97,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":98,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":99,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_ab89aaca","line":96,"range":{"start_line":96,"start_character":17,"end_line":96,"end_character":34},"updated":"2018-01-15 16:00:29.000000000","message":"Doesn\u0027t it happen generally in case of notification?\n\nI believe not logging has to do with the type of exception not the method call itself.","commit_id":"0d741cb9a0dd2a66ffabe1fe3cef97b147c815b8"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"defac4bcd7a8d280e62d2f17f06f4c8a9633d75b","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            callback(context, odl_ops, odl_res_type, res_id, odl_res_dict,"},{"line_number":94,"context_line":"                     **copy_kwargs)"},{"line_number":95,"context_line":"        except Exception:"},{"line_number":96,"context_line":"            # In case of precommit, neutron registry notification caller"},{"line_number":97,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":98,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":99,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f93b717_9e177452","line":96,"range":{"start_line":96,"start_character":17,"end_line":96,"end_character":34},"in_reply_to":"7f96bb07_ab89aaca","updated":"2018-01-26 19:56:11.000000000","message":"It looks like the callback manager itself does not log exceptions for precommit events:\n\nhttps://github.com/openstack/neutron-lib/blob/8deff26d53a1357f9a91cc33427d040bb700ddfa/neutron_lib/callbacks/manager.py#L172\n\nGoing a bit further the error is interpreted as the the resource being in use, and a HTTP 409 client error is logged without any more detail.\n\nIn a circumstance where a default security group is created as a result of a different event on a different resource, the exception might be logged though.","commit_id":"0d741cb9a0dd2a66ffabe1fe3cef97b147c815b8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"55f87cebb42b042acce7918e2d557bc3618fc82d","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":104,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":105,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":106,"context_line":"                if db_api.is_retriable(e):"},{"line_number":107,"context_line":"                    lvl \u003d logging.DEBUG"},{"line_number":108,"context_line":"                else:"},{"line_number":109,"context_line":"                    lvl \u003d logging.EXCEPTION"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_31c8af20","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":42},"updated":"2018-01-29 09:39:03.000000000","message":"If it\u0027s retriable IMHO you shouldn\u0027t log ONLY if the maximum amount of retries was reached. And in that case it should be logged at level EXCEPTION.\n\nUnless you have another reason to log retry attempts?","commit_id":"95f13c2165ba9e2e40af2b70d1076fec33cb26c4"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"f8ff033713dba24fd0b2cda280d8c03111966721","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":104,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":105,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":106,"context_line":"                if db_api.is_retriable(e):"},{"line_number":107,"context_line":"                    lvl \u003d logging.DEBUG"},{"line_number":108,"context_line":"                else:"},{"line_number":109,"context_line":"                    lvl \u003d logging.EXCEPTION"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_cc20ceb3","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":42},"in_reply_to":"5f93b717_0c4a367f","updated":"2018-01-29 10:48:03.000000000","message":"I agree that we should only log if it failed and reached maximum retry otherwise we\u0027ll get a lot of unnecessary noise in the logs.","commit_id":"95f13c2165ba9e2e40af2b70d1076fec33cb26c4"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"1c8b8feea0d5003c0f1806b954f2a942679a5007","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":104,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":105,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":106,"context_line":"                if db_api.is_retriable(e):"},{"line_number":107,"context_line":"                    lvl \u003d logging.DEBUG"},{"line_number":108,"context_line":"                else:"},{"line_number":109,"context_line":"                    lvl \u003d logging.EXCEPTION"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_cc23ee04","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":42},"in_reply_to":"5f93b717_31c8af20","updated":"2018-01-29 10:36:44.000000000","message":"I believe that\u0027s more less what I am trying to do?\n\nIf it is retriable (which means that the max number of attempts was not reached) the log is done at DEBUG level. If it is not retriable (either is not an exception to be retried or the max number of retries was not reached), the log is done at EXCEPTION level.\n\nFor reference, this is replicating logging behavior of failed mechanism driver calls:\n\nhttps://github.com/openstack/neutron/blob/83708a1ded57748fe56f8e26a8cca0558f30131e/neutron/plugins/ml2/managers.py#L429","commit_id":"95f13c2165ba9e2e40af2b70d1076fec33cb26c4"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"7d4657aa3c0233feffa1cdb28c00d32b03f331be","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            # doesn\u0027t log its exception. In networking-odl case, we don\u0027t"},{"line_number":104,"context_line":"            # normally throw exception. So log it here for debug"},{"line_number":105,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":106,"context_line":"                if db_api.is_retriable(e):"},{"line_number":107,"context_line":"                    lvl \u003d logging.DEBUG"},{"line_number":108,"context_line":"                else:"},{"line_number":109,"context_line":"                    lvl \u003d logging.EXCEPTION"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f93b717_0c4a367f","line":106,"range":{"start_line":106,"start_character":19,"end_line":106,"end_character":42},"in_reply_to":"5f93b717_cc23ee04","updated":"2018-01-29 10:44:58.000000000","message":"Oh ok, I see how you are replicating that behaviour. A retriable exception eventually, after enough retries won\u0027t be retriable anymroe. In that case this will go to the EXCEPTION logging. Because of that, I just don\u0027t know why it would be interesting for us to log on a DEBUG level a retriable exception. How do you think it would add to our logging without adding noise to it? \n\nAnd now, looking at this a second time, do we handle the retry at a higher level? If not then we shouldn\u0027t even be adding this if.","commit_id":"95f13c2165ba9e2e40af2b70d1076fec33cb26c4"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"de6c3f95c22ff8aec079e73a0958c79d7fe69cda","unresolved":false,"context_lines":[{"line_number":43,"context_line":"}"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def _log_on_callback(lvl, msg, op, res_type, res_id, res_dict, **kwargs):"},{"line_number":47,"context_line":"    LOG.log(lvl, \"(%(msg)s) with ODL_OPS (%(op)s) \""},{"line_number":48,"context_line":"                 \"ODL_RES_TYPE (%(res_type)s) RES_ID (%(res_id)s) \""},{"line_number":49,"context_line":"                 \"ODL_RES_DICT (%(res_dict)s) KWARGS (%(kwargs)s)\","}],"source_content_type":"text/x-python","patch_set":9,"id":"5f93b717_1310b7a7","line":46,"range":{"start_line":46,"start_character":63,"end_line":46,"end_character":71},"updated":"2018-02-01 11:52:41.000000000","message":"This doesn\u0027t have to be \"dereferenced\" actually..","commit_id":"8c1313d8dcecd04f271a561c9bf46bba90296f6d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"de6c3f95c22ff8aec079e73a0958c79d7fe69cda","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def _log_on_callback(lvl, msg, op, res_type, res_id, res_dict, **kwargs):"},{"line_number":47,"context_line":"    LOG.log(lvl, \"(%(msg)s) with ODL_OPS (%(op)s) \""},{"line_number":48,"context_line":"                 \"ODL_RES_TYPE (%(res_type)s) RES_ID (%(res_id)s) \""},{"line_number":49,"context_line":"                 \"ODL_RES_DICT (%(res_dict)s) KWARGS (%(kwargs)s)\","},{"line_number":50,"context_line":"                 {\u0027msg\u0027: msg, \u0027odl_ops\u0027: op, \u0027odl_res_type\u0027: res_type,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f93b717_f333cb60","line":47,"range":{"start_line":47,"start_character":4,"end_line":47,"end_character":15},"updated":"2018-02-01 11:52:41.000000000","message":"AFAIK you\u0027d need to specify exc_info\u003dTrue for exception stack trace to be logged, which is wanted in this case.","commit_id":"8c1313d8dcecd04f271a561c9bf46bba90296f6d"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"de6c3f95c22ff8aec079e73a0958c79d7fe69cda","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                    _log_on_callback(logging.EXCEPTION,"},{"line_number":109,"context_line":"                                     \"Exception from callback\","},{"line_number":110,"context_line":"                                     odl_ops, odl_res_type, res_id,"},{"line_number":111,"context_line":"                                     odl_res_dict, **kwargs)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def sg_callback_precommit(self, resource, event, trigger, **kwargs):"},{"line_number":114,"context_line":"        self._sg_callback(self._precommit, resource, event, trigger, **kwargs)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f93b717_93a607ab","line":111,"range":{"start_line":111,"start_character":53,"end_line":111,"end_character":59},"updated":"2018-02-01 11:52:41.000000000","message":"copy_kwargs?","commit_id":"8c1313d8dcecd04f271a561c9bf46bba90296f6d"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c905a753bf12c897f05ded794b8073a5b2fd39d4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                \"CONTEXT (%(context)s)\")"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def _log_on_callback(lvl, msg, op, res_type, res_id, res_dict, context):"},{"line_number":51,"context_line":"    LOG.log(lvl, LOG_TEMPLATE,"},{"line_number":52,"context_line":"            {\u0027msg\u0027: msg, \u0027op\u0027: op, \u0027res_type\u0027: res_type, \u0027res_id\u0027: res_id,"},{"line_number":53,"context_line":"             \u0027res_dict\u0027: res_dict, \u0027context\u0027: context,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_7eb762f6","line":50,"range":{"start_line":50,"start_character":63,"end_line":50,"end_character":70},"updated":"2018-02-13 21:50:39.000000000","message":"would suggest renaming this argument as commented on L100.","commit_id":"5515202c6add1238f325ef0550365245f606b73a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c905a753bf12c897f05ded794b8073a5b2fd39d4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        copy_kwargs.pop(\u0027context\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        _log_on_callback(logging.DEBUG, \"Calling callback\", odl_ops,"},{"line_number":100,"context_line":"                         odl_res_type, res_id, odl_res_dict, copy_kwargs)"},{"line_number":101,"context_line":"        try:"},{"line_number":102,"context_line":"            callback(context, odl_ops, odl_res_type, res_id, odl_res_dict,"},{"line_number":103,"context_line":"                     **copy_kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_9e07ceca","line":100,"range":{"start_line":100,"start_character":61,"end_line":100,"end_character":72},"updated":"2018-02-13 21:50:39.000000000","message":"shouldn\u0027t this be just context based on signature of _log_on_callback or argument \u0027context\u0027 in method definition can be replaced with data ?","commit_id":"5515202c6add1238f325ef0550365245f606b73a"},{"author":{"_account_id":17120,"name":"Manjeet Singh Bhatia","email":"manjeet.s.bhatia@intel.com","username":"manjeets"},"change_message_id":"c905a753bf12c897f05ded794b8073a5b2fd39d4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                if not db_api.is_retriable(e):"},{"line_number":110,"context_line":"                    _log_on_callback(logging.ERROR, \"Exception from callback\","},{"line_number":111,"context_line":"                                     odl_ops, odl_res_type, res_id,"},{"line_number":112,"context_line":"                                     odl_res_dict, copy_kwargs)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def sg_callback_precommit(self, resource, event, trigger, **kwargs):"},{"line_number":115,"context_line":"        self._sg_callback(self._precommit, resource, event, trigger, **kwargs)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa0c359_1e241e5d","line":112,"range":{"start_line":112,"start_character":51,"end_line":112,"end_character":63},"updated":"2018-02-13 21:50:39.000000000","message":"same as L100","commit_id":"5515202c6add1238f325ef0550365245f606b73a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"692ab63433a24ad3e9bad210ad82072c02a26c2d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    LOG.log(lvl, LOG_TEMPLATE,"},{"line_number":52,"context_line":"            {\u0027msg\u0027: msg, \u0027op\u0027: op, \u0027res_type\u0027: res_type, \u0027res_id\u0027: res_id,"},{"line_number":53,"context_line":"             \u0027res_dict\u0027: res_dict, \u0027data\u0027: data,"},{"line_number":54,"context_line":"             \u0027exc_info\u0027: True if lvl is logging.ERROR else False})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class OdlSecurityGroupsHandler(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa0c359_9fd37e38","line":54,"range":{"start_line":54,"start_character":25,"end_line":54,"end_character":64},"updated":"2018-02-22 16:15:36.000000000","message":"actually you want True if it\u0027s anything that\u0027s higher than logging.ERROR (ie with your code if it\u0027s CRITICAL then it won\u0027t include the exception info)...\n\nAlso, perhaps you want to allow this to still be a parameter that can be forced?","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"ccdfaeaad7fb2b49055807148398028d30980d8c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    LOG.log(lvl, LOG_TEMPLATE,"},{"line_number":52,"context_line":"            {\u0027msg\u0027: msg, \u0027op\u0027: op, \u0027res_type\u0027: res_type, \u0027res_id\u0027: res_id,"},{"line_number":53,"context_line":"             \u0027res_dict\u0027: res_dict, \u0027data\u0027: data,"},{"line_number":54,"context_line":"             \u0027exc_info\u0027: True if lvl is logging.ERROR else False})"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class OdlSecurityGroupsHandler(object):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa0c359_7d61a5a8","line":54,"range":{"start_line":54,"start_character":25,"end_line":54,"end_character":64},"in_reply_to":"3fa0c359_9fd37e38","updated":"2018-02-26 10:56:25.000000000","message":"Done","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"}],"networking_odl/db/db.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"473a4ad38f1852c3f1c9cea6f94df90c1ddd5a06","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        models.OpenDaylightJournal.operation \u003d\u003d odl_const.ODL_DELETE"},{"line_number":52,"context_line":"    ).all()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    return (row for row in rows"},{"line_number":55,"context_line":"            if row.data is not None and parent_id in row.data)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def get_all_db_rows(session):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_cbff5632","line":55,"range":{"start_line":54,"start_character":0,"end_line":55,"end_character":62},"updated":"2018-01-15 16:00:29.000000000","message":"Can you separate this to a different patch and add unit tests?","commit_id":"0d741cb9a0dd2a66ffabe1fe3cef97b147c815b8"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"944c97dfac85fb14aeface7665c7524e60dda9ac","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        models.OpenDaylightJournal.operation \u003d\u003d odl_const.ODL_DELETE"},{"line_number":52,"context_line":"    ).all()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    return (row for row in rows"},{"line_number":55,"context_line":"            if row.data is not None and parent_id in row.data)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def get_all_db_rows(session):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f96bb07_178f8ecd","line":55,"range":{"start_line":54,"start_character":0,"end_line":55,"end_character":62},"in_reply_to":"7f96bb07_cbff5632","updated":"2018-01-24 10:31:34.000000000","message":"Before I noticed this patch existed, I worked on an alternate solution, change #536935.\n\nAnyway, I refrained from adding this None check because I thought that the raised error would be a clear indication there was a problem finding the parent dependencies on delete operations. Otherwise, the problem is masked and may become harder to debug.\n\nChange #536935 makes sure that the parent sg is set as data in the journal entries of sg rule delete ops.","commit_id":"0d741cb9a0dd2a66ffabe1fe3cef97b147c815b8"}],"networking_odl/tests/unit/common/test_callback.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"29089e28243e03ff3b13f3aa6cdc0849eb0a88ca","unresolved":false,"context_lines":[{"line_number":163,"context_line":"        rule \u003d mock.Mock()"},{"line_number":164,"context_line":"        rule_id \u003d rule.get(\u0027id\u0027)"},{"line_number":165,"context_line":"        with mock.patch.object(callback, \u0027LOG\u0027) as log_mock:"},{"line_number":166,"context_line":"            try:"},{"line_number":167,"context_line":"                self._test_callback_precommit_for_sg_rules("},{"line_number":168,"context_line":"                    events.PRECOMMIT_CREATE, odl_const.ODL_CREATE, rule,"},{"line_number":169,"context_line":"                    rule_id)"},{"line_number":170,"context_line":"            except Exception:"},{"line_number":171,"context_line":"                pass"},{"line_number":172,"context_line":"            log_mock.log.assert_called_with("},{"line_number":173,"context_line":"                logging.ERROR, callback.LOG_TEMPLATE,"},{"line_number":174,"context_line":"                {\u0027msg\u0027: \u0027Exception from callback\u0027, \u0027op\u0027: op,"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa0c359_f1014a3b","line":171,"range":{"start_line":166,"start_character":0,"end_line":171,"end_character":20},"updated":"2018-02-14 18:41:39.000000000","message":"self.assertRaise(AttributeError, self._test_callback_....)\nHere exception is expected and if exception isn\u0027t raised, it\u0027s failure, right?","commit_id":"427517e751ce79587d43f4621cc3c10e79401366"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"692ab63433a24ad3e9bad210ad82072c02a26c2d","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            events.AFTER_DELETE, odl_const.ODL_DELETE, None, FAKE_ID)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_callback_exception(self):"},{"line_number":160,"context_line":"        self._precommit.side_effect \u003d AttributeError(\u0027mock\u0027)"},{"line_number":161,"context_line":"        resource \u003d callback._RESOURCE_MAPPING[resources.SECURITY_GROUP_RULE]"},{"line_number":162,"context_line":"        op \u003d callback._OPERATION_MAPPING[events.PRECOMMIT_CREATE]"},{"line_number":163,"context_line":"        rule \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa0c359_1f952e40","line":160,"range":{"start_line":160,"start_character":38,"end_line":160,"end_character":52},"updated":"2018-02-22 16:15:36.000000000","message":"It\u0027s better to use TestExceptions created for that purpose... that way you can make a more deterministic test instead of AttributeError that might be risen for other reasons...","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"},{"author":{"_account_id":27532,"name":"Jaime Caamaño Ruiz","email":"jcaamano@suse.com","username":"jaicaa"},"change_message_id":"ccdfaeaad7fb2b49055807148398028d30980d8c","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            events.AFTER_DELETE, odl_const.ODL_DELETE, None, FAKE_ID)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_callback_exception(self):"},{"line_number":160,"context_line":"        self._precommit.side_effect \u003d AttributeError(\u0027mock\u0027)"},{"line_number":161,"context_line":"        resource \u003d callback._RESOURCE_MAPPING[resources.SECURITY_GROUP_RULE]"},{"line_number":162,"context_line":"        op \u003d callback._OPERATION_MAPPING[events.PRECOMMIT_CREATE]"},{"line_number":163,"context_line":"        rule \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa0c359_9d64b1ba","line":160,"range":{"start_line":160,"start_character":38,"end_line":160,"end_character":52},"in_reply_to":"3fa0c359_1f952e40","updated":"2018-02-26 10:56:25.000000000","message":"Done","commit_id":"f01efe2b528888db92170869e210d07614b1de4b"}]}
