Skip to content

Commit f65f41f

Browse files
author
OpenShift Bot
committed
Merge pull request #5713 from ironcladlou/disable-config-status-updates
Merged by openshift-bot
2 parents 7c7c75f + c02e9cf commit f65f41f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pkg/deploy/controller/deploymentconfig/controller.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,19 @@ func (e transientError) Error() string {
5656

5757
// Handle processes config and creates a new deployment if necessary.
5858
func (c *DeploymentConfigController) Handle(config *deployapi.DeploymentConfig) error {
59-
// Inspect a deployment configuration every time the controller reconciles it
60-
details, existingDeployments, latestDeploymentExists, err := c.findDetails(config)
61-
if err != nil {
62-
return err
63-
}
64-
config, err = c.updateDetails(config, details)
65-
if err != nil {
66-
return transientError(err.Error())
67-
}
59+
// TODO(danmace): Don't use findDetails yet. See: https://github.com/openshift/origin/pull/5530
6860

6961
// Only deploy when the version has advanced past 0.
7062
if config.LatestVersion == 0 {
7163
glog.V(5).Infof("Waiting for first version of %s", deployutil.LabelForDeploymentConfig(config))
7264
return nil
7365
}
7466

67+
existingDeployments, err := c.deploymentClient.listDeploymentsForConfig(config.Namespace, config.Name)
68+
if err != nil {
69+
return err
70+
}
71+
7572
var inflightDeployment *kapi.ReplicationController
7673
for _, deployment := range existingDeployments.Items {
7774

@@ -104,6 +101,7 @@ func (c *DeploymentConfigController) Handle(config *deployapi.DeploymentConfig)
104101
}
105102

106103
// if the latest deployment exists then nothing else needs to be done
104+
latestDeploymentExists, _ := deployutil.LatestDeploymentInfo(config, existingDeployments)
107105
if latestDeploymentExists {
108106
return nil
109107
}
@@ -184,6 +182,7 @@ func (i *deploymentClientImpl) updateDeployment(namespace string, deployment *ka
184182

185183
// findDetails inspects the given deployment configuration for any failure causes
186184
// and returns any found details about it
185+
// TODO(danmace): Don't use findDetails yet. See: https://github.com/openshift/origin/pull/5530
187186
func (c *DeploymentConfigController) findDetails(config *deployapi.DeploymentConfig) (string, *kapi.ReplicationControllerList, bool, error) {
188187
// Check if any existing inflight deployments (any non-terminal state).
189188
existingDeployments, err := c.deploymentClient.listDeploymentsForConfig(config.Namespace, config.Name)

0 commit comments

Comments
 (0)