{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/testpilot/issues/468","repository_url":"https://api.github.com/repos/mozilla/testpilot","labels_url":"https://api.github.com/repos/mozilla/testpilot/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/testpilot/issues/468/comments","events_url":"https://api.github.com/repos/mozilla/testpilot/issues/468/events","html_url":"https://github.com/mozilla/testpilot/issues/468","id":140043394,"number":468,"title":"Enable locale-specific experiments","user":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/testpilot/labels/needs%20discussion","name":"needs discussion","color":"bfe5bf"},{"url":"https://api.github.com/repos/mozilla/testpilot/labels/too%20large","name":"too large","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-10T23:51:13Z","updated_at":"2016-03-14T20:23:14Z","closed_at":null,"body":"*Bug migrated from universal search repo, was originally https://github.com/mozilla/universal-search/issues/76*\r\n\r\nDescription, from @nchapman in the original bug:\r\n\r\n> Due to various contractual requirements, we should make sure we can limit recommendations to specific markets rather than only specific languages. There are previous examples of doing this for other search experiments so we should look into how those were done.\r\n\r\nThe goal here seems to be allowing restricting experiment participation to specific countries. The earlier search experiments mentioned must have used country-specific locales (for example, `en-US` vs `en-GB`), as that's the only thing available to telemetry experiments.\r\n\r\nI hesitate to suggest using something stronger, like IP geolocation, because that seems like a questionable bit of data to store for a given user, and because tools like TOR make that easy enough to spoof (netflix IP spoofing is pretty common)."},"comment":{"url":"https://api.github.com/repos/mozilla/testpilot/issues/comments/196506809","html_url":"https://github.com/mozilla/testpilot/issues/468#issuecomment-196506809","issue_url":"https://api.github.com/repos/mozilla/testpilot/issues/468","id":196506809,"user":{"login":"lmorchard","id":21687,"avatar_url":"https://avatars.githubusercontent.com/u/21687?v=3","gravatar_id":"","url":"https://api.github.com/users/lmorchard","html_url":"https://github.com/lmorchard","followers_url":"https://api.github.com/users/lmorchard/followers","following_url":"https://api.github.com/users/lmorchard/following{/other_user}","gists_url":"https://api.github.com/users/lmorchard/gists{/gist_id}","starred_url":"https://api.github.com/users/lmorchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmorchard/subscriptions","organizations_url":"https://api.github.com/users/lmorchard/orgs","repos_url":"https://api.github.com/users/lmorchard/repos","events_url":"https://api.github.com/users/lmorchard/events{/privacy}","received_events_url":"https://api.github.com/users/lmorchard/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T20:23:14Z","updated_at":"2016-03-14T20:23:14Z","body":"> Why would you record a users locale in their profile versus just grabbing it from the browser/user each time?\r\n\r\nSee #478.\r\n\r\nAs of right now, feature flipping logic happens on the server, so the server needs all the data. If the client does it, it needs the conditions and their implementations.\r\n\r\nFor example, we might want to apply a feature condition like: For all German users on Windows, put half in feature bucket A and half in feature bucket B. If the server resolves that condition, it needs the data (because it has the conditions). If the client resolves that condition, it needs the condition (because it has the data).\r\n\r\nAs for changing locale, maybe we can clear the user's feature flags and re-calculate from conditions when that happens. That, or we only calculate the first time and assume locale is normally a stable things"}}