{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rocket/pulls/comments/26029786","id":26029786,"diff_hunk":"@@ -160,7 +162,15 @@ func TestResolveKey(t *testing.T) {\n \t\tstr2key(\"67147019a5b56f5e2ee01e989a8aa4787f56b8445960be2d8678391cf111009bc0780f31001fd181a2b61507547aee4caa44cda4b8bdb238d0e4ba830069ed2c\"),\n \t}\n \tfor _, d := range data {\n-\t\tif err := ds.WriteStream(d.String(), d); err != nil {\n+\t\t// Save aciinfo\n+\t\tif err = ds.db.Do(func(tx *sql.Tx) error {","path":"cas/cas_test.go","position":21,"original_position":21,"commit_id":"803fe98b9379ab61140436ee6c62aefc012b6494","original_commit_id":"803fe98b9379ab61140436ee6c62aefc012b6494","user":{"login":"jonboulle","id":2601015,"avatar_url":"https://avatars.githubusercontent.com/u/2601015?v=3","gravatar_id":"","url":"https://api.github.com/users/jonboulle","html_url":"https://github.com/jonboulle","followers_url":"https://api.github.com/users/jonboulle/followers","following_url":"https://api.github.com/users/jonboulle/following{/other_user}","gists_url":"https://api.github.com/users/jonboulle/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboulle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboulle/subscriptions","organizations_url":"https://api.github.com/users/jonboulle/orgs","repos_url":"https://api.github.com/users/jonboulle/repos","events_url":"https://api.github.com/users/jonboulle/events{/privacy}","received_events_url":"https://api.github.com/users/jonboulle/received_events","type":"User","site_admin":false},"body":"here too","created_at":"2015-03-09T11:58:29Z","updated_at":"2015-03-09T11:58:29Z","html_url":"https://github.com/coreos/rocket/pull/569#discussion_r26029786","pull_request_url":"https://api.github.com/repos/coreos/rocket/pulls/569","_links":{"self":{"href":"https://api.github.com/repos/coreos/rocket/pulls/comments/26029786"},"html":{"href":"https://github.com/coreos/rocket/pull/569#discussion_r26029786"},"pull_request":{"href":"https://api.github.com/repos/coreos/rocket/pulls/569"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rocket/pulls/569","id":30481539,"html_url":"https://github.com/coreos/rocket/pull/569","diff_url":"https://github.com/coreos/rocket/pull/569.diff","patch_url":"https://github.com/coreos/rocket/pull/569.patch","issue_url":"https://api.github.com/repos/coreos/rocket/issues/569","number":569,"state":"open","locked":false,"title":"cas: use the db in ResolveKey.","user":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"body":"As the db is the primary and coherent information source, use it instead of\r\ndiskv in ResolveKey.\r\n\r\nThis will also help in future diskv locking as it removes the need for complex\r\nlocking inside ResolveKey.","created_at":"2015-03-04T16:41:57Z","updated_at":"2015-03-09T11:58:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5006795b7fb3e16afaca252d36b998f06f8812a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rocket/pulls/569/commits","review_comments_url":"https://api.github.com/repos/coreos/rocket/pulls/569/comments","review_comment_url":"https://api.github.com/repos/coreos/rocket/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rocket/issues/569/comments","statuses_url":"https://api.github.com/repos/coreos/rocket/statuses/803fe98b9379ab61140436ee6c62aefc012b6494","head":{"label":"sgotti:casresolvekeyusedb","ref":"casresolvekeyusedb","sha":"803fe98b9379ab61140436ee6c62aefc012b6494","user":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"repo":{"id":27428376,"name":"rocket","full_name":"sgotti/rocket","owner":{"login":"sgotti","id":1690273,"avatar_url":"https://avatars.githubusercontent.com/u/1690273?v=3","gravatar_id":"","url":"https://api.github.com/users/sgotti","html_url":"https://github.com/sgotti","followers_url":"https://api.github.com/users/sgotti/followers","following_url":"https://api.github.com/users/sgotti/following{/other_user}","gists_url":"https://api.github.com/users/sgotti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgotti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgotti/subscriptions","organizations_url":"https://api.github.com/users/sgotti/orgs","repos_url":"https://api.github.com/users/sgotti/repos","events_url":"https://api.github.com/users/sgotti/events{/privacy}","received_events_url":"https://api.github.com/users/sgotti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sgotti/rocket","description":"App Container runtime","fork":true,"url":"https://api.github.com/repos/sgotti/rocket","forks_url":"https://api.github.com/repos/sgotti/rocket/forks","keys_url":"https://api.github.com/repos/sgotti/rocket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sgotti/rocket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sgotti/rocket/teams","hooks_url":"https://api.github.com/repos/sgotti/rocket/hooks","issue_events_url":"https://api.github.com/repos/sgotti/rocket/issues/events{/number}","events_url":"https://api.github.com/repos/sgotti/rocket/events","assignees_url":"https://api.github.com/repos/sgotti/rocket/assignees{/user}","branches_url":"https://api.github.com/repos/sgotti/rocket/branches{/branch}","tags_url":"https://api.github.com/repos/sgotti/rocket/tags","blobs_url":"https://api.github.com/repos/sgotti/rocket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sgotti/rocket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sgotti/rocket/git/refs{/sha}","trees_url":"https://api.github.com/repos/sgotti/rocket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sgotti/rocket/statuses/{sha}","languages_url":"https://api.github.com/repos/sgotti/rocket/languages","stargazers_url":"https://api.github.com/repos/sgotti/rocket/stargazers","contributors_url":"https://api.github.com/repos/sgotti/rocket/contributors","subscribers_url":"https://api.github.com/repos/sgotti/rocket/subscribers","subscription_url":"https://api.github.com/repos/sgotti/rocket/subscription","commits_url":"https://api.github.com/repos/sgotti/rocket/commits{/sha}","git_commits_url":"https://api.github.com/repos/sgotti/rocket/git/commits{/sha}","comments_url":"https://api.github.com/repos/sgotti/rocket/comments{/number}","issue_comment_url":"https://api.github.com/repos/sgotti/rocket/issues/comments{/number}","contents_url":"https://api.github.com/repos/sgotti/rocket/contents/{+path}","compare_url":"https://api.github.com/repos/sgotti/rocket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sgotti/rocket/merges","archive_url":"https://api.github.com/repos/sgotti/rocket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sgotti/rocket/downloads","issues_url":"https://api.github.com/repos/sgotti/rocket/issues{/number}","pulls_url":"https://api.github.com/repos/sgotti/rocket/pulls{/number}","milestones_url":"https://api.github.com/repos/sgotti/rocket/milestones{/number}","notifications_url":"https://api.github.com/repos/sgotti/rocket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sgotti/rocket/labels{/name}","releases_url":"https://api.github.com/repos/sgotti/rocket/releases{/id}","created_at":"2014-12-02T10:56:31Z","updated_at":"2014-12-02T10:56:31Z","pushed_at":"2015-03-09T10:02:56Z","git_url":"git://github.com/sgotti/rocket.git","ssh_url":"git@github.com:sgotti/rocket.git","clone_url":"https://github.com/sgotti/rocket.git","svn_url":"https://github.com/sgotti/rocket","homepage":"","size":5706,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"bca88d0e07219e05c70022e3a4439188fe7bc3f9","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rocket","full_name":"coreos/rocket","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rocket","description":"App Container runtime","fork":false,"url":"https://api.github.com/repos/coreos/rocket","forks_url":"https://api.github.com/repos/coreos/rocket/forks","keys_url":"https://api.github.com/repos/coreos/rocket/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rocket/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rocket/teams","hooks_url":"https://api.github.com/repos/coreos/rocket/hooks","issue_events_url":"https://api.github.com/repos/coreos/rocket/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rocket/events","assignees_url":"https://api.github.com/repos/coreos/rocket/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rocket/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rocket/tags","blobs_url":"https://api.github.com/repos/coreos/rocket/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rocket/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rocket/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rocket/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rocket/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rocket/languages","stargazers_url":"https://api.github.com/repos/coreos/rocket/stargazers","contributors_url":"https://api.github.com/repos/coreos/rocket/contributors","subscribers_url":"https://api.github.com/repos/coreos/rocket/subscribers","subscription_url":"https://api.github.com/repos/coreos/rocket/subscription","commits_url":"https://api.github.com/repos/coreos/rocket/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rocket/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rocket/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rocket/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rocket/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rocket/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rocket/merges","archive_url":"https://api.github.com/repos/coreos/rocket/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rocket/downloads","issues_url":"https://api.github.com/repos/coreos/rocket/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rocket/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rocket/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rocket/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rocket/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rocket/releases{/id}","created_at":"2014-11-11T23:13:18Z","updated_at":"2015-03-09T11:15:39Z","pushed_at":"2015-03-09T11:15:39Z","git_url":"git://github.com/coreos/rocket.git","ssh_url":"git@github.com:coreos/rocket.git","clone_url":"https://github.com/coreos/rocket.git","svn_url":"https://github.com/coreos/rocket","homepage":"","size":10371,"stargazers_count":3558,"watchers_count":3558,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"open_issues_count":83,"forks":253,"open_issues":83,"watchers":3558,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rocket/pulls/569"},"html":{"href":"https://github.com/coreos/rocket/pull/569"},"issue":{"href":"https://api.github.com/repos/coreos/rocket/issues/569"},"comments":{"href":"https://api.github.com/repos/coreos/rocket/issues/569/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rocket/pulls/569/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rocket/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rocket/pulls/569/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rocket/statuses/803fe98b9379ab61140436ee6c62aefc012b6494"}}}}