{"action":"created","comment":{"url":"https://api.github.com/repos/spiffe/spire/pulls/comments/145182282","pull_request_review_id":69943120,"id":145182282,"diff_hunk":"@@ -242,14 +237,36 @@ func (a *Agent) bootstrap() error {\n \t\ta.baseSVIDKey = key\n \n \t\t// If we're here, we need to attest/Re-attest\n-\t\tregEntryMap, err := a.attest()\n+\t\tregEntries, err := a.attest()\n \t\tif err != nil {\n \t\t\treturn err\n \t\t}\n-\t\terr = a.FetchSVID(regEntryMap, a.BaseSVID, a.baseSVIDKey)\n-\t\tif err != nil {\n-\t\t\treturn err\n+\t\tserverId := url.URL{\n+\t\t\tScheme: \"spiffe\",\n+\t\t\tHost:   a.config.TrustDomain.Host,\n+\t\t\tPath:   path.Join(\"spiffe\", \"cp\"),\n \t\t}\n+\t\tcmgrConfig := &cache.MgrConfig{\n+\t\t\tServerCerts:    a.serverCerts,\n+\t\t\tServerSPIFFEID: serverId.String(),\n+\t\t\tServerAddr:     a.config.ServerAddress.String(),\n+\n+\t\t\tBaseSVID:       a.BaseSVID,\n+\t\t\tBaseSVIDKey:    a.baseSVIDKey,\n+\t\t\tBaseRegEntries: regEntries,\n+\t\t\tLogger:         a.config.Log}\n+\n+\t\ta.CacheMgr, err = cache.NewManager(a.ctx, cmgrConfig)\n+\n+\t\tgo a.CacheMgr.Init()","path":"pkg/agent/agent.go","position":131,"original_position":131,"commit_id":"4cf4253b8b882f5bb73e3580c7a1631cd5318656","original_commit_id":"46eece936fde8662480167ae459933573e27aae6","user":{"login":"evan2645","id":1944142,"avatar_url":"https://avatars1.githubusercontent.com/u/1944142?v=4","gravatar_id":"","url":"https://api.github.com/users/evan2645","html_url":"https://github.com/evan2645","followers_url":"https://api.github.com/users/evan2645/followers","following_url":"https://api.github.com/users/evan2645/following{/other_user}","gists_url":"https://api.github.com/users/evan2645/gists{/gist_id}","starred_url":"https://api.github.com/users/evan2645/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evan2645/subscriptions","organizations_url":"https://api.github.com/users/evan2645/orgs","repos_url":"https://api.github.com/users/evan2645/repos","events_url":"https://api.github.com/users/evan2645/events{/privacy}","received_events_url":"https://api.github.com/users/evan2645/received_events","type":"User","site_admin":false},"body":"Discussed offline implications related to https://github.com/golang/go/issues/20239\r\n\r\nSuggest `Init` call to return once the cache manager is running","created_at":"2017-10-17T16:23:55Z","updated_at":"2017-10-17T16:54:57Z","html_url":"https://github.com/spiffe/spire/pull/233#discussion_r145182282","pull_request_url":"https://api.github.com/repos/spiffe/spire/pulls/233","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/spiffe/spire/pulls/comments/145182282"},"html":{"href":"https://github.com/spiffe/spire/pull/233#discussion_r145182282"},"pull_request":{"href":"https://api.github.com/repos/spiffe/spire/pulls/233"}}},"pull_request":{"url":"https://api.github.com/repos/spiffe/spire/pulls/233","id":145809215,"html_url":"https://github.com/spiffe/spire/pull/233","diff_url":"https://github.com/spiffe/spire/pull/233.diff","patch_url":"https://github.com/spiffe/spire/pull/233.patch","issue_url":"https://api.github.com/repos/spiffe/spire/issues/233","number":233,"state":"open","locked":false,"title":"Agent cache manager","user":{"login":"walmav","id":23508970,"avatar_url":"https://avatars0.githubusercontent.com/u/23508970?v=4","gravatar_id":"","url":"https://api.github.com/users/walmav","html_url":"https://github.com/walmav","followers_url":"https://api.github.com/users/walmav/followers","following_url":"https://api.github.com/users/walmav/following{/other_user}","gists_url":"https://api.github.com/users/walmav/gists{/gist_id}","starred_url":"https://api.github.com/users/walmav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmav/subscriptions","organizations_url":"https://api.github.com/users/walmav/orgs","repos_url":"https://api.github.com/users/walmav/repos","events_url":"https://api.github.com/users/walmav/events{/privacy}","received_events_url":"https://api.github.com/users/walmav/received_events","type":"User","site_admin":false},"body":"agent cache manager:\r\nrenews expired SVID in cache\r\nupdates cache with new registration entry SVIDs\r\nchanged FetchSVID endpoint to use grpc streams\r\n\r\n#TODO Increase test coverage for cache manager(48.9%)\r\n\r\nfixes #233 ","created_at":"2017-10-10T21:44:12Z","updated_at":"2017-10-17T16:54:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1774c17cfb1fbb32284fc278a213e2b806152f57","assignee":null,"assignees":[],"requested_reviewers":[{"login":"y2bishop2y","id":545698,"avatar_url":"https://avatars0.githubusercontent.com/u/545698?v=4","gravatar_id":"","url":"https://api.github.com/users/y2bishop2y","html_url":"https://github.com/y2bishop2y","followers_url":"https://api.github.com/users/y2bishop2y/followers","following_url":"https://api.github.com/users/y2bishop2y/following{/other_user}","gists_url":"https://api.github.com/users/y2bishop2y/gists{/gist_id}","starred_url":"https://api.github.com/users/y2bishop2y/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y2bishop2y/subscriptions","organizations_url":"https://api.github.com/users/y2bishop2y/orgs","repos_url":"https://api.github.com/users/y2bishop2y/repos","events_url":"https://api.github.com/users/y2bishop2y/events{/privacy}","received_events_url":"https://api.github.com/users/y2bishop2y/received_events","type":"User","site_admin":false},{"login":"drrt","id":1514178,"avatar_url":"https://avatars3.githubusercontent.com/u/1514178?v=4","gravatar_id":"","url":"https://api.github.com/users/drrt","html_url":"https://github.com/drrt","followers_url":"https://api.github.com/users/drrt/followers","following_url":"https://api.github.com/users/drrt/following{/other_user}","gists_url":"https://api.github.com/users/drrt/gists{/gist_id}","starred_url":"https://api.github.com/users/drrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drrt/subscriptions","organizations_url":"https://api.github.com/users/drrt/orgs","repos_url":"https://api.github.com/users/drrt/repos","events_url":"https://api.github.com/users/drrt/events{/privacy}","received_events_url":"https://api.github.com/users/drrt/received_events","type":"User","site_admin":false},{"login":"paul-argeniss","id":26967352,"avatar_url":"https://avatars3.githubusercontent.com/u/26967352?v=4","gravatar_id":"","url":"https://api.github.com/users/paul-argeniss","html_url":"https://github.com/paul-argeniss","followers_url":"https://api.github.com/users/paul-argeniss/followers","following_url":"https://api.github.com/users/paul-argeniss/following{/other_user}","gists_url":"https://api.github.com/users/paul-argeniss/gists{/gist_id}","starred_url":"https://api.github.com/users/paul-argeniss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paul-argeniss/subscriptions","organizations_url":"https://api.github.com/users/paul-argeniss/orgs","repos_url":"https://api.github.com/users/paul-argeniss/repos","events_url":"https://api.github.com/users/paul-argeniss/events{/privacy}","received_events_url":"https://api.github.com/users/paul-argeniss/received_events","type":"User","site_admin":false},{"login":"amartinezfayo","id":26970586,"avatar_url":"https://avatars1.githubusercontent.com/u/26970586?v=4","gravatar_id":"","url":"https://api.github.com/users/amartinezfayo","html_url":"https://github.com/amartinezfayo","followers_url":"https://api.github.com/users/amartinezfayo/followers","following_url":"https://api.github.com/users/amartinezfayo/following{/other_user}","gists_url":"https://api.github.com/users/amartinezfayo/gists{/gist_id}","starred_url":"https://api.github.com/users/amartinezfayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amartinezfayo/subscriptions","organizations_url":"https://api.github.com/users/amartinezfayo/orgs","repos_url":"https://api.github.com/users/amartinezfayo/repos","events_url":"https://api.github.com/users/amartinezfayo/events{/privacy}","received_events_url":"https://api.github.com/users/amartinezfayo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spiffe/spire/pulls/233/commits","review_comments_url":"https://api.github.com/repos/spiffe/spire/pulls/233/comments","review_comment_url":"https://api.github.com/repos/spiffe/spire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spiffe/spire/issues/233/comments","statuses_url":"https://api.github.com/repos/spiffe/spire/statuses/4cf4253b8b882f5bb73e3580c7a1631cd5318656","head":{"label":"walmav:agent_cache_manager","ref":"agent_cache_manager","sha":"4cf4253b8b882f5bb73e3580c7a1631cd5318656","user":{"login":"walmav","id":23508970,"avatar_url":"https://avatars0.githubusercontent.com/u/23508970?v=4","gravatar_id":"","url":"https://api.github.com/users/walmav","html_url":"https://github.com/walmav","followers_url":"https://api.github.com/users/walmav/followers","following_url":"https://api.github.com/users/walmav/following{/other_user}","gists_url":"https://api.github.com/users/walmav/gists{/gist_id}","starred_url":"https://api.github.com/users/walmav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmav/subscriptions","organizations_url":"https://api.github.com/users/walmav/orgs","repos_url":"https://api.github.com/users/walmav/repos","events_url":"https://api.github.com/users/walmav/events{/privacy}","received_events_url":"https://api.github.com/users/walmav/received_events","type":"User","site_admin":false},"repo":{"id":106473758,"name":"spire","full_name":"walmav/spire","owner":{"login":"walmav","id":23508970,"avatar_url":"https://avatars0.githubusercontent.com/u/23508970?v=4","gravatar_id":"","url":"https://api.github.com/users/walmav","html_url":"https://github.com/walmav","followers_url":"https://api.github.com/users/walmav/followers","following_url":"https://api.github.com/users/walmav/following{/other_user}","gists_url":"https://api.github.com/users/walmav/gists{/gist_id}","starred_url":"https://api.github.com/users/walmav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walmav/subscriptions","organizations_url":"https://api.github.com/users/walmav/orgs","repos_url":"https://api.github.com/users/walmav/repos","events_url":"https://api.github.com/users/walmav/events{/privacy}","received_events_url":"https://api.github.com/users/walmav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/walmav/spire","description":"The SPIFFE Runtime Environment","fork":true,"url":"https://api.github.com/repos/walmav/spire","forks_url":"https://api.github.com/repos/walmav/spire/forks","keys_url":"https://api.github.com/repos/walmav/spire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/walmav/spire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/walmav/spire/teams","hooks_url":"https://api.github.com/repos/walmav/spire/hooks","issue_events_url":"https://api.github.com/repos/walmav/spire/issues/events{/number}","events_url":"https://api.github.com/repos/walmav/spire/events","assignees_url":"https://api.github.com/repos/walmav/spire/assignees{/user}","branches_url":"https://api.github.com/repos/walmav/spire/branches{/branch}","tags_url":"https://api.github.com/repos/walmav/spire/tags","blobs_url":"https://api.github.com/repos/walmav/spire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/walmav/spire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/walmav/spire/git/refs{/sha}","trees_url":"https://api.github.com/repos/walmav/spire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/walmav/spire/statuses/{sha}","languages_url":"https://api.github.com/repos/walmav/spire/languages","stargazers_url":"https://api.github.com/repos/walmav/spire/stargazers","contributors_url":"https://api.github.com/repos/walmav/spire/contributors","subscribers_url":"https://api.github.com/repos/walmav/spire/subscribers","subscription_url":"https://api.github.com/repos/walmav/spire/subscription","commits_url":"https://api.github.com/repos/walmav/spire/commits{/sha}","git_commits_url":"https://api.github.com/repos/walmav/spire/git/commits{/sha}","comments_url":"https://api.github.com/repos/walmav/spire/comments{/number}","issue_comment_url":"https://api.github.com/repos/walmav/spire/issues/comments{/number}","contents_url":"https://api.github.com/repos/walmav/spire/contents/{+path}","compare_url":"https://api.github.com/repos/walmav/spire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/walmav/spire/merges","archive_url":"https://api.github.com/repos/walmav/spire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/walmav/spire/downloads","issues_url":"https://api.github.com/repos/walmav/spire/issues{/number}","pulls_url":"https://api.github.com/repos/walmav/spire/pulls{/number}","milestones_url":"https://api.github.com/repos/walmav/spire/milestones{/number}","notifications_url":"https://api.github.com/repos/walmav/spire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/walmav/spire/labels{/name}","releases_url":"https://api.github.com/repos/walmav/spire/releases{/id}","deployments_url":"https://api.github.com/repos/walmav/spire/deployments","created_at":"2017-10-10T21:32:46Z","updated_at":"2017-10-10T21:32:47Z","pushed_at":"2017-10-17T16:50:16Z","git_url":"git://github.com/walmav/spire.git","ssh_url":"git@github.com:walmav/spire.git","clone_url":"https://github.com/walmav/spire.git","svn_url":"https://github.com/walmav/spire","homepage":"https://spiffe.io","size":1563,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"spiffe:master","ref":"master","sha":"438c7e5b6077bafbc62e84ac762ee7fa28a9e5db","user":{"login":"spiffe","id":19497462,"avatar_url":"https://avatars0.githubusercontent.com/u/19497462?v=4","gravatar_id":"","url":"https://api.github.com/users/spiffe","html_url":"https://github.com/spiffe","followers_url":"https://api.github.com/users/spiffe/followers","following_url":"https://api.github.com/users/spiffe/following{/other_user}","gists_url":"https://api.github.com/users/spiffe/gists{/gist_id}","starred_url":"https://api.github.com/users/spiffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiffe/subscriptions","organizations_url":"https://api.github.com/users/spiffe/orgs","repos_url":"https://api.github.com/users/spiffe/repos","events_url":"https://api.github.com/users/spiffe/events{/privacy}","received_events_url":"https://api.github.com/users/spiffe/received_events","type":"Organization","site_admin":false},"repo":{"id":100061496,"name":"spire","full_name":"spiffe/spire","owner":{"login":"spiffe","id":19497462,"avatar_url":"https://avatars0.githubusercontent.com/u/19497462?v=4","gravatar_id":"","url":"https://api.github.com/users/spiffe","html_url":"https://github.com/spiffe","followers_url":"https://api.github.com/users/spiffe/followers","following_url":"https://api.github.com/users/spiffe/following{/other_user}","gists_url":"https://api.github.com/users/spiffe/gists{/gist_id}","starred_url":"https://api.github.com/users/spiffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spiffe/subscriptions","organizations_url":"https://api.github.com/users/spiffe/orgs","repos_url":"https://api.github.com/users/spiffe/repos","events_url":"https://api.github.com/users/spiffe/events{/privacy}","received_events_url":"https://api.github.com/users/spiffe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spiffe/spire","description":"The SPIFFE Runtime Environment","fork":false,"url":"https://api.github.com/repos/spiffe/spire","forks_url":"https://api.github.com/repos/spiffe/spire/forks","keys_url":"https://api.github.com/repos/spiffe/spire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spiffe/spire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spiffe/spire/teams","hooks_url":"https://api.github.com/repos/spiffe/spire/hooks","issue_events_url":"https://api.github.com/repos/spiffe/spire/issues/events{/number}","events_url":"https://api.github.com/repos/spiffe/spire/events","assignees_url":"https://api.github.com/repos/spiffe/spire/assignees{/user}","branches_url":"https://api.github.com/repos/spiffe/spire/branches{/branch}","tags_url":"https://api.github.com/repos/spiffe/spire/tags","blobs_url":"https://api.github.com/repos/spiffe/spire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spiffe/spire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spiffe/spire/git/refs{/sha}","trees_url":"https://api.github.com/repos/spiffe/spire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spiffe/spire/statuses/{sha}","languages_url":"https://api.github.com/repos/spiffe/spire/languages","stargazers_url":"https://api.github.com/repos/spiffe/spire/stargazers","contributors_url":"https://api.github.com/repos/spiffe/spire/contributors","subscribers_url":"https://api.github.com/repos/spiffe/spire/subscribers","subscription_url":"https://api.github.com/repos/spiffe/spire/subscription","commits_url":"https://api.github.com/repos/spiffe/spire/commits{/sha}","git_commits_url":"https://api.github.com/repos/spiffe/spire/git/commits{/sha}","comments_url":"https://api.github.com/repos/spiffe/spire/comments{/number}","issue_comment_url":"https://api.github.com/repos/spiffe/spire/issues/comments{/number}","contents_url":"https://api.github.com/repos/spiffe/spire/contents/{+path}","compare_url":"https://api.github.com/repos/spiffe/spire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spiffe/spire/merges","archive_url":"https://api.github.com/repos/spiffe/spire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spiffe/spire/downloads","issues_url":"https://api.github.com/repos/spiffe/spire/issues{/number}","pulls_url":"https://api.github.com/repos/spiffe/spire/pulls{/number}","milestones_url":"https://api.github.com/repos/spiffe/spire/milestones{/number}","notifications_url":"https://api.github.com/repos/spiffe/spire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spiffe/spire/labels{/name}","releases_url":"https://api.github.com/repos/spiffe/spire/releases{/id}","deployments_url":"https://api.github.com/repos/spiffe/spire/deployments","created_at":"2017-08-11T18:46:51Z","updated_at":"2017-10-15T13:28:57Z","pushed_at":"2017-10-17T16:50:18Z","git_url":"git://github.com/spiffe/spire.git","ssh_url":"git@github.com:spiffe/spire.git","clone_url":"https://github.com/spiffe/spire.git","svn_url":"https://github.com/spiffe/spire","homepage":"https://spiffe.io","size":1571,"stargazers_count":47,"watchers_count":47,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":45,"forks":8,"open_issues":45,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spiffe/spire/pulls/233"},"html":{"href":"https://github.com/spiffe/spire/pull/233"},"issue":{"href":"https://api.github.com/repos/spiffe/spire/issues/233"},"comments":{"href":"https://api.github.com/repos/spiffe/spire/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/spiffe/spire/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/spiffe/spire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spiffe/spire/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/spiffe/spire/statuses/4cf4253b8b882f5bb73e3580c7a1631cd5318656"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"evan2645"}}