Skip to content

Commit c0cd4c0

Browse files
committed
chore: cleanup template building messages
1 parent f8d5a64 commit c0cd4c0

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

packages/orchestrator/internal/template/build/phases/finalize/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (ppb *PostProcessingBuilder) postProcessingFn(userLogger *zap.Logger) layer
232232
var startCmdRun errgroup.Group
233233
startCmdConfirm := make(chan struct{})
234234
if meta.Start.StartCmd != "" {
235-
userLogger.Info("Running start command")
235+
userLogger.Info(fmt.Sprintf("Running start command: %s", meta.Start.StartCmd))
236236
startCmdRun.Go(func() error {
237237
err := sandboxtools.RunCommandWithConfirmation(
238238
commandsCtx,

packages/orchestrator/internal/template/build/phases/finalize/ready.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ func (ppb *PostProcessingBuilder) runReadyCommand(
3030
ctx, span := tracer.Start(ctx, "run-ready-command")
3131
defer span.End()
3232

33-
userLogger.Info("Waiting for template to be ready")
34-
35-
userLogger.Info(fmt.Sprintf("[ready cmd]: %s", readyCmd))
33+
userLogger.Info(fmt.Sprintf("Waiting for template to be ready: %s", readyCmd))
3634

3735
startTime := time.Now()
3836
ctx, cancel := context.WithTimeout(ctx, readyCommandTimeout)
@@ -44,7 +42,7 @@ func (ppb *PostProcessingBuilder) runReadyCommand(
4442
ctx,
4543
ppb.proxy,
4644
userLogger,
47-
zapcore.InfoLevel,
45+
zapcore.DebugLevel,
4846
"ready",
4947
sandboxID,
5048
readyCmd,
@@ -57,7 +55,7 @@ func (ppb *PostProcessingBuilder) runReadyCommand(
5755
return nil
5856
}
5957

60-
userLogger.Info(fmt.Sprintf("Template is not ready: %v", err))
58+
userLogger.Debug(fmt.Sprintf("Template is not ready: %v", err))
6159

6260
select {
6361
case <-ctx.Done():

packages/orchestrator/internal/template/build/sandboxtools/command.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func RunCommandWithConfirmation(
104104
confirmCh,
105105
func(stdout, stderr string) {
106106
logStream(logger, lvl, id, "stdout", stdout)
107-
logStream(logger, zapcore.ErrorLevel, id, "stderr", stderr)
107+
logStream(logger, lvl, id, "stderr", stderr)
108108
},
109109
)
110110
}
@@ -185,8 +185,6 @@ func runCommandWithAllOptions(
185185
success := end.GetExitCode() == 0
186186

187187
if !success {
188-
processOutput("", end.GetStatus())
189-
190188
return errors.New(end.GetStatus())
191189
}
192190
}

0 commit comments

Comments
 (0)