{"action":"created","comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/167859156","pull_request_review_id":96133882,"id":167859156,"diff_hunk":"@@ -0,0 +1,76 @@\n+// MainCommonTest works fine in coverage tests, but it appears to break SignalsTest when\n+// run in the same process. It appears that MainCommon doesn't completely clean up after\n+// itself, possibly due to a bug in SignalAction. So for now, we can test MainCommon\n+// but can't measure its test coverage.\n+//\n+// TODO(issues/2580): Fix coverage tests when MainCommonTest is enabled.\n+#ifndef ENVOY_CONFIG_COVERAGE\n+\n+#include \"exe/main_common.h\"\n+\n+#include \"server/options_impl.h\"\n+\n+#include \"test/test_common/environment.h\"\n+\n+#include \"gtest/gtest.h\"\n+\n+#ifdef ENVOY_HANDLE_SIGNALS\n+#include \"exe/signal_action.h\"\n+#endif\n+\n+#ifdef ENVOY_HOT_RESTART\n+#include \"server/hot_restart_impl.h\"\n+#endif\n+\n+namespace Envoy {\n+\n+TEST(MainCommon, ConstructDestruct) {\n+  // TODO(jmarantz): I think we may need to hack the config file to pick an unused port.","path":"test/exe/main_common_test.cc","position":28,"original_position":28,"commit_id":"6372516673296c785aca66013d3e42f8f905d6db","original_commit_id":"6372516673296c785aca66013d3e42f8f905d6db","user":{"login":"htuch","id":10914751,"avatar_url":"https://avatars1.githubusercontent.com/u/10914751?v=4","gravatar_id":"","url":"https://api.github.com/users/htuch","html_url":"https://github.com/htuch","followers_url":"https://api.github.com/users/htuch/followers","following_url":"https://api.github.com/users/htuch/following{/other_user}","gists_url":"https://api.github.com/users/htuch/gists{/gist_id}","starred_url":"https://api.github.com/users/htuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htuch/subscriptions","organizations_url":"https://api.github.com/users/htuch/orgs","repos_url":"https://api.github.com/users/htuch/repos","events_url":"https://api.github.com/users/htuch/events{/privacy}","received_events_url":"https://api.github.com/users/htuch/received_events","type":"User","site_admin":false},"body":"Why isn't port zero binding sufficient?","created_at":"2018-02-13T13:12:14Z","updated_at":"2018-02-13T13:15:14Z","html_url":"https://github.com/envoyproxy/envoy/pull/2568#discussion_r167859156","pull_request_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/167859156"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/2568#discussion_r167859156"},"pull_request":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568"}}},"pull_request":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568","id":168245307,"html_url":"https://github.com/envoyproxy/envoy/pull/2568","diff_url":"https://github.com/envoyproxy/envoy/pull/2568.diff","patch_url":"https://github.com/envoyproxy/envoy/pull/2568.patch","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2568","number":2568,"state":"open","locked":false,"title":"server: factor out MainCommon as a class, with a run method","user":{"login":"jmarantz","id":1942589,"avatar_url":"https://avatars3.githubusercontent.com/u/1942589?v=4","gravatar_id":"","url":"https://api.github.com/users/jmarantz","html_url":"https://github.com/jmarantz","followers_url":"https://api.github.com/users/jmarantz/followers","following_url":"https://api.github.com/users/jmarantz/following{/other_user}","gists_url":"https://api.github.com/users/jmarantz/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarantz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarantz/subscriptions","organizations_url":"https://api.github.com/users/jmarantz/orgs","repos_url":"https://api.github.com/users/jmarantz/repos","events_url":"https://api.github.com/users/jmarantz/events{/privacy}","received_events_url":"https://api.github.com/users/jmarantz/received_events","type":"User","site_admin":false},"body":"*Description*:\r\nThis is step 2 in [the plan to improve startup performance](https://goo.gl/YxzBaB). It makes it possible instantiate the full server stack without running the event loop, so the instantiation can be timed.  This also simplifies the code required in main(), though a legacy path is retained allowing existing alternate main()s to continue to work.\r\n\r\n*Risk Level*: Medium: this has been extensively tested but deserves scrutiny as it is part of the startup path.\r\n\r\n*Testing*:\r\n//test/... including sanitizers.\r\nAdded tests for the new MainCommon instantiation, as well as the legacy main_common() where some of the work was delegated to main().\r\n\r\nThis is another step toward addressing https://github.com/envoyproxy/envoy/issues/2373\r\n\r\n","created_at":"2018-02-09T13:54:26Z","updated_at":"2018-02-13T13:15:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3959875f46618246282dfe29c87b54cbc9408586","assignee":{"login":"dnoe","id":1183641,"avatar_url":"https://avatars2.githubusercontent.com/u/1183641?v=4","gravatar_id":"","url":"https://api.github.com/users/dnoe","html_url":"https://github.com/dnoe","followers_url":"https://api.github.com/users/dnoe/followers","following_url":"https://api.github.com/users/dnoe/following{/other_user}","gists_url":"https://api.github.com/users/dnoe/gists{/gist_id}","starred_url":"https://api.github.com/users/dnoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnoe/subscriptions","organizations_url":"https://api.github.com/users/dnoe/orgs","repos_url":"https://api.github.com/users/dnoe/repos","events_url":"https://api.github.com/users/dnoe/events{/privacy}","received_events_url":"https://api.github.com/users/dnoe/received_events","type":"User","site_admin":false},"assignees":[{"login":"dnoe","id":1183641,"avatar_url":"https://avatars2.githubusercontent.com/u/1183641?v=4","gravatar_id":"","url":"https://api.github.com/users/dnoe","html_url":"https://github.com/dnoe","followers_url":"https://api.github.com/users/dnoe/followers","following_url":"https://api.github.com/users/dnoe/following{/other_user}","gists_url":"https://api.github.com/users/dnoe/gists{/gist_id}","starred_url":"https://api.github.com/users/dnoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnoe/subscriptions","organizations_url":"https://api.github.com/users/dnoe/orgs","repos_url":"https://api.github.com/users/dnoe/repos","events_url":"https://api.github.com/users/dnoe/events{/privacy}","received_events_url":"https://api.github.com/users/dnoe/received_events","type":"User","site_admin":false},{"login":"htuch","id":10914751,"avatar_url":"https://avatars1.githubusercontent.com/u/10914751?v=4","gravatar_id":"","url":"https://api.github.com/users/htuch","html_url":"https://github.com/htuch","followers_url":"https://api.github.com/users/htuch/followers","following_url":"https://api.github.com/users/htuch/following{/other_user}","gists_url":"https://api.github.com/users/htuch/gists{/gist_id}","starred_url":"https://api.github.com/users/htuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htuch/subscriptions","organizations_url":"https://api.github.com/users/htuch/orgs","repos_url":"https://api.github.com/users/htuch/repos","events_url":"https://api.github.com/users/htuch/events{/privacy}","received_events_url":"https://api.github.com/users/htuch/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568/commits","review_comments_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568/comments","review_comment_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2568/comments","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/6372516673296c785aca66013d3e42f8f905d6db","head":{"label":"jmarantz:main-common-as-class","ref":"main-common-as-class","sha":"6372516673296c785aca66013d3e42f8f905d6db","user":{"login":"jmarantz","id":1942589,"avatar_url":"https://avatars3.githubusercontent.com/u/1942589?v=4","gravatar_id":"","url":"https://api.github.com/users/jmarantz","html_url":"https://github.com/jmarantz","followers_url":"https://api.github.com/users/jmarantz/followers","following_url":"https://api.github.com/users/jmarantz/following{/other_user}","gists_url":"https://api.github.com/users/jmarantz/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarantz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarantz/subscriptions","organizations_url":"https://api.github.com/users/jmarantz/orgs","repos_url":"https://api.github.com/users/jmarantz/repos","events_url":"https://api.github.com/users/jmarantz/events{/privacy}","received_events_url":"https://api.github.com/users/jmarantz/received_events","type":"User","site_admin":false},"repo":{"id":109787330,"name":"envoy","full_name":"jmarantz/envoy","owner":{"login":"jmarantz","id":1942589,"avatar_url":"https://avatars3.githubusercontent.com/u/1942589?v=4","gravatar_id":"","url":"https://api.github.com/users/jmarantz","html_url":"https://github.com/jmarantz","followers_url":"https://api.github.com/users/jmarantz/followers","following_url":"https://api.github.com/users/jmarantz/following{/other_user}","gists_url":"https://api.github.com/users/jmarantz/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarantz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarantz/subscriptions","organizations_url":"https://api.github.com/users/jmarantz/orgs","repos_url":"https://api.github.com/users/jmarantz/repos","events_url":"https://api.github.com/users/jmarantz/events{/privacy}","received_events_url":"https://api.github.com/users/jmarantz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmarantz/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/jmarantz/envoy","forks_url":"https://api.github.com/repos/jmarantz/envoy/forks","keys_url":"https://api.github.com/repos/jmarantz/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmarantz/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmarantz/envoy/teams","hooks_url":"https://api.github.com/repos/jmarantz/envoy/hooks","issue_events_url":"https://api.github.com/repos/jmarantz/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/jmarantz/envoy/events","assignees_url":"https://api.github.com/repos/jmarantz/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/jmarantz/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/jmarantz/envoy/tags","blobs_url":"https://api.github.com/repos/jmarantz/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmarantz/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmarantz/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmarantz/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmarantz/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/jmarantz/envoy/languages","stargazers_url":"https://api.github.com/repos/jmarantz/envoy/stargazers","contributors_url":"https://api.github.com/repos/jmarantz/envoy/contributors","subscribers_url":"https://api.github.com/repos/jmarantz/envoy/subscribers","subscription_url":"https://api.github.com/repos/jmarantz/envoy/subscription","commits_url":"https://api.github.com/repos/jmarantz/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmarantz/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmarantz/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmarantz/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmarantz/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/jmarantz/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmarantz/envoy/merges","archive_url":"https://api.github.com/repos/jmarantz/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmarantz/envoy/downloads","issues_url":"https://api.github.com/repos/jmarantz/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/jmarantz/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/jmarantz/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/jmarantz/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmarantz/envoy/labels{/name}","releases_url":"https://api.github.com/repos/jmarantz/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/jmarantz/envoy/deployments","created_at":"2017-11-07T04:36:02Z","updated_at":"2017-11-07T04:36:07Z","pushed_at":"2018-02-12T05:17:07Z","git_url":"git://github.com/jmarantz/envoy.git","ssh_url":"git@github.com:jmarantz/envoy.git","clone_url":"https://github.com/jmarantz/envoy.git","svn_url":"https://github.com/jmarantz/envoy","homepage":"https://envoyproxy.github.io/","size":53402,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"envoyproxy:master","ref":"master","sha":"910058d7113e6439d077e2467e26abb7b803000e","user":{"login":"envoyproxy","id":30125649,"avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"repo":{"id":65214191,"name":"envoy","full_name":"envoyproxy/envoy","owner":{"login":"envoyproxy","id":30125649,"avatar_url":"https://avatars1.githubusercontent.com/u/30125649?v=4","gravatar_id":"","url":"https://api.github.com/users/envoyproxy","html_url":"https://github.com/envoyproxy","followers_url":"https://api.github.com/users/envoyproxy/followers","following_url":"https://api.github.com/users/envoyproxy/following{/other_user}","gists_url":"https://api.github.com/users/envoyproxy/gists{/gist_id}","starred_url":"https://api.github.com/users/envoyproxy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envoyproxy/subscriptions","organizations_url":"https://api.github.com/users/envoyproxy/orgs","repos_url":"https://api.github.com/users/envoyproxy/repos","events_url":"https://api.github.com/users/envoyproxy/events{/privacy}","received_events_url":"https://api.github.com/users/envoyproxy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/envoyproxy/envoy","description":"C++ front/service proxy","fork":false,"url":"https://api.github.com/repos/envoyproxy/envoy","forks_url":"https://api.github.com/repos/envoyproxy/envoy/forks","keys_url":"https://api.github.com/repos/envoyproxy/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envoyproxy/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envoyproxy/envoy/teams","hooks_url":"https://api.github.com/repos/envoyproxy/envoy/hooks","issue_events_url":"https://api.github.com/repos/envoyproxy/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/envoyproxy/envoy/events","assignees_url":"https://api.github.com/repos/envoyproxy/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/envoyproxy/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/envoyproxy/envoy/tags","blobs_url":"https://api.github.com/repos/envoyproxy/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envoyproxy/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envoyproxy/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/envoyproxy/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/envoyproxy/envoy/languages","stargazers_url":"https://api.github.com/repos/envoyproxy/envoy/stargazers","contributors_url":"https://api.github.com/repos/envoyproxy/envoy/contributors","subscribers_url":"https://api.github.com/repos/envoyproxy/envoy/subscribers","subscription_url":"https://api.github.com/repos/envoyproxy/envoy/subscription","commits_url":"https://api.github.com/repos/envoyproxy/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/envoyproxy/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/envoyproxy/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/envoyproxy/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/envoyproxy/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envoyproxy/envoy/merges","archive_url":"https://api.github.com/repos/envoyproxy/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envoyproxy/envoy/downloads","issues_url":"https://api.github.com/repos/envoyproxy/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/envoyproxy/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/envoyproxy/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/envoyproxy/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envoyproxy/envoy/labels{/name}","releases_url":"https://api.github.com/repos/envoyproxy/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/envoyproxy/envoy/deployments","created_at":"2016-08-08T15:07:24Z","updated_at":"2018-02-13T12:51:15Z","pushed_at":"2018-02-13T04:41:49Z","git_url":"git://github.com/envoyproxy/envoy.git","ssh_url":"git@github.com:envoyproxy/envoy.git","clone_url":"https://github.com/envoyproxy/envoy.git","svn_url":"https://github.com/envoyproxy/envoy","homepage":"https://envoyproxy.github.io/","size":11935,"stargazers_count":3859,"watchers_count":3859,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":470,"mirror_url":null,"archived":false,"open_issues_count":222,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":470,"open_issues":222,"watchers":3859,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/2568"},"issue":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/2568"},"comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/2568/comments"},"review_comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568/comments"},"review_comment":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/2568/commits"},"statuses":{"href":"https://api.github.com/repos/envoyproxy/envoy/statuses/6372516673296c785aca66013d3e42f8f905d6db"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"htuch"}}