{"action":"created","comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/185064563","pull_request_review_id":116382237,"id":185064563,"diff_hunk":"@@ -44,7 +44,7 @@ FaultFilterFactory::createFilterFactoryFromProto(const Protobuf::Message& proto_\n \n Router::RouteSpecificFilterConfigConstSharedPtr\n FaultFilterFactory::createRouteSpecificFilterConfig(const Protobuf::Message& proto_config) {\n-  return std::make_shared<const Router::RouteSpecificFilterConfig>(Fault::FaultSettings(\n+  return std::shared_ptr<const Router::RouteSpecificFilterConfig>(new Fault::FaultSettings(","path":"source/extensions/filters/http/fault/config.cc","position":5,"original_position":5,"commit_id":"7623f283e497c32035667d03a23736d699e96082","original_commit_id":"7623f283e497c32035667d03a23736d699e96082","user":{"login":"rodaine","id":1268580,"avatar_url":"https://avatars3.githubusercontent.com/u/1268580?v=4","gravatar_id":"","url":"https://api.github.com/users/rodaine","html_url":"https://github.com/rodaine","followers_url":"https://api.github.com/users/rodaine/followers","following_url":"https://api.github.com/users/rodaine/following{/other_user}","gists_url":"https://api.github.com/users/rodaine/gists{/gist_id}","starred_url":"https://api.github.com/users/rodaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodaine/subscriptions","organizations_url":"https://api.github.com/users/rodaine/orgs","repos_url":"https://api.github.com/users/rodaine/repos","events_url":"https://api.github.com/users/rodaine/events{/privacy}","received_events_url":"https://api.github.com/users/rodaine/received_events","type":"User","site_admin":false},"body":"With a bit of help from @jsedgwick, I think I've figured out a fix that doesn't require these changes to the base class: instead of `make_shared<const Router::RouteSpecificFilterConfig>`, use `make_shared<const FaultSettings>`. Integration tests and a unit test specifically covering this case passed locally in https://github.com/envoyproxy/envoy/pull/3120, just waiting on CI to confirm.","created_at":"2018-04-30T18:11:55Z","updated_at":"2018-04-30T18:11:56Z","html_url":"https://github.com/envoyproxy/envoy/pull/3257#discussion_r185064563","pull_request_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments/185064563"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/3257#discussion_r185064563"},"pull_request":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257"}}},"pull_request":{"url":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257","id":184972815,"html_url":"https://github.com/envoyproxy/envoy/pull/3257","diff_url":"https://github.com/envoyproxy/envoy/pull/3257.diff","patch_url":"https://github.com/envoyproxy/envoy/pull/3257.patch","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/3257","number":3257,"state":"open","locked":false,"title":"bugfix: Fix type erasure when retrieving per-route filter config","user":{"login":"rshriram","id":8202871,"avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Shriram Rajagopalan <shriramr@vmware.com>\r\n\r\nbugfix: Fix type-erasure when retrieving per-route filter config\r\n\r\n\r\n*Description*:\r\nI don't know where the type was getting lost, but dynamic_cast<>  in perFilterConfigTyped<> was always returning null, though the unit tests seemed to pass. Per-route fault filter did not work (@rodaine also had a similar issue in his buffer filter implementation). Making the RouteSpecificFilterConfig an abstract class seems to fix the issue.\r\n\r\n*Risk Level*: Low\r\n\r\n*Testing*: Manually tested with per-route fault filters. @rodaine has an open PR that uses per-route buffer filter settings in integration tests.\r\n","created_at":"2018-04-30T14:34:22Z","updated_at":"2018-04-30T18:11:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5629a930f43482eafa2c3370df297a2017f24123","assignee":{"login":"mattklein123","id":6305260,"avatar_url":"https://avatars3.githubusercontent.com/u/6305260?v=4","gravatar_id":"","url":"https://api.github.com/users/mattklein123","html_url":"https://github.com/mattklein123","followers_url":"https://api.github.com/users/mattklein123/followers","following_url":"https://api.github.com/users/mattklein123/following{/other_user}","gists_url":"https://api.github.com/users/mattklein123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattklein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattklein123/subscriptions","organizations_url":"https://api.github.com/users/mattklein123/orgs","repos_url":"https://api.github.com/users/mattklein123/repos","events_url":"https://api.github.com/users/mattklein123/events{/privacy}","received_events_url":"https://api.github.com/users/mattklein123/received_events","type":"User","site_admin":false},"assignees":[{"login":"mattklein123","id":6305260,"avatar_url":"https://avatars3.githubusercontent.com/u/6305260?v=4","gravatar_id":"","url":"https://api.github.com/users/mattklein123","html_url":"https://github.com/mattklein123","followers_url":"https://api.github.com/users/mattklein123/followers","following_url":"https://api.github.com/users/mattklein123/following{/other_user}","gists_url":"https://api.github.com/users/mattklein123/gists{/gist_id}","starred_url":"https://api.github.com/users/mattklein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattklein123/subscriptions","organizations_url":"https://api.github.com/users/mattklein123/orgs","repos_url":"https://api.github.com/users/mattklein123/repos","events_url":"https://api.github.com/users/mattklein123/events{/privacy}","received_events_url":"https://api.github.com/users/mattklein123/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257/commits","review_comments_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257/comments","review_comment_url":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/3257/comments","statuses_url":"https://api.github.com/repos/envoyproxy/envoy/statuses/7623f283e497c32035667d03a23736d699e96082","head":{"label":"rshriram:fix_type_erasure","ref":"fix_type_erasure","sha":"7623f283e497c32035667d03a23736d699e96082","user":{"login":"rshriram","id":8202871,"avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"repo":{"id":88080031,"name":"envoy","full_name":"rshriram/envoy","owner":{"login":"rshriram","id":8202871,"avatar_url":"https://avatars1.githubusercontent.com/u/8202871?v=4","gravatar_id":"","url":"https://api.github.com/users/rshriram","html_url":"https://github.com/rshriram","followers_url":"https://api.github.com/users/rshriram/followers","following_url":"https://api.github.com/users/rshriram/following{/other_user}","gists_url":"https://api.github.com/users/rshriram/gists{/gist_id}","starred_url":"https://api.github.com/users/rshriram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rshriram/subscriptions","organizations_url":"https://api.github.com/users/rshriram/orgs","repos_url":"https://api.github.com/users/rshriram/repos","events_url":"https://api.github.com/users/rshriram/events{/privacy}","received_events_url":"https://api.github.com/users/rshriram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rshriram/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/rshriram/envoy","forks_url":"https://api.github.com/repos/rshriram/envoy/forks","keys_url":"https://api.github.com/repos/rshriram/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rshriram/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rshriram/envoy/teams","hooks_url":"https://api.github.com/repos/rshriram/envoy/hooks","issue_events_url":"https://api.github.com/repos/rshriram/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/rshriram/envoy/events","assignees_url":"https://api.github.com/repos/rshriram/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/rshriram/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/rshriram/envoy/tags","blobs_url":"https://api.github.com/repos/rshriram/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rshriram/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rshriram/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rshriram/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rshriram/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/rshriram/envoy/languages","stargazers_url":"https://api.github.com/repos/rshriram/envoy/stargazers","contributors_url":"https://api.github.com/repos/rshriram/envoy/contributors","subscribers_url":"https://api.github.com/repos/rshriram/envoy/subscribers","subscription_url":"https://api.github.com/repos/rshriram/envoy/subscription","commits_url":"https://api.github.com/repos/rshriram/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rshriram/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rshriram/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rshriram/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rshriram/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/rshriram/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rshriram/envoy/merges","archive_url":"https://api.github.com/repos/rshriram/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rshriram/envoy/downloads","issues_url":"https://api.github.com/repos/rshriram/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/rshriram/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/rshriram/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/rshriram/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rshriram/envoy/labels{/name}","releases_url":"https://api.github.com/repos/rshriram/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/rshriram/envoy/deployments","created_at":"2017-04-12T17:44:05Z","updated_at":"2018-03-14T16:58:59Z","pushed_at":"2018-04-30T16:02:29Z","git_url":"git://github.com/rshriram/envoy.git","ssh_url":"git@github.com:rshriram/envoy.git","clone_url":"https://github.com/rshriram/envoy.git","svn_url":"https://github.com/rshriram/envoy","homepage":"https://lyft.github.io/envoy","size":26330,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"envoyproxy:master","ref":"master","sha":"13de384ab34428af99c53201f6b3c95991b7ae10","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-04-30T17:53:57Z","pushed_at":"2018-04-30T18:11:23Z","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://www.envoyproxy.io","size":14930,"stargazers_count":4700,"watchers_count":4700,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":592,"mirror_url":null,"archived":false,"open_issues_count":323,"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":592,"open_issues":323,"watchers":4700,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257"},"html":{"href":"https://github.com/envoyproxy/envoy/pull/3257"},"issue":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/3257"},"comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/issues/3257/comments"},"review_comments":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257/comments"},"review_comment":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envoyproxy/envoy/pulls/3257/commits"},"statuses":{"href":"https://api.github.com/repos/envoyproxy/envoy/statuses/7623f283e497c32035667d03a23736d699e96082"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"rodaine"}}