{"action":"created","comment":{"url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/comments/168294736","pull_request_review_id":96639057,"id":168294736,"diff_hunk":"@@ -74,8 +74,11 @@ def __init__(self, plugged, app_config, module_name, options):\n     def plug(self):\n         try:\n             self._plug_application(self.app_config, self.module_name, self.options)\n-        except:\n+        except Exception as e:\n             log.exception('Failed to plug %s' % self.module_name)\n+            def fail_if_failed_to_plug(remainder, params):\n+                raise e\n+            self.app_config.register_hook('before_call', fail_if_failed_to_plug)","path":"tgext/pluggable/plug.py","position":9,"original_position":9,"commit_id":"8a772833eab7ceb48768aaaf1c6cb3c13acb5283","original_commit_id":"8a772833eab7ceb48768aaaf1c6cb3c13acb5283","user":{"login":"CastixGitHub","id":21062669,"avatar_url":"https://avatars2.githubusercontent.com/u/21062669?v=4","gravatar_id":"","url":"https://api.github.com/users/CastixGitHub","html_url":"https://github.com/CastixGitHub","followers_url":"https://api.github.com/users/CastixGitHub/followers","following_url":"https://api.github.com/users/CastixGitHub/following{/other_user}","gists_url":"https://api.github.com/users/CastixGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/CastixGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CastixGitHub/subscriptions","organizations_url":"https://api.github.com/users/CastixGitHub/orgs","repos_url":"https://api.github.com/users/CastixGitHub/repos","events_url":"https://api.github.com/users/CastixGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/CastixGitHub/received_events","type":"User","site_admin":false},"body":"usually in a production environment you want a supervisor that restarts you application if it isn't running, and your users would get a 502 from your reverse proxy, so prevent the application from starting may not be so cool.\r\nusually if your application fails plugging a pluggable it means that you are developing that pluggable and want to know where you messed up, so i think that it is nice to have Backlash to show the traceback and giving you debugging tools. unfortunately --restart (as option to gearbox serve) won't work because plug failed, so pluggable files are not monitored. it is ok for the application to just crash, but removing the try-except above doesn't prevent if from skipping because the exception is trapped\r\nhttps://github.com/TurboGears/tg2/blob/development/tg/configuration/hooks.py#L36\r\nhttps://github.com/TurboGears/tg2/blob/9f5733939bc3e92c3e770f6afcf35a2ea11bdcd7/tg/configuration/app_config.py#L916\r\nif the exception is trapped you will see weird errors about appid or module wich aren't present in plugged, and looking at the terminal where your application is running you probably keep focusing on that exception instead of reading the whole log","created_at":"2018-02-14T20:05:35Z","updated_at":"2018-02-14T20:05:36Z","html_url":"https://github.com/TurboGears/tgext.pluggable/pull/23#discussion_r168294736","pull_request_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/comments/168294736"},"html":{"href":"https://github.com/TurboGears/tgext.pluggable/pull/23#discussion_r168294736"},"pull_request":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23"}},"in_reply_to_id":168230507},"pull_request":{"url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23","id":169069496,"html_url":"https://github.com/TurboGears/tgext.pluggable/pull/23","diff_url":"https://github.com/TurboGears/tgext.pluggable/pull/23.diff","patch_url":"https://github.com/TurboGears/tgext.pluggable/pull/23.patch","issue_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/23","number":23,"state":"open","locked":false,"title":"crash loudly if a pluggable fails to being plugged","user":{"login":"CastixGitHub","id":21062669,"avatar_url":"https://avatars2.githubusercontent.com/u/21062669?v=4","gravatar_id":"","url":"https://api.github.com/users/CastixGitHub","html_url":"https://github.com/CastixGitHub","followers_url":"https://api.github.com/users/CastixGitHub/followers","following_url":"https://api.github.com/users/CastixGitHub/following{/other_user}","gists_url":"https://api.github.com/users/CastixGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/CastixGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CastixGitHub/subscriptions","organizations_url":"https://api.github.com/users/CastixGitHub/orgs","repos_url":"https://api.github.com/users/CastixGitHub/repos","events_url":"https://api.github.com/users/CastixGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/CastixGitHub/received_events","type":"User","site_admin":false},"body":"crash loudly if a pluggable fails to being plugged, before that you would get cryptic errors all aroud, now the whole application stops","created_at":"2018-02-14T10:18:37Z","updated_at":"2018-02-14T20:05:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a28bf6c0efbc284dc0179a9a0b754a0b123fb36","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23/commits","review_comments_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23/comments","review_comment_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/23/comments","statuses_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/statuses/8a772833eab7ceb48768aaaf1c6cb3c13acb5283","head":{"label":"CastixGitHub:master","ref":"master","sha":"8a772833eab7ceb48768aaaf1c6cb3c13acb5283","user":{"login":"CastixGitHub","id":21062669,"avatar_url":"https://avatars2.githubusercontent.com/u/21062669?v=4","gravatar_id":"","url":"https://api.github.com/users/CastixGitHub","html_url":"https://github.com/CastixGitHub","followers_url":"https://api.github.com/users/CastixGitHub/followers","following_url":"https://api.github.com/users/CastixGitHub/following{/other_user}","gists_url":"https://api.github.com/users/CastixGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/CastixGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CastixGitHub/subscriptions","organizations_url":"https://api.github.com/users/CastixGitHub/orgs","repos_url":"https://api.github.com/users/CastixGitHub/repos","events_url":"https://api.github.com/users/CastixGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/CastixGitHub/received_events","type":"User","site_admin":false},"repo":{"id":106031550,"name":"tgext.pluggable","full_name":"CastixGitHub/tgext.pluggable","owner":{"login":"CastixGitHub","id":21062669,"avatar_url":"https://avatars2.githubusercontent.com/u/21062669?v=4","gravatar_id":"","url":"https://api.github.com/users/CastixGitHub","html_url":"https://github.com/CastixGitHub","followers_url":"https://api.github.com/users/CastixGitHub/followers","following_url":"https://api.github.com/users/CastixGitHub/following{/other_user}","gists_url":"https://api.github.com/users/CastixGitHub/gists{/gist_id}","starred_url":"https://api.github.com/users/CastixGitHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CastixGitHub/subscriptions","organizations_url":"https://api.github.com/users/CastixGitHub/orgs","repos_url":"https://api.github.com/users/CastixGitHub/repos","events_url":"https://api.github.com/users/CastixGitHub/events{/privacy}","received_events_url":"https://api.github.com/users/CastixGitHub/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CastixGitHub/tgext.pluggable","description":"Pluggable applications support for TurboGears2","fork":true,"url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable","forks_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/forks","keys_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/teams","hooks_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/hooks","issue_events_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/issues/events{/number}","events_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/events","assignees_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/assignees{/user}","branches_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/branches{/branch}","tags_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/tags","blobs_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/git/refs{/sha}","trees_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/statuses/{sha}","languages_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/languages","stargazers_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/stargazers","contributors_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/contributors","subscribers_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/subscribers","subscription_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/subscription","commits_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/commits{/sha}","git_commits_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/git/commits{/sha}","comments_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/comments{/number}","issue_comment_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/issues/comments{/number}","contents_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/contents/{+path}","compare_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/merges","archive_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/downloads","issues_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/issues{/number}","pulls_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/pulls{/number}","milestones_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/milestones{/number}","notifications_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/labels{/name}","releases_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/releases{/id}","deployments_url":"https://api.github.com/repos/CastixGitHub/tgext.pluggable/deployments","created_at":"2017-10-06T17:23:02Z","updated_at":"2017-10-06T17:23:03Z","pushed_at":"2018-02-14T12:19:19Z","git_url":"git://github.com/CastixGitHub/tgext.pluggable.git","ssh_url":"git@github.com:CastixGitHub/tgext.pluggable.git","clone_url":"https://github.com/CastixGitHub/tgext.pluggable.git","svn_url":"https://github.com/CastixGitHub/tgext.pluggable","homepage":null,"size":130,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TurboGears:master","ref":"master","sha":"06d27eaca08dd5294cb582dc95ee1d902a5eeb95","user":{"login":"TurboGears","id":2229932,"avatar_url":"https://avatars3.githubusercontent.com/u/2229932?v=4","gravatar_id":"","url":"https://api.github.com/users/TurboGears","html_url":"https://github.com/TurboGears","followers_url":"https://api.github.com/users/TurboGears/followers","following_url":"https://api.github.com/users/TurboGears/following{/other_user}","gists_url":"https://api.github.com/users/TurboGears/gists{/gist_id}","starred_url":"https://api.github.com/users/TurboGears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurboGears/subscriptions","organizations_url":"https://api.github.com/users/TurboGears/orgs","repos_url":"https://api.github.com/users/TurboGears/repos","events_url":"https://api.github.com/users/TurboGears/events{/privacy}","received_events_url":"https://api.github.com/users/TurboGears/received_events","type":"Organization","site_admin":false},"repo":{"id":5755779,"name":"tgext.pluggable","full_name":"TurboGears/tgext.pluggable","owner":{"login":"TurboGears","id":2229932,"avatar_url":"https://avatars3.githubusercontent.com/u/2229932?v=4","gravatar_id":"","url":"https://api.github.com/users/TurboGears","html_url":"https://github.com/TurboGears","followers_url":"https://api.github.com/users/TurboGears/followers","following_url":"https://api.github.com/users/TurboGears/following{/other_user}","gists_url":"https://api.github.com/users/TurboGears/gists{/gist_id}","starred_url":"https://api.github.com/users/TurboGears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurboGears/subscriptions","organizations_url":"https://api.github.com/users/TurboGears/orgs","repos_url":"https://api.github.com/users/TurboGears/repos","events_url":"https://api.github.com/users/TurboGears/events{/privacy}","received_events_url":"https://api.github.com/users/TurboGears/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TurboGears/tgext.pluggable","description":"Pluggable applications support for TurboGears2","fork":false,"url":"https://api.github.com/repos/TurboGears/tgext.pluggable","forks_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/forks","keys_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/teams","hooks_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/hooks","issue_events_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/events{/number}","events_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/events","assignees_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/assignees{/user}","branches_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/branches{/branch}","tags_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/tags","blobs_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/git/refs{/sha}","trees_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/statuses/{sha}","languages_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/languages","stargazers_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/stargazers","contributors_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/contributors","subscribers_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/subscribers","subscription_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/subscription","commits_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/commits{/sha}","git_commits_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/git/commits{/sha}","comments_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/comments{/number}","issue_comment_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/comments{/number}","contents_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/contents/{+path}","compare_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/merges","archive_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/downloads","issues_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues{/number}","pulls_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls{/number}","milestones_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/milestones{/number}","notifications_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/labels{/name}","releases_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/releases{/id}","deployments_url":"https://api.github.com/repos/TurboGears/tgext.pluggable/deployments","created_at":"2012-09-10T20:57:19Z","updated_at":"2017-10-11T23:13:01Z","pushed_at":"2018-02-14T12:19:20Z","git_url":"git://github.com/TurboGears/tgext.pluggable.git","ssh_url":"git@github.com:TurboGears/tgext.pluggable.git","clone_url":"https://github.com/TurboGears/tgext.pluggable.git","svn_url":"https://github.com/TurboGears/tgext.pluggable","homepage":null,"size":129,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":13,"open_issues":5,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23"},"html":{"href":"https://github.com/TurboGears/tgext.pluggable/pull/23"},"issue":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/23"},"comments":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/TurboGears/tgext.pluggable/statuses/8a772833eab7ceb48768aaaf1c6cb3c13acb5283"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"CastixGitHub"}}