MCPcopy Create free account
hub / github.com/dagger/dagger / RunGenerator

Method RunGenerator

core/modtree.go:475–495  ·  view source on GitHub ↗
(ctx context.Context, include, exclude []string)

Source from the content-addressed store, hash-verified

473}
474
475func (node *ModTreeNode) RunGenerator(ctx context.Context, include, exclude []string) (dagql.ObjectResult[*Changeset], error) {
476 var changes dagql.ObjectResult[*Changeset]
477 err := node.Run(ctx,
478 func(n *ModTreeNode) bool { return n.IsGenerator },
479 func(ctx context.Context, n *ModTreeNode, _ *engine.ClientMetadata) (rerr error) {
480 ctx, span := Tracer(ctx).Start(ctx, node.PathString(),
481 telemetry.Reveal(),
482 trace.WithAttributes(
483 attribute.Bool(telemetry.UIRollUpLogsAttr, true),
484 attribute.Bool(telemetry.UIRollUpSpansAttr, true),
485 attribute.String(telemetry.GeneratorNameAttr, node.PathString()),
486 ),
487 )
488 defer telemetry.EndWithCause(span, &rerr)
489 localChanges, err := n.runGeneratorLocally(ctx)
490 changes = localChanges
491 return err
492 },
493 include, exclude)
494 return changes, err
495}
496
497func (node *ModTreeNode) runGeneratorLocally(ctx context.Context) (dagql.ObjectResult[*Changeset], error) {
498 var changes dagql.ObjectResult[*Changeset]

Callers 2

RunMethod · 0.80
RunMethod · 0.80

Calls 7

RunMethod · 0.95
PathStringMethod · 0.95
runGeneratorLocallyMethod · 0.80
TracerFunction · 0.70
StartMethod · 0.65
BoolMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected