{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/222833629","pull_request_review_id":161818449,"id":222833629,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjgzMzYyOQ==","diff_hunk":"@@ -100,17 +101,17 @@ func (s *UserEKBoxStorage) Get(ctx context.Context, generation keybase1.EkGenera\n \n \t// Try cache first\n \tcacheItem, ok := cache[generation]\n-\tif ok {\n-\t\tdefer s.Unlock() // release the lock after we unbox\n-\t\tif cacheItem.HasError() {\n-\t\t\treturn userEK, cacheItem.Error()\n-\t\t}\n-\t\treturn s.unbox(ctx, generation, cacheItem.UserEKBoxed)\n+\tif !ok {\n+\t\t// We don't have anything in our cache, fetch from the server\n+\t\ts.Unlock() // release the lock while we fetch\n+\t\treturn s.fetchAndStore(ctx, generation)\n \t}\n \n-\t// We don't have anything in our cache, fetch from the server\n-\ts.Unlock() // release the lock while we fetch\n-\treturn s.fetchAndStore(ctx, generation)\n+\tdefer s.Unlock() // release the lock after we unbox\n+\tif cacheItem.HasError() {\n+\t\treturn userEK, cacheItem.Error()\n+\t}\n+\treturn s.unbox(ctx, generation, cacheItem.UserEKBoxed)","path":"go/ephemeral/user_ek_box_storage.go","position":46,"original_position":46,"commit_id":"0db06b562a2c7f4a57547c9abf8d024f35892aed","original_commit_id":"0db06b562a2c7f4a57547c9abf8d024f35892aed","user":{"login":"mlsteele","id":705646,"node_id":"MDQ6VXNlcjcwNTY0Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/705646?v=4","gravatar_id":"","url":"https://api.github.com/users/mlsteele","html_url":"https://github.com/mlsteele","followers_url":"https://api.github.com/users/mlsteele/followers","following_url":"https://api.github.com/users/mlsteele/following{/other_user}","gists_url":"https://api.github.com/users/mlsteele/gists{/gist_id}","starred_url":"https://api.github.com/users/mlsteele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlsteele/subscriptions","organizations_url":"https://api.github.com/users/mlsteele/orgs","repos_url":"https://api.github.com/users/mlsteele/repos","events_url":"https://api.github.com/users/mlsteele/events{/privacy}","received_events_url":"https://api.github.com/users/mlsteele/received_events","type":"User","site_admin":false},"body":"this didn't change behavior I think","created_at":"2018-10-04T21:30:10Z","updated_at":"2018-10-04T21:30:34Z","html_url":"https://github.com/keybase/client/pull/14050#discussion_r222833629","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/14050","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/222833629"},"html":{"href":"https://github.com/keybase/client/pull/14050#discussion_r222833629"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/14050"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/14050","id":220062305,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMDYyMzA1","html_url":"https://github.com/keybase/client/pull/14050","diff_url":"https://github.com/keybase/client/pull/14050.diff","patch_url":"https://github.com/keybase/client/pull/14050.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/14050","number":14050,"state":"open","locked":false,"title":"don't cache transient ephemeral errors","user":{"login":"joshblum","id":1144020,"node_id":"MDQ6VXNlcjExNDQwMjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1144020?v=4","gravatar_id":"","url":"https://api.github.com/users/joshblum","html_url":"https://github.com/joshblum","followers_url":"https://api.github.com/users/joshblum/followers","following_url":"https://api.github.com/users/joshblum/following{/other_user}","gists_url":"https://api.github.com/users/joshblum/gists{/gist_id}","starred_url":"https://api.github.com/users/joshblum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshblum/subscriptions","organizations_url":"https://api.github.com/users/joshblum/orgs","repos_url":"https://api.github.com/users/joshblum/repos","events_url":"https://api.github.com/users/joshblum/events{/privacy}","received_events_url":"https://api.github.com/users/joshblum/received_events","type":"User","site_admin":false},"body":"only cache ephemeral key errors if they are permanent (key is missing/unable to be unboxed). prevents transient (network/api) errors from being permanently cached. bumps the db version of `UserEKBoxStorage` and `TeamEKBoxStorage` so any existing bad values are retried.","created_at":"2018-10-03T14:38:09Z","updated_at":"2018-10-04T21:30:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c34f8f9bac9f0c22852727e8bcebdf0cd79ad6e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/14050/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/14050/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/14050/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/0db06b562a2c7f4a57547c9abf8d024f35892aed","head":{"label":"keybase:joshblum/purge-err-CORE-9073","ref":"joshblum/purge-err-CORE-9073","sha":"0db06b562a2c7f4a57547c9abf8d024f35892aed","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-10-04T21:17:44Z","pushed_at":"2018-10-04T21:27:10Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":273618,"stargazers_count":4155,"watchers_count":4155,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":408,"mirror_url":null,"archived":false,"open_issues_count":2379,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":408,"open_issues":2379,"watchers":4155,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"c32e62f4db98e724098d6c14940e2691af19ecdb","user":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"node_id":"MDEwOlJlcG9zaXRvcnkyOTA5OTE4MQ==","name":"client","full_name":"keybase/client","private":false,"owner":{"login":"keybase","id":5400834,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MDA4MzQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5400834?v=4","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2018-10-04T21:17:44Z","pushed_at":"2018-10-04T21:27:10Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":273618,"stargazers_count":4155,"watchers_count":4155,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":408,"mirror_url":null,"archived":false,"open_issues_count":2379,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":408,"open_issues":2379,"watchers":4155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/14050"},"html":{"href":"https://github.com/keybase/client/pull/14050"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/14050"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/14050/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/14050/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/14050/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/0db06b562a2c7f4a57547c9abf8d024f35892aed"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mlsteele"}}