{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67252","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67252/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67252/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67252/events","html_url":"https://github.com/kubernetes/kubernetes/pull/67252","id":349494194,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NTk1MTcz","number":67252,"title":"Fix HPA sample sanitization","user":{"login":"jbartosik","id":277062,"node_id":"MDQ6VXNlcjI3NzA2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/277062?v=4","gravatar_id":"","url":"https://api.github.com/users/jbartosik","html_url":"https://github.com/jbartosik","followers_url":"https://api.github.com/users/jbartosik/followers","following_url":"https://api.github.com/users/jbartosik/following{/other_user}","gists_url":"https://api.github.com/users/jbartosik/gists{/gist_id}","starred_url":"https://api.github.com/users/jbartosik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbartosik/subscriptions","organizations_url":"https://api.github.com/users/jbartosik/orgs","repos_url":"https://api.github.com/users/jbartosik/repos","events_url":"https://api.github.com/users/jbartosik/events{/privacy}","received_events_url":"https://api.github.com/users/jbartosik/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":261005360,"node_id":"MDU6TGFiZWwyNjEwMDUzNjA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/api-change","name":"kind/api-change","color":"e11d21","default":false},{"id":200149833,"node_id":"MDU6TGFiZWwyMDAxNDk4MzM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":173493835,"node_id":"MDU6TGFiZWwxNzM0OTM4MzU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false},{"id":238245616,"node_id":"MDU6TGFiZWwyMzgyNDU2MTY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/autoscaling","name":"sig/autoscaling","color":"d2b48c","default":false},{"id":253451057,"node_id":"MDU6TGFiZWwyNTM0NTEwNTc=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XL","name":"size/XL","color":"ee5500","default":false}],"state":"open","locked":false,"assignee":{"login":"DirectXMan12","id":119737,"node_id":"MDQ6VXNlcjExOTczNw==","avatar_url":"https://avatars1.githubusercontent.com/u/119737?v=4","gravatar_id":"","url":"https://api.github.com/users/DirectXMan12","html_url":"https://github.com/DirectXMan12","followers_url":"https://api.github.com/users/DirectXMan12/followers","following_url":"https://api.github.com/users/DirectXMan12/following{/other_user}","gists_url":"https://api.github.com/users/DirectXMan12/gists{/gist_id}","starred_url":"https://api.github.com/users/DirectXMan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DirectXMan12/subscriptions","organizations_url":"https://api.github.com/users/DirectXMan12/orgs","repos_url":"https://api.github.com/users/DirectXMan12/repos","events_url":"https://api.github.com/users/DirectXMan12/events{/privacy}","received_events_url":"https://api.github.com/users/DirectXMan12/received_events","type":"User","site_admin":false},"assignees":[{"login":"DirectXMan12","id":119737,"node_id":"MDQ6VXNlcjExOTczNw==","avatar_url":"https://avatars1.githubusercontent.com/u/119737?v=4","gravatar_id":"","url":"https://api.github.com/users/DirectXMan12","html_url":"https://github.com/DirectXMan12","followers_url":"https://api.github.com/users/DirectXMan12/followers","following_url":"https://api.github.com/users/DirectXMan12/following{/other_user}","gists_url":"https://api.github.com/users/DirectXMan12/gists{/gist_id}","starred_url":"https://api.github.com/users/DirectXMan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DirectXMan12/subscriptions","organizations_url":"https://api.github.com/users/DirectXMan12/orgs","repos_url":"https://api.github.com/users/DirectXMan12/repos","events_url":"https://api.github.com/users/DirectXMan12/events{/privacy}","received_events_url":"https://api.github.com/users/DirectXMan12/received_events","type":"User","site_admin":false},{"login":"lavalamp","id":647318,"node_id":"MDQ6VXNlcjY0NzMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/647318?v=4","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2018-08-10T12:19:08Z","updated_at":"2018-08-22T10:07:26Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/67252","html_url":"https://github.com/kubernetes/kubernetes/pull/67252","diff_url":"https://github.com/kubernetes/kubernetes/pull/67252.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/67252.patch"},"body":"**What this PR does / why we need it**: @mwielgus pointed out a case when HPA fails as a result of my changes to HPA algorithm:\r\n- Have pods that use a lot of CPU during initilization, become ready right after they initialize,\r\n- Trigger a scale up,\r\n- When new pods become ready will will count their usage (even though it's not related to any work that needs doing),\r\n- This triggers another scale up, even though existing pods can handle work, no problem.\r\n\r\nThe fix is:\r\n- Use all samples for non-cpu metrics.\r\n- Only use CPU samples if:\r\n  - Pod is ready and was started more than 2 minutes ago, or\r\n  - Pod is unready and last readiness change happened more than 10s after it was started.\r\n\r\nReasoning behind this in: https://docs.google.com/document/d/1UdtYedhmCxjaJIQi6hwJMY0eHQQKxlVD8lSHZC1BPOA/edit\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n```release-note\r\nReplace scale up forbidden window with disregarding CPU samples collected when pod was initializing.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/414981931","html_url":"https://github.com/kubernetes/kubernetes/pull/67252#issuecomment-414981931","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/67252","id":414981931,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDk4MTkzMQ==","user":{"login":"jbartosik","id":277062,"node_id":"MDQ6VXNlcjI3NzA2Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/277062?v=4","gravatar_id":"","url":"https://api.github.com/users/jbartosik","html_url":"https://github.com/jbartosik","followers_url":"https://api.github.com/users/jbartosik/followers","following_url":"https://api.github.com/users/jbartosik/following{/other_user}","gists_url":"https://api.github.com/users/jbartosik/gists{/gist_id}","starred_url":"https://api.github.com/users/jbartosik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbartosik/subscriptions","organizations_url":"https://api.github.com/users/jbartosik/orgs","repos_url":"https://api.github.com/users/jbartosik/repos","events_url":"https://api.github.com/users/jbartosik/events{/privacy}","received_events_url":"https://api.github.com/users/jbartosik/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T10:07:26Z","updated_at":"2018-08-22T10:07:26Z","author_association":"CONTRIBUTOR","body":"/retest"}}
{"actor":{"display_login":"jbartosik"}}