{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments/166635542","pull_request_review_id":94729450,"id":166635542,"diff_hunk":"@@ -99,6 +102,27 @@ angular.module(\"openshiftConsole\")\n     };\n \n \n+    var hasV2HPAAnnotations = function(hpaResources) {\n+      return _.some(hpaResources, function(hpa) {\n+        return JSON.parse(annotation(hpa, 'autoscaling.alpha.kubernetes.io/metrics'));\n+      });\n+    };\n+\n+\n+    var hasV2HPAScalerWarning = function(scaleTarget, hpaResources) {\n+      var containers = _.get(scaleTarget, 'spec.template.spec.containers', []);\n+      var hasRequest = hasCPURequest(containers);","path":"app/scripts/services/hpa.js","position":23,"original_position":23,"commit_id":"68c1057160d09a33aedf93dae76e951f3ef93153","original_commit_id":"68c1057160d09a33aedf93dae76e951f3ef93153","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"body":"Well, via the [trello card description](https://trello.com/c/EuQHe0LT) I was under the impression that we are drawing a line between `cpuRequest` and `metrics` for how we show this warning. ","created_at":"2018-02-07T14:37:41Z","updated_at":"2018-02-07T14:37:41Z","html_url":"https://github.com/openshift/origin-web-console/pull/2708#discussion_r166635542","pull_request_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments/166635542"},"html":{"href":"https://github.com/openshift/origin-web-console/pull/2708#discussion_r166635542"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708"}},"in_reply_to_id":166610468},"pull_request":{"url":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708","id":164718646,"html_url":"https://github.com/openshift/origin-web-console/pull/2708","diff_url":"https://github.com/openshift/origin-web-console/pull/2708.diff","patch_url":"https://github.com/openshift/origin-web-console/pull/2708.patch","issue_url":"https://api.github.com/repos/openshift/origin-web-console/issues/2708","number":2708,"state":"open","locked":false,"title":"hpa v2beta1 api warning on DC & edit autoscaler pages","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"body":"This PR depends on [common 285](https://github.com/openshift/origin-web-common/pull/285).\r\n\r\n[WIP] notes:\r\n\r\n`bower link origin-web-common` with the above PR or the tests will fail. \r\n\r\nOn the DC page:\r\n\r\n![screen shot 2018-01-23 at 6 21 58 pm](https://user-images.githubusercontent.com/280512/35306332-132de372-006b-11e8-8552-ee94bd4673a2.png)\r\n\r\n- probably only want to show the v2beta1 message, will hide the other\r\n\r\nOn the edit autoscaler page:\r\n\r\n![screen shot 2018-01-23 at 6 25 12 pm](https://user-images.githubusercontent.com/280512/35306333-1337b924-006b-11e8-9cc7-3abacf3a6e91.png)\r\n\r\n- shows a message w/a link to CLI\r\n- hides the CPU request input as editing this is probably not what the user wants to do\r\n\r\nTODO (perhaps follow-on PR):\r\n\r\n- Update the warning message to show the user the data from the `metrics` annotation so they can easily see what the autoscaler is using to scale the resource.\r\n\r\n\r\n","created_at":"2018-01-23T23:30:45Z","updated_at":"2018-02-07T14:37:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe500a8a806bad4f90ef7f3f2bbd00360763370f","assignee":{"login":"spadgett","id":1167259,"avatar_url":"https://avatars1.githubusercontent.com/u/1167259?v=4","gravatar_id":"","url":"https://api.github.com/users/spadgett","html_url":"https://github.com/spadgett","followers_url":"https://api.github.com/users/spadgett/followers","following_url":"https://api.github.com/users/spadgett/following{/other_user}","gists_url":"https://api.github.com/users/spadgett/gists{/gist_id}","starred_url":"https://api.github.com/users/spadgett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadgett/subscriptions","organizations_url":"https://api.github.com/users/spadgett/orgs","repos_url":"https://api.github.com/users/spadgett/repos","events_url":"https://api.github.com/users/spadgett/events{/privacy}","received_events_url":"https://api.github.com/users/spadgett/received_events","type":"User","site_admin":false},"assignees":[{"login":"spadgett","id":1167259,"avatar_url":"https://avatars1.githubusercontent.com/u/1167259?v=4","gravatar_id":"","url":"https://api.github.com/users/spadgett","html_url":"https://github.com/spadgett","followers_url":"https://api.github.com/users/spadgett/followers","following_url":"https://api.github.com/users/spadgett/following{/other_user}","gists_url":"https://api.github.com/users/spadgett/gists{/gist_id}","starred_url":"https://api.github.com/users/spadgett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spadgett/subscriptions","organizations_url":"https://api.github.com/users/spadgett/orgs","repos_url":"https://api.github.com/users/spadgett/repos","events_url":"https://api.github.com/users/spadgett/events{/privacy}","received_events_url":"https://api.github.com/users/spadgett/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"jwforres","id":1467629,"avatar_url":"https://avatars2.githubusercontent.com/u/1467629?v=4","gravatar_id":"","url":"https://api.github.com/users/jwforres","html_url":"https://github.com/jwforres","followers_url":"https://api.github.com/users/jwforres/followers","following_url":"https://api.github.com/users/jwforres/following{/other_user}","gists_url":"https://api.github.com/users/jwforres/gists{/gist_id}","starred_url":"https://api.github.com/users/jwforres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwforres/subscriptions","organizations_url":"https://api.github.com/users/jwforres/orgs","repos_url":"https://api.github.com/users/jwforres/repos","events_url":"https://api.github.com/users/jwforres/events{/privacy}","received_events_url":"https://api.github.com/users/jwforres/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708/commits","review_comments_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708/comments","review_comment_url":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin-web-console/issues/2708/comments","statuses_url":"https://api.github.com/repos/openshift/origin-web-console/statuses/68c1057160d09a33aedf93dae76e951f3ef93153","head":{"label":"benjaminapetersen:trello/hpa/v2beta1/new-api-warning","ref":"trello/hpa/v2beta1/new-api-warning","sha":"68c1057160d09a33aedf93dae76e951f3ef93153","user":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"repo":{"id":58689425,"name":"origin-web-console","full_name":"benjaminapetersen/origin-web-console","owner":{"login":"benjaminapetersen","id":280512,"avatar_url":"https://avatars0.githubusercontent.com/u/280512?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminapetersen","html_url":"https://github.com/benjaminapetersen","followers_url":"https://api.github.com/users/benjaminapetersen/followers","following_url":"https://api.github.com/users/benjaminapetersen/following{/other_user}","gists_url":"https://api.github.com/users/benjaminapetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminapetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminapetersen/subscriptions","organizations_url":"https://api.github.com/users/benjaminapetersen/orgs","repos_url":"https://api.github.com/users/benjaminapetersen/repos","events_url":"https://api.github.com/users/benjaminapetersen/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminapetersen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjaminapetersen/origin-web-console","description":null,"fork":true,"url":"https://api.github.com/repos/benjaminapetersen/origin-web-console","forks_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/forks","keys_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/teams","hooks_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/hooks","issue_events_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/issues/events{/number}","events_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/events","assignees_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/assignees{/user}","branches_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/branches{/branch}","tags_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/tags","blobs_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/statuses/{sha}","languages_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/languages","stargazers_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/stargazers","contributors_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/contributors","subscribers_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/subscribers","subscription_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/subscription","commits_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/contents/{+path}","compare_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/merges","archive_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/downloads","issues_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/issues{/number}","pulls_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/pulls{/number}","milestones_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/milestones{/number}","notifications_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/labels{/name}","releases_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/releases{/id}","deployments_url":"https://api.github.com/repos/benjaminapetersen/origin-web-console/deployments","created_at":"2016-05-13T01:31:58Z","updated_at":"2016-11-28T19:16:36Z","pushed_at":"2018-02-07T01:30:17Z","git_url":"git://github.com/benjaminapetersen/origin-web-console.git","ssh_url":"git@github.com:benjaminapetersen/origin-web-console.git","clone_url":"https://github.com/benjaminapetersen/origin-web-console.git","svn_url":"https://github.com/benjaminapetersen/origin-web-console","homepage":null,"size":67194,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"183420ddd8d56ab574776f917df67793675607d4","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":58488264,"name":"origin-web-console","full_name":"openshift/origin-web-console","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin-web-console","description":null,"fork":false,"url":"https://api.github.com/repos/openshift/origin-web-console","forks_url":"https://api.github.com/repos/openshift/origin-web-console/forks","keys_url":"https://api.github.com/repos/openshift/origin-web-console/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin-web-console/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin-web-console/teams","hooks_url":"https://api.github.com/repos/openshift/origin-web-console/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin-web-console/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin-web-console/events","assignees_url":"https://api.github.com/repos/openshift/origin-web-console/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin-web-console/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin-web-console/tags","blobs_url":"https://api.github.com/repos/openshift/origin-web-console/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin-web-console/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin-web-console/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin-web-console/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin-web-console/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin-web-console/languages","stargazers_url":"https://api.github.com/repos/openshift/origin-web-console/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin-web-console/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin-web-console/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin-web-console/subscription","commits_url":"https://api.github.com/repos/openshift/origin-web-console/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin-web-console/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin-web-console/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin-web-console/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin-web-console/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin-web-console/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin-web-console/merges","archive_url":"https://api.github.com/repos/openshift/origin-web-console/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin-web-console/downloads","issues_url":"https://api.github.com/repos/openshift/origin-web-console/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin-web-console/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin-web-console/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin-web-console/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin-web-console/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin-web-console/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin-web-console/deployments","created_at":"2016-05-10T19:31:50Z","updated_at":"2018-02-02T02:53:14Z","pushed_at":"2018-02-07T14:22:00Z","git_url":"git://github.com/openshift/origin-web-console.git","ssh_url":"git@github.com:openshift/origin-web-console.git","clone_url":"https://github.com/openshift/origin-web-console.git","svn_url":"https://github.com/openshift/origin-web-console","homepage":null,"size":69148,"stargazers_count":70,"watchers_count":70,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":156,"mirror_url":null,"archived":false,"open_issues_count":158,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":156,"open_issues":158,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708"},"html":{"href":"https://github.com/openshift/origin-web-console/pull/2708"},"issue":{"href":"https://api.github.com/repos/openshift/origin-web-console/issues/2708"},"comments":{"href":"https://api.github.com/repos/openshift/origin-web-console/issues/2708/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin-web-console/pulls/2708/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin-web-console/statuses/68c1057160d09a33aedf93dae76e951f3ef93153"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"benjaminapetersen"}}