Skip to content

Commit

Permalink
Merge pull request #11270 from yuexiao-wang/remove-para
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed Oct 13, 2016
2 parents 65c13a5 + 8127e85 commit 66a729c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/cli/describe/deployments.go
Expand Up @@ -94,7 +94,7 @@ func (d *DeploymentConfigDescriber) Describe(namespace, name string, settings kc
fmt.Fprintln(out)

latestDeploymentName := deployutil.LatestDeploymentNameForConfig(deploymentConfig)
if activeDeployment := deployutil.ActiveDeployment(deploymentConfig, deploymentsHistory); activeDeployment != nil {
if activeDeployment := deployutil.ActiveDeployment(deploymentsHistory); activeDeployment != nil {
activeDeploymentName = activeDeployment.Name
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/deploy/controller/deploymentconfig/controller.go
Expand Up @@ -216,7 +216,7 @@ func (c *DeploymentConfigController) reconcileDeployments(existingDeployments []
// can't hurt.
return c.updateStatus(config, existingDeployments)
}
activeDeployment := deployutil.ActiveDeployment(config, existingDeployments)
activeDeployment := deployutil.ActiveDeployment(existingDeployments)
// Compute the replica count for the active deployment (even if the active
// deployment doesn't exist). The active replica count is the value that
// should be assigned to the config, to allow the replica propagation to
Expand Down
4 changes: 2 additions & 2 deletions pkg/deploy/util/util.go
Expand Up @@ -113,7 +113,7 @@ func LatestDeploymentInfo(config *deployapi.DeploymentConfig, deployments []api.
// ActiveDeployment returns the latest complete deployment, or nil if there is
// no such deployment. The active deployment is not always the same as the
// latest deployment.
func ActiveDeployment(config *deployapi.DeploymentConfig, input []api.ReplicationController) *api.ReplicationController {
func ActiveDeployment(input []api.ReplicationController) *api.ReplicationController {
var activeDeployment *api.ReplicationController
var lastCompleteDeploymentVersion int64 = 0
for i := range input {
Expand Down Expand Up @@ -523,7 +523,7 @@ func DeploymentsForCleanup(configuration *deployapi.DeploymentConfig, deployment
sort.Sort(ByLatestVersionAsc(deployments))

relevantDeployments := []api.ReplicationController{}
activeDeployment := ActiveDeployment(configuration, deployments)
activeDeployment := ActiveDeployment(deployments)
if activeDeployment == nil {
// if cleanup policy is set but no successful deployments have happened, there will be
// no active deployment. We can consider all of the deployments in this case except for
Expand Down

0 comments on commit 66a729c

Please sign in to comment.