{"record":{"id":"a2fde1c206f0ecbb","repo":"dagger/dagger","slug":"unknown-sdk-config-keys-found-v","errorCode":null,"errorMessage":"unknown sdk config keys found %v","messagePattern":"unknown sdk config keys found (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/sdk/go_sdk.go","lineNumber":660,"sourceCode":"}\n\nfunc (sdk *goSDK) moduleDependencyConfigSelectors(ctx context.Context) ([]dagql.Selector, []dagql.Selector, error) {\n\tvar config goSDKConfig\n\tvar mapstructureMetadata mapstructure.Metadata\n\tdecoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{\n\t\tMetadata: &mapstructureMetadata,\n\t\tResult:   &config,\n\t})\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif err := decoder.Decode(sdk.rawConfig); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif len(mapstructureMetadata.Unused) > 0 {\n\t\treturn nil, nil, fmt.Errorf(\"unknown sdk config keys found %v\", mapstructureMetadata.Unused)\n\t}\n\n\tselectors := getSDKConfigSelectors(ctx, config)\n\n\tbk, err := sdk.root.Engine(ctx)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tgitConfigSelectors, err := gitConfigSelectors(ctx, bk)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tselectors = append(selectors, gitConfigSelectors...)\n\n\t// TODO(rajatjindal): verify with Erik as to why this\n\t// cause failures if we also mount this in Runtime.\n\t// Issue we run into is that when we try to run sdk checks","sourceCodeStart":642,"sourceCodeEnd":678,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/sdk/go_sdk.go#L642-L678","documentation":"Thrown by goSDK.moduleDependencyConfigSelectors in core/sdk/go_sdk.go:660 when the module's dagger.json \"sdk\" config object contains keys the Go SDK does not recognize. The rawConfig is decoded with mapstructure with strict unused-key detection; any key not defined in goSDKConfig causes this error. It exists to catch typos and stale config after version changes.","triggerScenarios":"dagger.json contains sdk config like {\"source\": \"go\", \"<unknown>\": ...} — e.g. a typo, a key from another SDK (python's \"venv\"-style options), or a key removed in a newer Dagger version.","commonSituations":"Hand-editing dagger.json with typos (e.g. \"generaate\"), copying python-sdk config options into a go sdk block, or upgrading Dagger where a previously valid sdk option was dropped.","solutions":["Read the listed unused key names from the error and fix or remove them in dagger.json's sdk object.","Keep only supported Go SDK keys (e.g. \"source\", \"version\"); check docs for your engine version.","Run `dagger develop` after editing dagger.json to validate config.","If a key was valid before an upgrade, consult the Dagger changelog for renamed/removed sdk options."],"exampleFix":"// dagger.json before (typo)\n\"sdk\": { \"source\": \"go\", \"version\": \"v0.9.9\", \"modulPath\": \"example.com/mymod\" }\n// after: remove unknown key\n\"sdk\": { \"source\": \"go\", \"version\": \"v0.9.9\" }","handlingStrategy":"validation","validationCode":"// pre-validate dagger.json sdk block\nvar sdkCfg map[string]any\nif err := json.Unmarshal(daggerJSON.SDK, &sdkCfg); err != nil { return err }\nallowed := map[string]bool{\"source\": true, \"version\": true}\nfor k := range sdkCfg {\n    if !allowed[k] { return fmt.Errorf(\"unsupported go sdk config key: %s\", k) }\n}","typeGuard":null,"tryCatchPattern":"// catch and point at the offending key listed in the error\nif strings.Contains(err.Error(), \"unknown sdk config keys found\") {\n    return fmt.Errorf(\"fix dagger.json sdk block per error's key list: %w\", err)\n}","preventionTips":["Only put keys documented for the go sdk in the sdk object","Never copy python/node sdk options into a go sdk block","Run dagger develop immediately after editing dagger.json","Check the Dagger changelog when upgrading for dropped sdk keys"],"tags":["go","sdk","config","validation","dagger-json"],"backgroundTag":"unknown-config-key","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"}