payload: {"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/rogue/pulls/comments/354440016","pull_request_review_id":327714264,"id":354440016,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1NDQ0MDAxNg==","diff_hunk":"@@ -31,7 +31,7 @@ class Signup extends Model\n      *\n      * @var array\n      */\n-    protected $fillable = ['id', 'northstar_id', 'campaign_id', 'quantity', 'quantity_pending', 'why_participated', 'source', 'source_details', 'details', 'created_at', 'updated_at'];\n+    protected $fillable = ['id', 'northstar_id', 'campaign_id', 'why_participated', 'source', 'source_details', 'details', 'created_at', 'updated_at'];","path":"app/Models/Signup.php","position":5,"original_position":5,"commit_id":"a93f9a6aab2fccf64619c6fa9bd214a4c8e0153a","original_commit_id":"a93f9a6aab2fccf64619c6fa9bd214a4c8e0153a","user":{"login":"katiecrane","id":4240292,"node_id":"MDQ6VXNlcjQyNDAyOTI=","avatar_url":"https://avatars1.githubusercontent.com/u/4240292?v=4","gravatar_id":"","url":"https://api.github.com/users/katiecrane","html_url":"https://github.com/katiecrane","followers_url":"https://api.github.com/users/katiecrane/followers","following_url":"https://api.github.com/users/katiecrane/following{/other_user}","gists_url":"https://api.github.com/users/katiecrane/gists{/gist_id}","starred_url":"https://api.github.com/users/katiecrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katiecrane/subscriptions","organizations_url":"https://api.github.com/users/katiecrane/orgs","repos_url":"https://api.github.com/users/katiecrane/repos","events_url":"https://api.github.com/users/katiecrane/events{/privacy}","received_events_url":"https://api.github.com/users/katiecrane/received_events","type":"User","site_admin":false},"body":"Did you mean on the signup?","created_at":"2019-12-05T17:12:00Z","updated_at":"2019-12-05T17:12:01Z","html_url":"https://github.com/DoSomething/rogue/pull/967#discussion_r354440016","pull_request_url":"https://api.github.com/repos/DoSomething/rogue/pulls/967","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/comments/354440016"},"html":{"href":"https://github.com/DoSomething/rogue/pull/967#discussion_r354440016"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/967"}},"in_reply_to_id":354429115},"pull_request":{"url":"https://api.github.com/repos/DoSomething/rogue/pulls/967","id":349133274,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ5MTMzMjc0","html_url":"https://github.com/DoSomething/rogue/pull/967","diff_url":"https://github.com/DoSomething/rogue/pull/967.diff","patch_url":"https://github.com/DoSomething/rogue/pull/967.patch","issue_url":"https://api.github.com/repos/DoSomething/rogue/issues/967","number":967,"state":"open","locked":false,"title":"Fix performance issue on signups with many posts.","user":{"login":"DFurnes","id":583202,"node_id":"MDQ6VXNlcjU4MzIwMg==","avatar_url":"https://avatars1.githubusercontent.com/u/583202?v=4","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"body":"### What's this PR do?\r\n\r\nThis pull request fixes a performance issue with the `Signup.quantity` field on posts with many signups. Because we updated this to store quantity on individual posts, the `$signup->posts` relationship was loading _all_ the posts on a signup into memory to sum them up:\r\n\r\n![Screen Shot 2019-12-04 at 4 00 13 PM](https://user-images.githubusercontent.com/583202/70187631-b97f1e80-16bc-11ea-8ef3-d31bd73716bf.png)\r\n\r\nYikes! I adjusted this to create an \"aggregate\" query with the query builder rather than loading these all and using [Eloquent's Collection](https://laravel.com/docs/6.x/eloquent-collections) class to tally them up in-memory. Much better:\r\n\r\n<img width=\"603\" alt=\"Screen Shot 2019-12-04 at 5 43 54 PM\" src=\"https://user-images.githubusercontent.com/583202/70188031-a751b000-16bd-11ea-8382-0984cbf6961b.png\">\r\n\r\nThis also removes the `features.v3QuantitySupport` feature flag since it shipped a long time ago.\r\n\r\n### How should this be reviewed?\r\n\r\n👀 \r\n\r\n### Any background context you want to provide?\r\n\r\nThis was causing intermittent failures for our Ghost Inspector user, which has 5,937 posts on their \"Merit Over Money\" signup. I'll make a backlog ticket to see if we can remove this `Signup.quantity` field altogether on the base response (and make it opt-in `?include=quantity` so we don't have to run this extra query unnecessarily).\r\n\r\n### Relevant tickets\r\n\r\nReferences [Pivotal #170107177](https://www.pivotaltracker.com/story/show/170107177).\r\n\r\n### Checklist\r\n\r\n- [ ] This PR has been added to the relevant Pivotal card.\r\n- [ ] Documentation added for new features/changed endpoints.\r\n- [ ] Added appropriate feature/unit tests.\r\n","created_at":"2019-12-04T22:47:29Z","updated_at":"2019-12-05T17:12:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53886e2ad45dd5e459c33c0ccdd36d9cd243f161","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/rogue/pulls/967/commits","review_comments_url":"https://api.github.com/repos/DoSomething/rogue/pulls/967/comments","review_comment_url":"https://api.github.com/repos/DoSomething/rogue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/rogue/issues/967/comments","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/a93f9a6aab2fccf64619c6fa9bd214a4c8e0153a","head":{"label":"DoSomething:wait-dont-query-all-those","ref":"wait-dont-query-all-those","sha":"a93f9a6aab2fccf64619c6fa9bd214a4c8e0153a","user":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":64166359,"node_id":"MDEwOlJlcG9zaXRvcnk2NDE2NjM1OQ==","name":"rogue","full_name":"DoSomething/rogue","private":false,"owner":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DoSomething/rogue","description":":camera: The DoSomething.org activity service.","fork":false,"url":"https://api.github.com/repos/DoSomething/rogue","forks_url":"https://api.github.com/repos/DoSomething/rogue/forks","keys_url":"https://api.github.com/repos/DoSomething/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/rogue/teams","hooks_url":"https://api.github.com/repos/DoSomething/rogue/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/rogue/events","assignees_url":"https://api.github.com/repos/DoSomething/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/rogue/tags","blobs_url":"https://api.github.com/repos/DoSomething/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/rogue/languages","stargazers_url":"https://api.github.com/repos/DoSomething/rogue/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/rogue/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/rogue/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/rogue/subscription","commits_url":"https://api.github.com/repos/DoSomething/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/rogue/merges","archive_url":"https://api.github.com/repos/DoSomething/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/rogue/downloads","issues_url":"https://api.github.com/repos/DoSomething/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/rogue/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/rogue/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/rogue/deployments","created_at":"2016-07-25T20:38:30Z","updated_at":"2019-12-04T22:37:44Z","pushed_at":"2019-12-05T16:38:02Z","git_url":"git://github.com/DoSomething/rogue.git","ssh_url":"git@github.com:DoSomething/rogue.git","clone_url":"https://github.com/DoSomething/rogue.git","svn_url":"https://github.com/DoSomething/rogue","homepage":"https://activity.dosomething.org","size":8793,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"DoSomething:master","ref":"master","sha":"d0792def6f2f03ec778e31fca6c4b5ef316e28f2","user":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":64166359,"node_id":"MDEwOlJlcG9zaXRvcnk2NDE2NjM1OQ==","name":"rogue","full_name":"DoSomething/rogue","private":false,"owner":{"login":"DoSomething","id":731685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczMTY4NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/731685?v=4","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DoSomething/rogue","description":":camera: The DoSomething.org activity service.","fork":false,"url":"https://api.github.com/repos/DoSomething/rogue","forks_url":"https://api.github.com/repos/DoSomething/rogue/forks","keys_url":"https://api.github.com/repos/DoSomething/rogue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/rogue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/rogue/teams","hooks_url":"https://api.github.com/repos/DoSomething/rogue/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/rogue/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/rogue/events","assignees_url":"https://api.github.com/repos/DoSomething/rogue/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/rogue/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/rogue/tags","blobs_url":"https://api.github.com/repos/DoSomething/rogue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/rogue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/rogue/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/rogue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/rogue/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/rogue/languages","stargazers_url":"https://api.github.com/repos/DoSomething/rogue/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/rogue/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/rogue/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/rogue/subscription","commits_url":"https://api.github.com/repos/DoSomething/rogue/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/rogue/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/rogue/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/rogue/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/rogue/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/rogue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/rogue/merges","archive_url":"https://api.github.com/repos/DoSomething/rogue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/rogue/downloads","issues_url":"https://api.github.com/repos/DoSomething/rogue/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/rogue/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/rogue/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/rogue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/rogue/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/rogue/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/rogue/deployments","created_at":"2016-07-25T20:38:30Z","updated_at":"2019-12-04T22:37:44Z","pushed_at":"2019-12-05T16:38:02Z","git_url":"git://github.com/DoSomething/rogue.git","ssh_url":"git@github.com:DoSomething/rogue.git","clone_url":"https://github.com/DoSomething/rogue.git","svn_url":"https://github.com/DoSomething/rogue","homepage":"https://activity.dosomething.org","size":8793,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/967"},"html":{"href":"https://github.com/DoSomething/rogue/pull/967"},"issue":{"href":"https://api.github.com/repos/DoSomething/rogue/issues/967"},"comments":{"href":"https://api.github.com/repos/DoSomething/rogue/issues/967/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/967/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/rogue/pulls/967/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/rogue/statuses/a93f9a6aab2fccf64619c6fa9bd214a4c8e0153a"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"katiecrane"}}