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

Method runCheckLocally

core/modtree.go:234–256  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

232}
233
234func (node *ModTreeNode) runCheckLocally(ctx context.Context) error {
235 var status dagql.AnyResult
236 if err := node.DagqlValue(ctx, &status); err != nil {
237 return err
238 }
239 if obj, ok := dagql.UnwrapAs[dagql.AnyObjectResult](status); ok {
240 // If the check returns a syncable type, sync it
241 srv := node.DagqlServer
242 if syncField, has := obj.ObjectType().FieldSpec("sync", srv.View); has {
243 if !syncField.Args.HasRequired(srv.View) {
244 if err := srv.Select(
245 dagql.WithNonInternalTelemetry(ctx),
246 obj,
247 &status,
248 dagql.Selector{Field: "sync"},
249 ); err != nil {
250 return err
251 }
252 }
253 }
254 }
255 return nil
256}
257
258func (node *ModTreeNode) tryRunCheckScaleOut(ctx context.Context) (_ bool, rerr error) {
259 q, err := CurrentQuery(ctx)

Callers 1

RunCheckMethod · 0.80

Calls 6

DagqlValueMethod · 0.95
WithNonInternalTelemetryFunction · 0.92
HasRequiredMethod · 0.80
FieldSpecMethod · 0.65
ObjectTypeMethod · 0.65
SelectMethod · 0.65

Tested by

no test coverage detected