{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/54180904","id":54180904,"diff_hunk":"@@ -1057,14 +1107,30 @@ func (dc *DeploymentController) updateDeploymentStatus(allRSs []*extensions.Repl\n \t\tUpdatedReplicas:     updatedReplicas,\n \t\tAvailableReplicas:   availableReplicas,\n \t\tUnavailableReplicas: unavailableReplicas,\n+\t\tEnactedReplicas:     enactedReplicas,\n \t}\n+\tglog.V(4).Infof(\"Updating status for deployment %q (generation: %d)\", deployment.Name, deployment.Generation)\n \t_, err = dc.client.Extensions().Deployments(deployment.ObjectMeta.Namespace).UpdateStatus(&newDeployment)\n \treturn err\n }\n \n-func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment extensions.Deployment) (totalActualReplicas, updatedReplicas, availableReplicas, unavailableReplicas int, err error) {\n+func (dc *DeploymentController) calculateStatus(allRSs []*extensions.ReplicaSet, newRS *extensions.ReplicaSet, deployment extensions.Deployment) (totalActualReplicas, updatedReplicas, availableReplicas, unavailableReplicas, enactedReplicas int, err error) {\n \ttotalActualReplicas = deploymentutil.GetActualReplicaCountForReplicaSets(allRSs)\n-\tupdatedReplicas = deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS})\n+\tif newRS != nil {\n+\t\tupdatedReplicas = deploymentutil.GetActualReplicaCountForReplicaSets([]*extensions.ReplicaSet{newRS})\n+\t}\n+\tmaybeMaxSurge := 0\n+\tif deploymentutil.IsRollingUpdate(&deployment) {\n+\t\tmaybeMaxSurge, err = intstrutil.GetValueFromIntOrPercent(&deployment.Spec.Strategy.RollingUpdate.MaxSurge, deployment.Spec.Replicas, true)\n+\t\tif err != nil {\n+\t\t\terr = fmt.Errorf(\"failed to resolve maxSurge for enacted pods: %v\", err)\n+\t\t\treturn\n+\t\t}\n+\t\t// Normalize maxSurge in case newRS replicas exceed deployment replicas.\n+\t\tmaybeMaxSurge = integer.IntMax(integer.IntMin(maybeMaxSurge, deployment.Spec.Replicas-updatedReplicas), 0)","path":"pkg/controller/deployment/deployment_controller.go","position":226,"original_position":226,"commit_id":"6dcfc4a8e832b86c68cfc5e3161b94d042598ba1","original_commit_id":"6dcfc4a8e832b86c68cfc5e3161b94d042598ba1","user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"body":"Right, good catch. Rebased on top of head and missed that change.","created_at":"2016-02-25T23:05:58Z","updated_at":"2016-02-25T23:05:58Z","html_url":"https://github.com/kubernetes/kubernetes/pull/20273#discussion_r54180904","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/54180904"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20273#discussion_r54180904"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273","id":57530174,"html_url":"https://github.com/kubernetes/kubernetes/pull/20273","diff_url":"https://github.com/kubernetes/kubernetes/pull/20273.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/20273.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20273","number":20273,"state":"open","locked":false,"title":"Allow scaling of paused deployments to propagate","user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"body":"Fixes #20853\r\nFixes https://github.com/kubernetes/kubernetes/issues/20966\r\n\r\n@bgrant0607 @janetkuo @ironcladlou @nikhiljindal ","created_at":"2016-01-28T16:50:25Z","updated_at":"2016-02-25T23:05:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74aed044337a47bc00130c2e6c17dea2799e807f","assignee":{"login":"janetkuo","id":4876867,"avatar_url":"https://avatars.githubusercontent.com/u/4876867?v=3","gravatar_id":"","url":"https://api.github.com/users/janetkuo","html_url":"https://github.com/janetkuo","followers_url":"https://api.github.com/users/janetkuo/followers","following_url":"https://api.github.com/users/janetkuo/following{/other_user}","gists_url":"https://api.github.com/users/janetkuo/gists{/gist_id}","starred_url":"https://api.github.com/users/janetkuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janetkuo/subscriptions","organizations_url":"https://api.github.com/users/janetkuo/orgs","repos_url":"https://api.github.com/users/janetkuo/repos","events_url":"https://api.github.com/users/janetkuo/events{/privacy}","received_events_url":"https://api.github.com/users/janetkuo/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.2","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/15/labels","id":1278499,"number":15,"title":"v1.2","description":"https://github.com/kubernetes/kubernetes/wiki/Release-1.2","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":194,"closed_issues":367,"state":"open","created_at":"2015-08-29T03:54:16Z","updated_at":"2016-02-25T23:03:21Z","due_on":"2016-03-07T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/20273/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6dcfc4a8e832b86c68cfc5e3161b94d042598ba1","head":{"label":"kargakis:allow-scaling-paused-deployments","ref":"allow-scaling-paused-deployments","sha":"6dcfc4a8e832b86c68cfc5e3161b94d042598ba1","user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"repo":{"id":33254730,"name":"kubernetes","full_name":"kargakis/kubernetes","owner":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kargakis/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/kargakis/kubernetes","forks_url":"https://api.github.com/repos/kargakis/kubernetes/forks","keys_url":"https://api.github.com/repos/kargakis/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kargakis/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kargakis/kubernetes/teams","hooks_url":"https://api.github.com/repos/kargakis/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kargakis/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kargakis/kubernetes/events","assignees_url":"https://api.github.com/repos/kargakis/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kargakis/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kargakis/kubernetes/tags","blobs_url":"https://api.github.com/repos/kargakis/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kargakis/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kargakis/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kargakis/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kargakis/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kargakis/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kargakis/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kargakis/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kargakis/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kargakis/kubernetes/subscription","commits_url":"https://api.github.com/repos/kargakis/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kargakis/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kargakis/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kargakis/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kargakis/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kargakis/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kargakis/kubernetes/merges","archive_url":"https://api.github.com/repos/kargakis/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kargakis/kubernetes/downloads","issues_url":"https://api.github.com/repos/kargakis/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kargakis/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kargakis/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kargakis/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kargakis/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kargakis/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kargakis/kubernetes/deployments","created_at":"2015-04-01T15:11:37Z","updated_at":"2016-01-12T10:44:51Z","pushed_at":"2016-02-25T19:56:53Z","git_url":"git://github.com/kargakis/kubernetes.git","ssh_url":"git@github.com:kargakis/kubernetes.git","clone_url":"https://github.com/kargakis/kubernetes.git","svn_url":"https://github.com/kargakis/kubernetes","homepage":"http://kubernetes.io","size":171062,"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":"kubernetes:master","ref":"master","sha":"df234d83cdae2b0fc4bd7cd775fda8446dee6488","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-02-25T20:04:25Z","pushed_at":"2016-02-25T23:05:46Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":331749,"stargazers_count":12879,"watchers_count":12879,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3679,"mirror_url":null,"open_issues_count":2992,"forks":3679,"open_issues":2992,"watchers":12879,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/20273"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20273"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/20273/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/20273/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6dcfc4a8e832b86c68cfc5e3161b94d042598ba1"}}}}