{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/gordon-janitor/issues/14","repository_url":"https://api.github.com/repos/spotify/gordon-janitor","labels_url":"https://api.github.com/repos/spotify/gordon-janitor/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/spotify/gordon-janitor/issues/14/comments","events_url":"https://api.github.com/repos/spotify/gordon-janitor/issues/14/events","html_url":"https://github.com/spotify/gordon-janitor/pull/14","id":351399243,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MDA3Nzk4","number":14,"title":"Correctly handle plugin loader errors","user":{"login":"descent3me","id":2351838,"node_id":"MDQ6VXNlcjIzNTE4Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2351838?v=4","gravatar_id":"","url":"https://api.github.com/users/descent3me","html_url":"https://github.com/descent3me","followers_url":"https://api.github.com/users/descent3me/followers","following_url":"https://api.github.com/users/descent3me/following{/other_user}","gists_url":"https://api.github.com/users/descent3me/gists{/gist_id}","starred_url":"https://api.github.com/users/descent3me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/descent3me/subscriptions","organizations_url":"https://api.github.com/users/descent3me/orgs","repos_url":"https://api.github.com/users/descent3me/repos","events_url":"https://api.github.com/users/descent3me/events{/privacy}","received_events_url":"https://api.github.com/users/descent3me/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-16T23:08:22Z","updated_at":"2018-10-05T14:42:53Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/spotify/gordon-janitor/pulls/14","html_url":"https://github.com/spotify/gordon-janitor/pull/14","diff_url":"https://github.com/spotify/gordon-janitor/pull/14.diff","patch_url":"https://github.com/spotify/gordon-janitor/pull/14.patch"},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines <https://github.com/spotify/gordon-janitor/blob/master/CONTRIBUTING.rst>\r\n2. If the PR is unfinished, please prefix the subject line with [WIP], [DRAFT], or [RFC].\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nPreviously when trying to run janitor, if there was an error you would get strange unhelpful output.  \r\n```\r\n--- Logging error ---\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python3.6/logging/__init__.py\", line 992, in emit\r\n    msg = self.format(record)\r\n  File \"/usr/lib/python3.6/logging/__init__.py\", line 838, in format\r\n    return fmt.format(record)\r\n  File \"/usr/lib/python3.6/logging/__init__.py\", line 583, in format\r\n    record.exc_text = self.formatException(record.exc_info)\r\n  File \"/usr/lib/python3.6/logging/__init__.py\", line 529, in formatException\r\n    tb = ei[2]\r\nIndexError: tuple index out of range\r\nCall stack:\r\n  File \"/usr/src/app/.venv/bin/gordon-janitor\", line 11, in <module>\r\n    sys.exit(run())\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/click/core.py\", line 722, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/click/core.py\", line 697, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/click/core.py\", line 895, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/click/core.py\", line 535, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/gordon_janitor/main.py\", line 172, in run\r\n    _log_or_exit_on_exceptions(base_msg, errors, debug_mode)\r\n  File \"/usr/src/app/.venv/lib/python3.6/site-packages/gordon_janitor/main.py\", line 99, in _log_or_exit_on_exceptions\r\n    log_level_func(base_msg, exc_info=exception)\r\nMessage: 'Plugin was not loaded:'\r\nArguments: ()\r\n```\r\n\r\nThis simplifies that and includes the plugin name, similar to how it is handled in [gordon](https://github.com/spotify/gordon/blob/develop/gordon/main.py#L188). \r\n\r\n\r\n**Which issue(s) this PR fixes**\r\n<!-- optional; in `fixes #<issue number>, fixes #<issue_number>, ...` format, will close the issue(s) when PR gets merged: -->\r\nFixes #\r\n\r\n**Special notes for your reviewer**:\r\nThe tests in this commit were designed to fail before the change to main was made. It seems this bug was hidden a bit because we were passing correct input in the unit tests, but we were not verifying the output in testing the run method which had the actual (incorrect) input.\r\n\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, start the release note with the string \"action required: \".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nCorrectly handle plugin loader errors\r\n```\r\n\r\n@spotify/alf "},"comment":{"url":"https://api.github.com/repos/spotify/gordon-janitor/issues/comments/427389776","html_url":"https://github.com/spotify/gordon-janitor/pull/14#issuecomment-427389776","issue_url":"https://api.github.com/repos/spotify/gordon-janitor/issues/14","id":427389776,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzM4OTc3Ng==","user":{"login":"descent3me","id":2351838,"node_id":"MDQ6VXNlcjIzNTE4Mzg=","avatar_url":"https://avatars0.githubusercontent.com/u/2351838?v=4","gravatar_id":"","url":"https://api.github.com/users/descent3me","html_url":"https://github.com/descent3me","followers_url":"https://api.github.com/users/descent3me/followers","following_url":"https://api.github.com/users/descent3me/following{/other_user}","gists_url":"https://api.github.com/users/descent3me/gists{/gist_id}","starred_url":"https://api.github.com/users/descent3me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/descent3me/subscriptions","organizations_url":"https://api.github.com/users/descent3me/orgs","repos_url":"https://api.github.com/users/descent3me/repos","events_url":"https://api.github.com/users/descent3me/events{/privacy}","received_events_url":"https://api.github.com/users/descent3me/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T14:42:53Z","updated_at":"2018-10-05T14:42:53Z","author_association":"NONE","body":"@spotify/alf Can you please review?"}}
{"actor":{"display_login":"descent3me"}}