)]}'
{"zuul/driver/github/githubconnection.py":[{"author":{"_account_id":9311,"name":"Tristan Cacqueray","email":"tdecacqu@redhat.com","username":"tristanC"},"change_message_id":"76e45895ba3d0b4ce149a8b738f363adf1ba286e","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        for retry in range(5):"},{"line_number":261,"context_line":"            try:"},{"line_number":262,"context_line":"                event \u003d method()"},{"line_number":263,"context_line":"            except Exception:"},{"line_number":264,"context_line":"                self.log.exception("},{"line_number":265,"context_line":"                    \"Failed handling %s event; retrying\", self.event_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_a2de5d0e","line":262,"updated":"2019-06-12 10:25:21.000000000","message":"This needs a break when the method succeed to skip the else clause.","commit_id":"b5e89f2977dfe55e66892789eda2a8c22c9649aa"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"cd57de8d50b36106e505cacbc76413bac20e36ea","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        for retry in range(5):"},{"line_number":261,"context_line":"            try:"},{"line_number":262,"context_line":"                event \u003d method()"},{"line_number":263,"context_line":"            except Exception:"},{"line_number":264,"context_line":"                self.log.exception("},{"line_number":265,"context_line":"                    \"Failed handling %s event; retrying\", self.event_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_e2f0d593","line":262,"in_reply_to":"9fb8cfa7_a2de5d0e","updated":"2019-06-12 10:28:11.000000000","message":"Thanks!","commit_id":"b5e89f2977dfe55e66892789eda2a8c22c9649aa"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"211cf0de3244fb810cd31f09bb3e2362f1fe53cb","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                # retrigger."},{"line_number":271,"context_line":"                self.log.exception(\u0027Exception when handling event:\u0027)"},{"line_number":272,"context_line":"                break"},{"line_number":273,"context_line":"            time.sleep(1)"},{"line_number":274,"context_line":"        else:"},{"line_number":275,"context_line":"            # NOTE(pabelanger): We should report back to the PR we could not"},{"line_number":276,"context_line":"            # process the event, to give the user a chance to retrigger."}],"source_content_type":"text/x-python","patch_set":3,"id":"9fb8cfa7_0880a345","line":273,"range":{"start_line":273,"start_character":12,"end_line":273,"end_character":25},"updated":"2019-06-12 15:50:23.000000000","message":"I think we should only sleep and retry in cases we expect to work on a retry. The generic exception above should probably log and break out of the loop as well.","commit_id":"467c91f72b44db297a5661885224ec2706193635"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"1ad72bd03135c0d049997ca5d339884a9c31addc","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            # NOTE(pabelanger): We should report back to the PR we could not"},{"line_number":276,"context_line":"            # process the event, to give the user a chance to retrigger."},{"line_number":277,"context_line":"            self.log.warning("},{"line_number":278,"context_line":"                \"Unable to process % event, skipping\", self.event_type)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if event:"},{"line_number":281,"context_line":"            event.delivery \u003d self.delivery"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_6876ff40","line":278,"updated":"2019-06-12 16:05:12.000000000","message":"To simplify this I think the general structure could be:\n\n  try:\n      for retry in range(5):\n          try:\n              thing()\n          except specific.exception1:\n              specific log for this\n          except specific.exception2:\n              specific log for this\n          sleep(1)\n  except Exception:\n      Top level log\n\nThis way we\u0027ll log the retries if they happen or we\u0027ll log more fatal errors and not retry. My concern is that if we miss a break we\u0027ll end up stuck in the loop for exceptions we don\u0027t want to retry on.","commit_id":"f397aaba05ee25241dc01d6bb4ae2d122a8b795e"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"101c208970f43512d6fcc5b4506625a5b7ee1b54","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            # NOTE(pabelanger): We should report back to the PR we could not"},{"line_number":276,"context_line":"            # process the event, to give the user a chance to retrigger."},{"line_number":277,"context_line":"            self.log.warning("},{"line_number":278,"context_line":"                \"Unable to process % event, skipping\", self.event_type)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if event:"},{"line_number":281,"context_line":"            event.delivery \u003d self.delivery"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_88bfb3a8","line":278,"in_reply_to":"9fb8cfa7_6876ff40","updated":"2019-06-12 16:07:25.000000000","message":"This is missing the break after thing() to not retry on success (but that should be the only one we need).","commit_id":"f397aaba05ee25241dc01d6bb4ae2d122a8b795e"}]}
