From 2baf920c96894db36119a99e04e2d26c65164e59 Mon Sep 17 00:00:00 2001 From: Alex Clemmer Date: Tue, 28 Aug 2018 15:11:42 -0700 Subject: [PATCH] Remove unused print statements --- pkg/engine/plan.go | 18 ------------------ pkg/engine/update.go | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/pkg/engine/plan.go b/pkg/engine/plan.go index f910a1d9f..d556bb245 100644 --- a/pkg/engine/plan.go +++ b/pkg/engine/plan.go @@ -15,16 +15,13 @@ package engine import ( - "bytes" "context" - "fmt" "os" "sync" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/pulumi/pulumi/pkg/diag" - "github.com/pulumi/pulumi/pkg/diag/colors" "github.com/pulumi/pulumi/pkg/resource" "github.com/pulumi/pulumi/pkg/resource/deploy" "github.com/pulumi/pulumi/pkg/resource/deploy/providers" @@ -277,21 +274,6 @@ func (acts *planActions) OnResourceStepPre(step deploy.Step) (interface{}, error acts.Opts.Events.resourcePreEvent(step, true /*planning*/, acts.Opts.Debug) - // Warn the user if they're not updating a resource whose initialization failed. - if step.Op() == deploy.OpSame && len(step.Old().InitErrors) > 0 { - indent := " " - - // TODO: Move indentation to the display logic, instead of doing it ourselves. - var warning bytes.Buffer - warning.WriteString("This resource failed to initialize in a previous deployment. It is recommended\n") - warning.WriteString(indent + "to update it to fix these issues:\n") - for i, err := range step.Old().InitErrors { - warning.WriteString(colors.SpecImportant + indent + fmt.Sprintf(" - Problem #%d", i+1) + - colors.Reset + " " + err + "\n") - } - acts.Opts.Diag.Warningf(diag.RawMessage(step.URN(), warning.String())) - } - return nil, nil } diff --git a/pkg/engine/update.go b/pkg/engine/update.go index fa4a74ad4..36b987611 100644 --- a/pkg/engine/update.go +++ b/pkg/engine/update.go @@ -15,15 +15,12 @@ package engine import ( - "bytes" - "fmt" "sync" "time" "github.com/blang/semver" "github.com/pulumi/pulumi/pkg/diag" - "github.com/pulumi/pulumi/pkg/diag/colors" "github.com/pulumi/pulumi/pkg/resource" "github.com/pulumi/pulumi/pkg/resource/deploy" "github.com/pulumi/pulumi/pkg/resource/plugin" @@ -212,21 +209,6 @@ func (acts *updateActions) OnResourceStepPre(step deploy.Step) (interface{}, err // Check for a default provider step and skip reporting if necessary. if acts.Opts.reportDefaultProviderSteps || !isDefaultProviderStep(step) { acts.Opts.Events.resourcePreEvent(step, false /*planning*/, acts.Opts.Debug) - - // Warn the user if they're not updating a resource whose initialization failed. - if step.Op() == deploy.OpSame && len(step.Old().InitErrors) > 0 { - indent := " " - - // TODO: Move indentation to the display logic, instead of doing it ourselves. - var warning bytes.Buffer - warning.WriteString("This resource failed to initialize in a previous deployment. It is recommended\n") - warning.WriteString(indent + "to update it to fix these issues:\n") - for i, err := range step.Old().InitErrors { - warning.WriteString(colors.SpecImportant + indent + fmt.Sprintf(" - Problem #%d", i+1) + - colors.Reset + " " + err + "\n") - } - acts.Opts.Diag.Warningf(diag.RawMessage(step.URN(), warning.String())) - } } // Inform the snapshot service that we are about to perform a step.