Skip to content

Commit

Permalink
cleanup(ux): removes redundant output (#1465)
Browse files Browse the repository at this point in the history
During on-cluster builds, we see the "Creating Pipeline resources" message printed twice.

```
func deploy --remote --verbose
Creating Pipeline resources
Creating Pipeline resources
Running Pipeline with the Function
Running Pipeline: Building function image on the cluster
Running Pipeline: Deploying function to the cluster
```
This change removes the second "Creating Pipelines resources" output.

There was also a stray call to `progressListener.Stopping()`. This change addresses that, and also removes a "Running pipeline with the Function" output line, which is immediately overwritten by Task descriptions as they are running.

/kind cleanup

Signed-off-by: Lance Ball <[email protected]>

Signed-off-by: Lance Ball <[email protected]>
Co-authored-by: Lance Ball <[email protected]>
  • Loading branch information
knative-prow-robot and lance authored Dec 13, 2022
1 parent 1d22cb2 commit d14e6be
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pipelines/tekton/pipeplines_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ func (pp *PipelinesProvider) Run(ctx context.Context, f fn.Function) error {
return fmt.Errorf("problem in resolving image registry name: %v", err)
}

pp.progressListener.Stopping()
creds, err := pp.credentialsProvider(ctx, f.Image)
if err != nil {
return err
}
pp.progressListener.Increment("Creating Pipeline resources")

if registry == name.DefaultRegistry {
registry = authn.DefaultAuthKey
Expand All @@ -161,7 +159,6 @@ func (pp *PipelinesProvider) Run(ctx context.Context, f fn.Function) error {
return fmt.Errorf("problem in creating secret: %v", err)
}

pp.progressListener.Increment("Running Pipeline with the Function")
pr, err := client.PipelineRuns(pp.namespace).Create(ctx, generatePipelineRun(f, labels), metav1.CreateOptions{})
if err != nil {
return fmt.Errorf("problem in creating pipeline run: %v", err)
Expand Down Expand Up @@ -365,7 +362,7 @@ out:
if val, ok := taskProgressMsg[tr.Task]; ok {
taskDescription = val
}
pp.progressListener.Increment(fmt.Sprintf("Running Pipeline: %s", taskDescription))
pp.progressListener.Increment(fmt.Sprintf("Running Pipeline Task: %s", taskDescription))

}(run)
}
Expand Down

0 comments on commit d14e6be

Please sign in to comment.