{"action":"created","comment":{"url":"https://api.github.com/repos/reddit/baseplate/pulls/comments/181909203","pull_request_review_id":112610975,"id":181909203,"diff_hunk":"@@ -90,6 +90,18 @@ def _get_experiment(self, name):\n             self._experiment_cache[name] = experiment\n         return self._experiment_cache[name]\n \n+    def _get_all_experiment_names(self):\n+        config = self._config_watcher.get_data()\n+        exp_names = []\n+        if config:\n+            for name, cfg in config.items():\n+                exp_names.append(name)\n+\n+        return exp_names\n+\n+    def is_valid_experiment(self, name):","path":"baseplate/experiments/__init__.py","position":13,"original_position":13,"commit_id":"c0fa97aba9ef3c2f729a89672870133536cb3139","original_commit_id":"c0fa97aba9ef3c2f729a89672870133536cb3139","user":{"login":"pacejackson","id":1929108,"avatar_url":"https://avatars1.githubusercontent.com/u/1929108?v=4","gravatar_id":"","url":"https://api.github.com/users/pacejackson","html_url":"https://github.com/pacejackson","followers_url":"https://api.github.com/users/pacejackson/followers","following_url":"https://api.github.com/users/pacejackson/following{/other_user}","gists_url":"https://api.github.com/users/pacejackson/gists{/gist_id}","starred_url":"https://api.github.com/users/pacejackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacejackson/subscriptions","organizations_url":"https://api.github.com/users/pacejackson/orgs","repos_url":"https://api.github.com/users/pacejackson/repos","events_url":"https://api.github.com/users/pacejackson/events{/privacy}","received_events_url":"https://api.github.com/users/pacejackson/received_events","type":"User","site_admin":false},"body":"🔕 Rather than providing this, it might make more sense to have `variant` raise an exception if the experiment name does not map to a known experiment.  I'm not 100% sure about this as it has some downsides:\r\n\r\n1. It means that code will randomly break when experiments get removed, in some ways this is _good_ because it forces you to clean up your code but it will likely break things.\r\n2. It also means that we have to update the r2 code to account for this.\r\n3. It means that you _have_ to put up your experiment config before you deploy your code that uses the experiment, this could be a pro or a con depending on how you look at it.","created_at":"2018-04-16T22:55:51Z","updated_at":"2018-04-16T22:58:52Z","html_url":"https://github.com/reddit/baseplate/pull/174#discussion_r181909203","pull_request_url":"https://api.github.com/repos/reddit/baseplate/pulls/174","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/comments/181909203"},"html":{"href":"https://github.com/reddit/baseplate/pull/174#discussion_r181909203"},"pull_request":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/174"}}},"pull_request":{"url":"https://api.github.com/repos/reddit/baseplate/pulls/174","id":181596674,"html_url":"https://github.com/reddit/baseplate/pull/174","diff_url":"https://github.com/reddit/baseplate/pull/174.diff","patch_url":"https://github.com/reddit/baseplate/pull/174.patch","issue_url":"https://api.github.com/repos/reddit/baseplate/issues/174","number":174,"state":"open","locked":false,"title":"Exposure events","user":{"login":"Kaitaan","id":825909,"avatar_url":"https://avatars3.githubusercontent.com/u/825909?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaitaan","html_url":"https://github.com/Kaitaan","followers_url":"https://api.github.com/users/Kaitaan/followers","following_url":"https://api.github.com/users/Kaitaan/following{/other_user}","gists_url":"https://api.github.com/users/Kaitaan/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaitaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaitaan/subscriptions","organizations_url":"https://api.github.com/users/Kaitaan/orgs","repos_url":"https://api.github.com/users/Kaitaan/repos","events_url":"https://api.github.com/users/Kaitaan/events{/privacy}","received_events_url":"https://api.github.com/users/Kaitaan/received_events","type":"User","site_admin":false},"body":"- support for firing exposure events\r\n- support for validating experiment names (to differentiate between when `variant` returns null because not bucketed, or \"invalid\" experiment name\r\n- support for getting a list of all experiment names. This will be used to bucket a user for all (valid) experiments in order to return the full list of variants in a single call.\r\n- fix weird bucketing issue with very small bucketing percentages on r2 experiments\r\n- replace `event_queue` with `event_logger`","created_at":"2018-04-13T21:08:49Z","updated_at":"2018-04-16T22:58:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e94664eedba51026aac124d763ccd48fc22be1a2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"spladug","id":338853,"avatar_url":"https://avatars0.githubusercontent.com/u/338853?v=4","gravatar_id":"","url":"https://api.github.com/users/spladug","html_url":"https://github.com/spladug","followers_url":"https://api.github.com/users/spladug/followers","following_url":"https://api.github.com/users/spladug/following{/other_user}","gists_url":"https://api.github.com/users/spladug/gists{/gist_id}","starred_url":"https://api.github.com/users/spladug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spladug/subscriptions","organizations_url":"https://api.github.com/users/spladug/orgs","repos_url":"https://api.github.com/users/spladug/repos","events_url":"https://api.github.com/users/spladug/events{/privacy}","received_events_url":"https://api.github.com/users/spladug/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/reddit/baseplate/pulls/174/commits","review_comments_url":"https://api.github.com/repos/reddit/baseplate/pulls/174/comments","review_comment_url":"https://api.github.com/repos/reddit/baseplate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reddit/baseplate/issues/174/comments","statuses_url":"https://api.github.com/repos/reddit/baseplate/statuses/c0fa97aba9ef3c2f729a89672870133536cb3139","head":{"label":"reddit:exposure_events","ref":"exposure_events","sha":"c0fa97aba9ef3c2f729a89672870133536cb3139","user":{"login":"reddit","id":14248,"avatar_url":"https://avatars1.githubusercontent.com/u/14248?v=4","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"repo":{"id":44694978,"name":"baseplate","full_name":"reddit/baseplate","owner":{"login":"reddit","id":14248,"avatar_url":"https://avatars1.githubusercontent.com/u/14248?v=4","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reddit/baseplate","description":"reddit's python service framework","fork":false,"url":"https://api.github.com/repos/reddit/baseplate","forks_url":"https://api.github.com/repos/reddit/baseplate/forks","keys_url":"https://api.github.com/repos/reddit/baseplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reddit/baseplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reddit/baseplate/teams","hooks_url":"https://api.github.com/repos/reddit/baseplate/hooks","issue_events_url":"https://api.github.com/repos/reddit/baseplate/issues/events{/number}","events_url":"https://api.github.com/repos/reddit/baseplate/events","assignees_url":"https://api.github.com/repos/reddit/baseplate/assignees{/user}","branches_url":"https://api.github.com/repos/reddit/baseplate/branches{/branch}","tags_url":"https://api.github.com/repos/reddit/baseplate/tags","blobs_url":"https://api.github.com/repos/reddit/baseplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reddit/baseplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reddit/baseplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/reddit/baseplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reddit/baseplate/statuses/{sha}","languages_url":"https://api.github.com/repos/reddit/baseplate/languages","stargazers_url":"https://api.github.com/repos/reddit/baseplate/stargazers","contributors_url":"https://api.github.com/repos/reddit/baseplate/contributors","subscribers_url":"https://api.github.com/repos/reddit/baseplate/subscribers","subscription_url":"https://api.github.com/repos/reddit/baseplate/subscription","commits_url":"https://api.github.com/repos/reddit/baseplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/reddit/baseplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/reddit/baseplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/reddit/baseplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/reddit/baseplate/contents/{+path}","compare_url":"https://api.github.com/repos/reddit/baseplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reddit/baseplate/merges","archive_url":"https://api.github.com/repos/reddit/baseplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reddit/baseplate/downloads","issues_url":"https://api.github.com/repos/reddit/baseplate/issues{/number}","pulls_url":"https://api.github.com/repos/reddit/baseplate/pulls{/number}","milestones_url":"https://api.github.com/repos/reddit/baseplate/milestones{/number}","notifications_url":"https://api.github.com/repos/reddit/baseplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reddit/baseplate/labels{/name}","releases_url":"https://api.github.com/repos/reddit/baseplate/releases{/id}","deployments_url":"https://api.github.com/repos/reddit/baseplate/deployments","created_at":"2015-10-21T18:07:55Z","updated_at":"2018-04-16T17:23:28Z","pushed_at":"2018-04-16T17:23:25Z","git_url":"git://github.com/reddit/baseplate.git","ssh_url":"git@github.com:reddit/baseplate.git","clone_url":"https://github.com/reddit/baseplate.git","svn_url":"https://github.com/reddit/baseplate","homepage":"https://baseplate.readthedocs.io/en/stable/","size":1365,"stargazers_count":210,"watchers_count":210,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":58,"open_issues":23,"watchers":210,"default_branch":"master"}},"base":{"label":"reddit:master","ref":"master","sha":"072de2f78ac9f8b41dbf48b12bd5c2c2e3f9c2ff","user":{"login":"reddit","id":14248,"avatar_url":"https://avatars1.githubusercontent.com/u/14248?v=4","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"repo":{"id":44694978,"name":"baseplate","full_name":"reddit/baseplate","owner":{"login":"reddit","id":14248,"avatar_url":"https://avatars1.githubusercontent.com/u/14248?v=4","gravatar_id":"","url":"https://api.github.com/users/reddit","html_url":"https://github.com/reddit","followers_url":"https://api.github.com/users/reddit/followers","following_url":"https://api.github.com/users/reddit/following{/other_user}","gists_url":"https://api.github.com/users/reddit/gists{/gist_id}","starred_url":"https://api.github.com/users/reddit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reddit/subscriptions","organizations_url":"https://api.github.com/users/reddit/orgs","repos_url":"https://api.github.com/users/reddit/repos","events_url":"https://api.github.com/users/reddit/events{/privacy}","received_events_url":"https://api.github.com/users/reddit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reddit/baseplate","description":"reddit's python service framework","fork":false,"url":"https://api.github.com/repos/reddit/baseplate","forks_url":"https://api.github.com/repos/reddit/baseplate/forks","keys_url":"https://api.github.com/repos/reddit/baseplate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reddit/baseplate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reddit/baseplate/teams","hooks_url":"https://api.github.com/repos/reddit/baseplate/hooks","issue_events_url":"https://api.github.com/repos/reddit/baseplate/issues/events{/number}","events_url":"https://api.github.com/repos/reddit/baseplate/events","assignees_url":"https://api.github.com/repos/reddit/baseplate/assignees{/user}","branches_url":"https://api.github.com/repos/reddit/baseplate/branches{/branch}","tags_url":"https://api.github.com/repos/reddit/baseplate/tags","blobs_url":"https://api.github.com/repos/reddit/baseplate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reddit/baseplate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reddit/baseplate/git/refs{/sha}","trees_url":"https://api.github.com/repos/reddit/baseplate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reddit/baseplate/statuses/{sha}","languages_url":"https://api.github.com/repos/reddit/baseplate/languages","stargazers_url":"https://api.github.com/repos/reddit/baseplate/stargazers","contributors_url":"https://api.github.com/repos/reddit/baseplate/contributors","subscribers_url":"https://api.github.com/repos/reddit/baseplate/subscribers","subscription_url":"https://api.github.com/repos/reddit/baseplate/subscription","commits_url":"https://api.github.com/repos/reddit/baseplate/commits{/sha}","git_commits_url":"https://api.github.com/repos/reddit/baseplate/git/commits{/sha}","comments_url":"https://api.github.com/repos/reddit/baseplate/comments{/number}","issue_comment_url":"https://api.github.com/repos/reddit/baseplate/issues/comments{/number}","contents_url":"https://api.github.com/repos/reddit/baseplate/contents/{+path}","compare_url":"https://api.github.com/repos/reddit/baseplate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reddit/baseplate/merges","archive_url":"https://api.github.com/repos/reddit/baseplate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reddit/baseplate/downloads","issues_url":"https://api.github.com/repos/reddit/baseplate/issues{/number}","pulls_url":"https://api.github.com/repos/reddit/baseplate/pulls{/number}","milestones_url":"https://api.github.com/repos/reddit/baseplate/milestones{/number}","notifications_url":"https://api.github.com/repos/reddit/baseplate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reddit/baseplate/labels{/name}","releases_url":"https://api.github.com/repos/reddit/baseplate/releases{/id}","deployments_url":"https://api.github.com/repos/reddit/baseplate/deployments","created_at":"2015-10-21T18:07:55Z","updated_at":"2018-04-16T17:23:28Z","pushed_at":"2018-04-16T17:23:25Z","git_url":"git://github.com/reddit/baseplate.git","ssh_url":"git@github.com:reddit/baseplate.git","clone_url":"https://github.com/reddit/baseplate.git","svn_url":"https://github.com/reddit/baseplate","homepage":"https://baseplate.readthedocs.io/en/stable/","size":1365,"stargazers_count":210,"watchers_count":210,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":58,"open_issues":23,"watchers":210,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/174"},"html":{"href":"https://github.com/reddit/baseplate/pull/174"},"issue":{"href":"https://api.github.com/repos/reddit/baseplate/issues/174"},"comments":{"href":"https://api.github.com/repos/reddit/baseplate/issues/174/comments"},"review_comments":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/174/comments"},"review_comment":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reddit/baseplate/pulls/174/commits"},"statuses":{"href":"https://api.github.com/repos/reddit/baseplate/statuses/c0fa97aba9ef3c2f729a89672870133536cb3139"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pacejackson"}}