diff --git a/client/client.go b/client/client.go index 78294705..8569d9cd 100644 --- a/client/client.go +++ b/client/client.go @@ -223,7 +223,7 @@ func (c *Client) logSolveStatus(ctx context.Context, pctx *plancontext.Context, lg := log. Ctx(ctx). With(). - Str("component", component). + Str("task", component). Logger() lg. @@ -238,7 +238,7 @@ func (c *Client) logSolveStatus(ctx context.Context, pctx *plancontext.Context, lg := log. Ctx(ctx). With(). - Str("component", component). + Str("task", component). Logger() msg := secureSprintf(format, a...) @@ -251,7 +251,7 @@ func (c *Client) logSolveStatus(ctx context.Context, pctx *plancontext.Context, lg := log. Ctx(ctx). With(). - Str("component", component). + Str("task", component). Logger() msg := secureSprintf(format, a...) diff --git a/cmd/dagger/logger/plain.go b/cmd/dagger/logger/plain.go index e454147e..b52b4b5e 100644 --- a/cmd/dagger/logger/plain.go +++ b/cmd/dagger/logger/plain.go @@ -118,7 +118,7 @@ func formatMessage(event map[string]interface{}) string { func parseSource(event map[string]interface{}) string { source := "system" - if task, ok := event["component"].(string); ok && task != "" { + if task, ok := event["task"].(string); ok && task != "" { source = task } return source @@ -141,7 +141,7 @@ func formatFields(entry map[string]interface{}) string { zerolog.ErrorFieldName: {}, zerolog.CallerFieldName: {}, "environment": {}, - "component": {}, + "task": {}, "state": {}, } diff --git a/cmd/dagger/logger/tty.go b/cmd/dagger/logger/tty.go index 7b7c650c..fa19172d 100644 --- a/cmd/dagger/logger/tty.go +++ b/cmd/dagger/logger/tty.go @@ -43,7 +43,7 @@ func (l *Logs) Add(event Event) error { l.l.Lock() defer l.l.Unlock() - component, ok := event["component"].(string) + task, ok := event["task"].(string) if !ok { l.Messages = append(l.Messages, Message{ Event: event, @@ -52,7 +52,7 @@ func (l *Logs) Add(event Event) error { return nil } - groupKey := strings.Split(component, ".#up")[0] + groupKey := strings.Split(task, ".#up")[0] group := l.groups[groupKey] // If the group doesn't exist, create it @@ -72,8 +72,8 @@ func (l *Logs) Add(event Event) error { // For state events, we just want to update the group status -- no need to // dispanything if st, ok := event["state"].(string); ok { - // Ignore state updates for "sub" components - if component != groupKey { + // Ignore state updates for "sub" tasks + if task != groupKey { return nil } diff --git a/environment/environment.go b/environment/environment.go index 4915e30e..fe4b4609 100644 --- a/environment/environment.go +++ b/environment/environment.go @@ -126,7 +126,7 @@ func newPipelineRunner(computed *compiler.Value, s solver.Solver, pctx *plancont lg := log. Ctx(ctx). With(). - Str("component", t.Path().String()). + Str("task", t.Path().String()). Logger() ctx = lg.WithContext(ctx) diff --git a/environment/pipeline.go b/environment/pipeline.go index 1e01ab28..34c839b1 100644 --- a/environment/pipeline.go +++ b/environment/pipeline.go @@ -166,7 +166,7 @@ func (p *Pipeline) Run(ctx context.Context) error { lg := log. Ctx(ctx). With(). - Str("component", p.name). + Str("task", p.name). Logger() start := time.Now() diff --git a/plan/plan.go b/plan/plan.go index b079228b..49f5a455 100644 --- a/plan/plan.go +++ b/plan/plan.go @@ -120,7 +120,7 @@ func newRunner(pctx *plancontext.Context, s solver.Solver, computed *compiler.Va // Wrapper around `task.Run` that handles logging, tracing, etc. return cueflow.RunnerFunc(func(t *cueflow.Task) error { ctx := t.Context() - lg := log.Ctx(ctx).With().Str("component", t.Path().String()).Logger() + lg := log.Ctx(ctx).With().Str("task", t.Path().String()).Logger() ctx = lg.WithContext(ctx) ctx, span := otel.Tracer("dagger").Start(ctx, fmt.Sprintf("compute: %s", t.Path().String())) defer span.End()