{"record":{"id":"8b766f4f0d40bc3a","repo":"dagger/dagger","slug":"failed-to-sync-sdk-moduletypes-container-w","errorCode":null,"errorMessage":"failed to sync sdk moduleTypes container: %w","messagePattern":"failed to sync sdk moduleTypes container: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/sdk/module_typedefs.go","lineNumber":120,"sourceCode":"\t\t\tField: \"withExec\",\n\t\t\tArgs: []dagql.NamedInput{\n\t\t\t\t{Name: \"args\", Value: dagql.ArrayInput[dagql.String]{}},\n\t\t\t\t{Name: \"useEntrypoint\", Value: dagql.NewBoolean(true)},\n\t\t\t\t{Name: \"experimentalPrivilegedNesting\", Value: dagql.NewBoolean(true)},\n\t\t\t\t{Name: \"execMD\", Value: dagql.NewDigestedSerializedString(&execMD, moduleTypesExecMDDigest)},\n\t\t\t\t{Name: \"moduleContext\", Value: dagql.Opt(moduleContextID)},\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\treturn inst, fmt.Errorf(\"failed to execute sdk moduleTypes container: %w\", err)\n\t}\n\n\tvar syncedCtrID dagql.ID[*core.Container]\n\tif err = dag.Select(hideCtx, ctr, &syncedCtrID, dagql.Selector{\n\t\tField: \"sync\",\n\t}); err != nil {\n\t\treturn inst, fmt.Errorf(\"failed to sync sdk moduleTypes container: %w\", err)\n\t}\n\n\tctr, err = syncedCtrID.Load(ctx, dag)\n\tif err != nil {\n\t\treturn inst, fmt.Errorf(\"failed to load synced sdk moduleTypes container: %w\", err)\n\t}\n\n\tvar modDefsID string\n\terr = dag.Select(ctx, ctr, &modDefsID,\n\t\tdagql.Selector{\n\t\t\tField: \"file\",\n\t\t\tArgs: []dagql.NamedInput{\n\t\t\t\t{\n\t\t\t\t\tName:  \"path\",\n\t\t\t\t\tValue: dagql.NewString(moduleIDPath),\n\t\t\t\t},\n\t\t\t},\n\t\t},","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/sdk/module_typedefs.go#L102-L138","documentation":"Wraps a failure of the container `sync` call that actually runs the SDK moduleTypes exec and waits for it to finish. Since withExec was marked hidden (WithSkip), sync is where the SDK codegen process runs and any SDK crash/exit surfaces. The wrapped error contains the exec's exit code or runtime failure.","triggerScenarios":"dag.Select(hideCtx, ctr, ..., Field \"sync\") fails because the SDK runtime container exits non-zero, the entrypoint fails, or the exec is canceled (context cancellation, engine shutdown).","commonSituations":"The SDK runtime binary crashes while generating typedefs; OOM or missing dependencies in the SDK image; user cancels the command; privileged nesting fails in restricted CI environments.","solutions":["Inspect the wrapped error / exec logs for the SDK process's stderr and exit code.","Run the SDK's codegen step manually (e.g. dagger develop equivalents) to reproduce.","Ensure the CI runner allows privileged nesting if required.","Check disk/memory limits on the engine."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check engine resources before long module loads\ndagger query --help >/dev/null && echo \"engine reachable\"","typeGuard":null,"tryCatchPattern":"inst, err := ModuleTypes(ctx, ...)\nif err != nil && strings.Contains(err.Error(), \"failed to sync sdk moduleTypes container\") {\n    // inspect SDK exec stderr in wrapped error; retry with backoff if transient\n}","preventionTips":["Give CI runners enough memory/disk for SDK codegen containers","Allow privileged nesting in restricted environments","Avoid cancelling commands mid module-load","Check SDK runtime logs on failure"],"tags":["dagger","sdk","container","exec","codegen"],"backgroundTag":"container-exec-failed","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}