{"record":{"id":"df8ff3cc5a927dda","repo":"dagger/dagger","slug":"legacy-customization-arg-q-clear-default-address","errorCode":null,"errorMessage":"legacy customization arg %q clear default address: %w","messagePattern":"legacy customization arg %q clear default address: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/module.go","lineNumber":707,"sourceCode":"\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{\n\t\t\t\t\tField: \"__withDefaultValue\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"defaultValue\", Value: jsonValue}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn updatedArg, fmt.Errorf(\"legacy customization arg %q default value: %w\", argSelf.Name, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif cust.DefaultPath != \"\" {\n\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{\n\t\t\t\t\tField: \"__withDefaultPath\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"defaultPath\", Value: dagql.String(cust.DefaultPath)}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn updatedArg, fmt.Errorf(\"legacy customization arg %q default path: %w\", argSelf.Name, err)\n\t\t\t\t}\n\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{\n\t\t\t\t\tField: \"__withDefaultAddress\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"defaultAddress\", Value: dagql.String(\"\")}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn updatedArg, fmt.Errorf(\"legacy customization arg %q clear default address: %w\", argSelf.Name, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif cust.DefaultAddress != \"\" {\n\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{\n\t\t\t\t\tField: \"__withDefaultAddress\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"defaultAddress\", Value: dagql.String(cust.DefaultAddress)}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn updatedArg, fmt.Errorf(\"legacy customization arg %q default address: %w\", argSelf.Name, err)\n\t\t\t\t}\n\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{\n\t\t\t\t\tField: \"__withDefaultPath\",\n\t\t\t\t\tArgs:  []dagql.NamedInput{{Name: \"defaultPath\", Value: dagql.String(\"\")}},\n\t\t\t\t}); err != nil {\n\t\t\t\t\treturn updatedArg, fmt.Errorf(\"legacy customization arg %q clear default path: %w\", argSelf.Name, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tif len(cust.Ignore) > 0 {\n\t\t\t\tif err := dag.Select(ctx, updatedArg, &updatedArg, dagql.Selector{","sourceCodeStart":689,"sourceCodeEnd":725,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/core/module.go#L689-L725","documentation":"Wraps a failure from the dagql Select calling `__withDefaultAddress` with an empty string, used to clear any existing default address when a legacy DefaultPath is being set (core/module.go:707). Legacy semantics made defaultPath and defaultAddress mutually exclusive.","triggerScenarios":"After applying DefaultPath, the clear-address select fails — the argument TypeDef doesn't support `__withDefaultAddress` (wrong type kind) or the query errored.","commonSituations":"Legacy modules with directory-type arguments transitioning from a defaultAddress to a defaultPath; version-skew between engine and module SDK.","solutions":["Update the module SDK/codegen so the mutual-exclusion semantics are handled natively.","Set only one of DefaultPath or DefaultAddress in the customization, not a transition between them.","Confirm the argument is a service-address-compatible type before touching defaultAddress.","Reload module and retry if the engine error was transient."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := loadModule(ctx); err != nil {\n  if strings.Contains(err.Error(), \"clear default address\") {\n    // update SDK so legacy path/address mutual exclusion is handled natively\n  }\n}","preventionTips":["Set only one of defaultPath/defaultAddress per argument","Use current SDK APIs instead of legacy customizations","Test module loads after engine upgrades"],"tags":["dagql","module","legacy-customization","default-address"],"backgroundTag":"dagql-select-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"}