{"action":"created","issue":{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/231","repository_url":"https://api.github.com/repos/sourcegraph/sourcegraph","labels_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/231/comments","events_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/231/events","html_url":"https://github.com/sourcegraph/sourcegraph/pull/231","id":164239416,"number":231,"title":"all: final changes for Sourcegraph beta program","user":{"login":"slimsag","id":3173176,"avatar_url":"https://avatars.githubusercontent.com/u/3173176?v=3","gravatar_id":"","url":"https://api.github.com/users/slimsag","html_url":"https://github.com/slimsag","followers_url":"https://api.github.com/users/slimsag/followers","following_url":"https://api.github.com/users/slimsag/following{/other_user}","gists_url":"https://api.github.com/users/slimsag/gists{/gist_id}","starred_url":"https://api.github.com/users/slimsag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slimsag/subscriptions","organizations_url":"https://api.github.com/users/slimsag/orgs","repos_url":"https://api.github.com/users/slimsag/repos","events_url":"https://api.github.com/users/slimsag/events{/privacy}","received_events_url":"https://api.github.com/users/slimsag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/labels/DO%20NOT%20MERGE","name":"DO NOT MERGE","color":"b60205"},{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/labels/Ready%20for%20review","name":"Ready for review","color":"0052cc"}],"state":"open","locked":false,"assignee":{"login":"rothfels","id":1095573,"avatar_url":"https://avatars.githubusercontent.com/u/1095573?v=3","gravatar_id":"","url":"https://api.github.com/users/rothfels","html_url":"https://github.com/rothfels","followers_url":"https://api.github.com/users/rothfels/followers","following_url":"https://api.github.com/users/rothfels/following{/other_user}","gists_url":"https://api.github.com/users/rothfels/gists{/gist_id}","starred_url":"https://api.github.com/users/rothfels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rothfels/subscriptions","organizations_url":"https://api.github.com/users/rothfels/orgs","repos_url":"https://api.github.com/users/rothfels/repos","events_url":"https://api.github.com/users/rothfels/events{/privacy}","received_events_url":"https://api.github.com/users/rothfels/received_events","type":"User","site_admin":false},"assignees":[{"login":"rothfels","id":1095573,"avatar_url":"https://avatars.githubusercontent.com/u/1095573?v=3","gravatar_id":"","url":"https://api.github.com/users/rothfels","html_url":"https://github.com/rothfels","followers_url":"https://api.github.com/users/rothfels/followers","following_url":"https://api.github.com/users/rothfels/following{/other_user}","gists_url":"https://api.github.com/users/rothfels/gists{/gist_id}","starred_url":"https://api.github.com/users/rothfels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rothfels/subscriptions","organizations_url":"https://api.github.com/users/rothfels/orgs","repos_url":"https://api.github.com/users/rothfels/repos","events_url":"https://api.github.com/users/rothfels/events{/privacy}","received_events_url":"https://api.github.com/users/rothfels/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-07T06:35:29Z","updated_at":"2016-07-07T15:44:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/pulls/231","html_url":"https://github.com/sourcegraph/sourcegraph/pull/231","diff_url":"https://github.com/sourcegraph/sourcegraph/pull/231.diff","patch_url":"https://github.com/sourcegraph/sourcegraph/pull/231.patch"},"body":"- Add a link to `/beta` from GlobalNav (otherwise users can never land on that page,\r\n  as there are no other links to it anywhere / all other uses are inside embedded\r\n  frames).\r\n- Remove the \"Email Address\" field from the BetaInterestForm; use the account\r\n  primary email instead. This solves a tougher technical aspect of keeping Mailchimp\r\n  in sync, otherwise we would need a bit on each user email address specifying if it\r\n  was the one they registered into Mailchimp or not.\r\n- Add CLI flags to properly manage beta users in all meaningful ways:\r\n  - `src user list [--all-betas=...]`\r\n  - `src user update [--add-betas=...] [--rm-betas=...] [--set-betas=...] <user>`\r\n  - `src user get <user>` now shows betas a user is in.\r\n  - See Quip document below for more details.\r\n- Add wording to the beta page to explain why the form still shows (see BetaInterestForm.js:144-149).\r\n- Tell the user which email address (always their account primary email address) that\r\n  we will be emailing them at.\r\n- When opening the beta form via a modal, always display the success text after\r\n  form submission, and display a close button to exit the modal instead of closing\r\n  it immediately upon submission (which did not show potential errors, either).\r\n- Implement the betas backend, which properly keeps Mailchimp in sync + stores which\r\n  betas a user is part of in Postgres.\r\n- Implement helpers for detecting whether or not a user is in a given beta in both\r\n  Go and JS, see [relevant Quip document describing beta user management](https://sourcegraph.quip.com/KTaTA0pLkt8v) for more details.\r\n\r\nUsers will need to run the following to migrate to the new DB schema:\r\n\r\n```\r\nALTER TABLE users ADD COLUMN betas text ARRAY;\r\n```\r\n\r\n(within the app DB)\r\n\r\n\r\n##### Reviewer tasks\r\n\r\n- I've spent a lot of time making sure this is the _right_ implementation, so please raise any concerns you might have. I've also tested pretty extensively in many different situations.\r\n- Please also briefly review [the Quip document describing beta user management](https://sourcegraph.quip.com/KTaTA0pLkt8v) and comment on anything that stands out.\r\n- I'm very confident it works, but please checkout `sg/beta-cli-server` and run the above DB migration command in `psql`. You can `ALTER TABLE users DROP COLUMN betas;` after to revert the migration. Confirm that nothing weird happens.\r\n\r\n##### Test plan\r\n\r\nTesting has been quite extensive, but manual. Much of it relies on external services and as such it seems difficult to test under traditional unit tests.\r\n\r\nTo deploy, I will:\r\n  1. Pin the sourcegraph.com version to master.\r\n  2. Merge this branch to `master`.\r\n  3. Wait for CI build.\r\n  4. Perform the DB migration in prod.\r\n  5. Deploy the new `master` to prod.\r\n  6. Confirm everything looks OK and is working. Any issue can be fixed immediately by rolling back after running the above revertion SQL.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/comments/231119538","html_url":"https://github.com/sourcegraph/sourcegraph/pull/231#issuecomment-231119538","issue_url":"https://api.github.com/repos/sourcegraph/sourcegraph/issues/231","id":231119538,"user":{"login":"rothfels","id":1095573,"avatar_url":"https://avatars.githubusercontent.com/u/1095573?v=3","gravatar_id":"","url":"https://api.github.com/users/rothfels","html_url":"https://github.com/rothfels","followers_url":"https://api.github.com/users/rothfels/followers","following_url":"https://api.github.com/users/rothfels/following{/other_user}","gists_url":"https://api.github.com/users/rothfels/gists{/gist_id}","starred_url":"https://api.github.com/users/rothfels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rothfels/subscriptions","organizations_url":"https://api.github.com/users/rothfels/orgs","repos_url":"https://api.github.com/users/rothfels/repos","events_url":"https://api.github.com/users/rothfels/events{/privacy}","received_events_url":"https://api.github.com/users/rothfels/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T15:44:57Z","updated_at":"2016-07-07T15:44:57Z","body":"@slimsag are you aware that we don't always have a user email address? If you create an account w/ GitHub login and all your emails are listed as private, there will be no entry in the `user_email` table for that user. And (afaict right now) there's no way to subsequently add an email to that table. In this case, we might need to still ask for the user's email address on the form. (And, maybe, we should go ahead and save that email address to the emails table, though if we do we should be careful not to fail the beta form POST if the user chooses an email address which is already taken). I agree that in the normal case it is better to use the email address we already have saved for the user. 👍 "}}
{"actor":{"display_login":"rothfels"}}