{"action":"created","comment":{"url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/comments/223611565","pull_request_review_id":162778090,"id":223611565,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzYxMTU2NQ==","diff_hunk":"@@ -89,25 +90,23 @@ func (p *Proxy) get(name, namespace string) (*release.Release, error) {\n \t\thelm.ReleaseListFilter(name),\n \t\thelm.ReleaseListNamespace(namespace),\n \t\thelm.ReleaseListStatuses(allReleaseStatuses),\n+\t\t// Get just the latest release\n+\t\thelm.ReleaseListLimit(1),\n+\t\thelm.ReleaseListSort(int32(services.ListSort_LAST_RELEASED)),\n+\t\thelm.ReleaseListOrder(int32(services.ListSort_DESC)),\n \t)\n \tif err != nil {\n \t\treturn nil, fmt.Errorf(\"Unable to list helm releases: %v\", err)\n \t}\n-\tvar rel *release.Release\n \tif list != nil {\n \t\tif l := list.GetReleases(); l != nil {\n-\t\t\tfor _, r := range l {\n-\t\t\t\tif (namespace == \"\" || namespace == r.Namespace) && r.Name == name {\n-\t\t\t\t\trel = r\n-\t\t\t\t\tbreak\n-\t\t\t\t}\n+\t\t\tr := l[0]\n+\t\t\tif (namespace == \"\" || namespace == r.Namespace) && r.Name == name {","path":"pkg/proxy/proxy.go","position":29,"original_position":29,"commit_id":"411976065bd87bd2aa997b681568685b15f8bb93","original_commit_id":"411976065bd87bd2aa997b681568685b15f8bb93","user":{"login":"andresmgot","id":4025665,"node_id":"MDQ6VXNlcjQwMjU2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/4025665?v=4","gravatar_id":"","url":"https://api.github.com/users/andresmgot","html_url":"https://github.com/andresmgot","followers_url":"https://api.github.com/users/andresmgot/followers","following_url":"https://api.github.com/users/andresmgot/following{/other_user}","gists_url":"https://api.github.com/users/andresmgot/gists{/gist_id}","starred_url":"https://api.github.com/users/andresmgot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresmgot/subscriptions","organizations_url":"https://api.github.com/users/andresmgot/orgs","repos_url":"https://api.github.com/users/andresmgot/repos","events_url":"https://api.github.com/users/andresmgot/events{/privacy}","received_events_url":"https://api.github.com/users/andresmgot/received_events","type":"User","site_admin":false},"body":"the problem is that some unit tests rely in that logic (to double filter the results) but that should not be necessary.","created_at":"2018-10-09T08:53:02Z","updated_at":"2018-10-09T08:53:02Z","html_url":"https://github.com/kubeapps/kubeapps/pull/708#discussion_r223611565","pull_request_url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/comments/223611565"},"html":{"href":"https://github.com/kubeapps/kubeapps/pull/708#discussion_r223611565"},"pull_request":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708"}},"in_reply_to_id":223451219},"pull_request":{"url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708","id":221145952,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTQ1OTUy","html_url":"https://github.com/kubeapps/kubeapps/pull/708","diff_url":"https://github.com/kubeapps/kubeapps/pull/708.diff","patch_url":"https://github.com/kubeapps/kubeapps/pull/708.patch","issue_url":"https://api.github.com/repos/kubeapps/kubeapps/issues/708","number":708,"state":"open","locked":false,"title":"Fix get to retrieve the latest release","user":{"login":"andresmgot","id":4025665,"node_id":"MDQ6VXNlcjQwMjU2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/4025665?v=4","gravatar_id":"","url":"https://api.github.com/users/andresmgot","html_url":"https://github.com/andresmgot","followers_url":"https://api.github.com/users/andresmgot/followers","following_url":"https://api.github.com/users/andresmgot/following{/other_user}","gists_url":"https://api.github.com/users/andresmgot/gists{/gist_id}","starred_url":"https://api.github.com/users/andresmgot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresmgot/subscriptions","organizations_url":"https://api.github.com/users/andresmgot/orgs","repos_url":"https://api.github.com/users/andresmgot/repos","events_url":"https://api.github.com/users/andresmgot/events{/privacy}","received_events_url":"https://api.github.com/users/andresmgot/received_events","type":"User","site_admin":false},"body":"Fixes #704\r\n\r\nWhen getting a release, tell tiller to:\r\n - Order them by date\r\n - In descendent order\r\n - Return only one\r\n\r\nThat's the release we return to the user. This way we avoid returning an old release.\r\n\r\nSince this is just adding new options to the Helm request we cannot unit-test it. This is because the fake helm client doesn't have into account the given options. I checked that the issue is resolved manually in a cluster with the situation described in #704.\r\n","created_at":"2018-10-08T14:51:20Z","updated_at":"2018-10-09T08:53:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bbb4d151d01c3eb3eddcee92f885a97af1b864d5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708/commits","review_comments_url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708/comments","review_comment_url":"https://api.github.com/repos/kubeapps/kubeapps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubeapps/kubeapps/issues/708/comments","statuses_url":"https://api.github.com/repos/kubeapps/kubeapps/statuses/411976065bd87bd2aa997b681568685b15f8bb93","head":{"label":"andresmgot:getListOrder","ref":"getListOrder","sha":"411976065bd87bd2aa997b681568685b15f8bb93","user":{"login":"andresmgot","id":4025665,"node_id":"MDQ6VXNlcjQwMjU2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/4025665?v=4","gravatar_id":"","url":"https://api.github.com/users/andresmgot","html_url":"https://github.com/andresmgot","followers_url":"https://api.github.com/users/andresmgot/followers","following_url":"https://api.github.com/users/andresmgot/following{/other_user}","gists_url":"https://api.github.com/users/andresmgot/gists{/gist_id}","starred_url":"https://api.github.com/users/andresmgot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresmgot/subscriptions","organizations_url":"https://api.github.com/users/andresmgot/orgs","repos_url":"https://api.github.com/users/andresmgot/repos","events_url":"https://api.github.com/users/andresmgot/events{/privacy}","received_events_url":"https://api.github.com/users/andresmgot/received_events","type":"User","site_admin":false},"repo":{"id":111571118,"node_id":"MDEwOlJlcG9zaXRvcnkxMTE1NzExMTg=","name":"installer","full_name":"andresmgot/installer","private":false,"owner":{"login":"andresmgot","id":4025665,"node_id":"MDQ6VXNlcjQwMjU2NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/4025665?v=4","gravatar_id":"","url":"https://api.github.com/users/andresmgot","html_url":"https://github.com/andresmgot","followers_url":"https://api.github.com/users/andresmgot/followers","following_url":"https://api.github.com/users/andresmgot/following{/other_user}","gists_url":"https://api.github.com/users/andresmgot/gists{/gist_id}","starred_url":"https://api.github.com/users/andresmgot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresmgot/subscriptions","organizations_url":"https://api.github.com/users/andresmgot/orgs","repos_url":"https://api.github.com/users/andresmgot/repos","events_url":"https://api.github.com/users/andresmgot/events{/privacy}","received_events_url":"https://api.github.com/users/andresmgot/received_events","type":"User","site_admin":false},"html_url":"https://github.com/andresmgot/installer","description":null,"fork":true,"url":"https://api.github.com/repos/andresmgot/installer","forks_url":"https://api.github.com/repos/andresmgot/installer/forks","keys_url":"https://api.github.com/repos/andresmgot/installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andresmgot/installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andresmgot/installer/teams","hooks_url":"https://api.github.com/repos/andresmgot/installer/hooks","issue_events_url":"https://api.github.com/repos/andresmgot/installer/issues/events{/number}","events_url":"https://api.github.com/repos/andresmgot/installer/events","assignees_url":"https://api.github.com/repos/andresmgot/installer/assignees{/user}","branches_url":"https://api.github.com/repos/andresmgot/installer/branches{/branch}","tags_url":"https://api.github.com/repos/andresmgot/installer/tags","blobs_url":"https://api.github.com/repos/andresmgot/installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andresmgot/installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andresmgot/installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/andresmgot/installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andresmgot/installer/statuses/{sha}","languages_url":"https://api.github.com/repos/andresmgot/installer/languages","stargazers_url":"https://api.github.com/repos/andresmgot/installer/stargazers","contributors_url":"https://api.github.com/repos/andresmgot/installer/contributors","subscribers_url":"https://api.github.com/repos/andresmgot/installer/subscribers","subscription_url":"https://api.github.com/repos/andresmgot/installer/subscription","commits_url":"https://api.github.com/repos/andresmgot/installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/andresmgot/installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/andresmgot/installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/andresmgot/installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/andresmgot/installer/contents/{+path}","compare_url":"https://api.github.com/repos/andresmgot/installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andresmgot/installer/merges","archive_url":"https://api.github.com/repos/andresmgot/installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andresmgot/installer/downloads","issues_url":"https://api.github.com/repos/andresmgot/installer/issues{/number}","pulls_url":"https://api.github.com/repos/andresmgot/installer/pulls{/number}","milestones_url":"https://api.github.com/repos/andresmgot/installer/milestones{/number}","notifications_url":"https://api.github.com/repos/andresmgot/installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andresmgot/installer/labels{/name}","releases_url":"https://api.github.com/repos/andresmgot/installer/releases{/id}","deployments_url":"https://api.github.com/repos/andresmgot/installer/deployments","created_at":"2017-11-21T16:04:30Z","updated_at":"2017-11-21T16:04:32Z","pushed_at":"2018-10-08T17:10:54Z","git_url":"git://github.com/andresmgot/installer.git","ssh_url":"git@github.com:andresmgot/installer.git","clone_url":"https://github.com/andresmgot/installer.git","svn_url":"https://github.com/andresmgot/installer","homepage":null,"size":38584,"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,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubeapps:master","ref":"master","sha":"c6bccdf4dbec2a112e9b991fa292cd2f323efdfb","user":{"login":"kubeapps","id":32396354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMzk2MzU0","avatar_url":"https://avatars0.githubusercontent.com/u/32396354?v=4","gravatar_id":"","url":"https://api.github.com/users/kubeapps","html_url":"https://github.com/kubeapps","followers_url":"https://api.github.com/users/kubeapps/followers","following_url":"https://api.github.com/users/kubeapps/following{/other_user}","gists_url":"https://api.github.com/users/kubeapps/gists{/gist_id}","starred_url":"https://api.github.com/users/kubeapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubeapps/subscriptions","organizations_url":"https://api.github.com/users/kubeapps/orgs","repos_url":"https://api.github.com/users/kubeapps/repos","events_url":"https://api.github.com/users/kubeapps/events{/privacy}","received_events_url":"https://api.github.com/users/kubeapps/received_events","type":"Organization","site_admin":false},"repo":{"id":107555654,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc1NTU2NTQ=","name":"kubeapps","full_name":"kubeapps/kubeapps","private":false,"owner":{"login":"kubeapps","id":32396354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMzk2MzU0","avatar_url":"https://avatars0.githubusercontent.com/u/32396354?v=4","gravatar_id":"","url":"https://api.github.com/users/kubeapps","html_url":"https://github.com/kubeapps","followers_url":"https://api.github.com/users/kubeapps/followers","following_url":"https://api.github.com/users/kubeapps/following{/other_user}","gists_url":"https://api.github.com/users/kubeapps/gists{/gist_id}","starred_url":"https://api.github.com/users/kubeapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubeapps/subscriptions","organizations_url":"https://api.github.com/users/kubeapps/orgs","repos_url":"https://api.github.com/users/kubeapps/repos","events_url":"https://api.github.com/users/kubeapps/events{/privacy}","received_events_url":"https://api.github.com/users/kubeapps/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/kubeapps/kubeapps","description":"A web-based UI for deploying and managing applications in Kubernetes clusters","fork":false,"url":"https://api.github.com/repos/kubeapps/kubeapps","forks_url":"https://api.github.com/repos/kubeapps/kubeapps/forks","keys_url":"https://api.github.com/repos/kubeapps/kubeapps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubeapps/kubeapps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubeapps/kubeapps/teams","hooks_url":"https://api.github.com/repos/kubeapps/kubeapps/hooks","issue_events_url":"https://api.github.com/repos/kubeapps/kubeapps/issues/events{/number}","events_url":"https://api.github.com/repos/kubeapps/kubeapps/events","assignees_url":"https://api.github.com/repos/kubeapps/kubeapps/assignees{/user}","branches_url":"https://api.github.com/repos/kubeapps/kubeapps/branches{/branch}","tags_url":"https://api.github.com/repos/kubeapps/kubeapps/tags","blobs_url":"https://api.github.com/repos/kubeapps/kubeapps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubeapps/kubeapps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubeapps/kubeapps/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubeapps/kubeapps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubeapps/kubeapps/statuses/{sha}","languages_url":"https://api.github.com/repos/kubeapps/kubeapps/languages","stargazers_url":"https://api.github.com/repos/kubeapps/kubeapps/stargazers","contributors_url":"https://api.github.com/repos/kubeapps/kubeapps/contributors","subscribers_url":"https://api.github.com/repos/kubeapps/kubeapps/subscribers","subscription_url":"https://api.github.com/repos/kubeapps/kubeapps/subscription","commits_url":"https://api.github.com/repos/kubeapps/kubeapps/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubeapps/kubeapps/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubeapps/kubeapps/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubeapps/kubeapps/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubeapps/kubeapps/contents/{+path}","compare_url":"https://api.github.com/repos/kubeapps/kubeapps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubeapps/kubeapps/merges","archive_url":"https://api.github.com/repos/kubeapps/kubeapps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubeapps/kubeapps/downloads","issues_url":"https://api.github.com/repos/kubeapps/kubeapps/issues{/number}","pulls_url":"https://api.github.com/repos/kubeapps/kubeapps/pulls{/number}","milestones_url":"https://api.github.com/repos/kubeapps/kubeapps/milestones{/number}","notifications_url":"https://api.github.com/repos/kubeapps/kubeapps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubeapps/kubeapps/labels{/name}","releases_url":"https://api.github.com/repos/kubeapps/kubeapps/releases{/id}","deployments_url":"https://api.github.com/repos/kubeapps/kubeapps/deployments","created_at":"2017-10-19T14:14:34Z","updated_at":"2018-10-09T08:25:25Z","pushed_at":"2018-10-09T08:25:22Z","git_url":"git://github.com/kubeapps/kubeapps.git","ssh_url":"git@github.com:kubeapps/kubeapps.git","clone_url":"https://github.com/kubeapps/kubeapps.git","svn_url":"https://github.com/kubeapps/kubeapps","homepage":"https://kubeapps.com","size":38365,"stargazers_count":561,"watchers_count":561,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"archived":false,"open_issues_count":89,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":99,"open_issues":89,"watchers":561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708"},"html":{"href":"https://github.com/kubeapps/kubeapps/pull/708"},"issue":{"href":"https://api.github.com/repos/kubeapps/kubeapps/issues/708"},"comments":{"href":"https://api.github.com/repos/kubeapps/kubeapps/issues/708/comments"},"review_comments":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708/comments"},"review_comment":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubeapps/kubeapps/pulls/708/commits"},"statuses":{"href":"https://api.github.com/repos/kubeapps/kubeapps/statuses/411976065bd87bd2aa997b681568685b15f8bb93"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andresmgot"}}