{"record":{"id":"910f6c2b899ae66c","repo":"GoogleContainerTools/skaffold","slug":"survey-config-field-q-not-found-in-config-struct","errorCode":null,"errorMessage":"survey config field %q not found in config struct %s","messagePattern":"survey config field %q not found in config struct (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/skaffold/app/cmd/config/set.go","lineNumber":139,"sourceCode":"\tif survey {\n\t\tif cfg.Survey == nil {\n\t\t\tcfg.Survey = &config.SurveyConfig{\n\t\t\t\tUserSurveys: []*config.UserSurvey{},\n\t\t\t}\n\t\t}\n\t\treturn surveyStruct(cfg.Survey, t)\n\t}\n\treturn &cfgStruct{\n\t\tvalue: reflect.Indirect(reflect.ValueOf(cfg)),\n\t\trType: t,\n\t\tidx:   []int{},\n\t}, nil\n}\n\nfunc surveyStruct(s *config.SurveyConfig, t reflect.Type) (*cfgStruct, error) {\n\tfield, ok := t.FieldByName(surveyFieldName)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"survey config field %q not found in config struct %s\", surveyFieldName, t.Name())\n\t}\n\trType := reflect.TypeOf(*s)\n\tif isUserSurvey() {\n\t\treturn userSurveyStruct(&config.UserSurvey{}, rType, field.Index)\n\t}\n\treturn &cfgStruct{\n\t\tvalue: reflect.Indirect(reflect.ValueOf(s)),\n\t\trType: rType,\n\t\tidx:   field.Index,\n\t}, nil\n}\n\nfunc userSurveyStruct(as *config.UserSurvey, t reflect.Type, idx []int) (*cfgStruct, error) {\n\tfield, ok := t.FieldByName(userSurveysFieldName)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"survey config field %q not found in config struct %s\", userSurveysFieldName, t.Name())\n\t}\n\treturn &cfgStruct{","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/cmd/skaffold/app/cmd/config/set.go#L121-L157","documentation":"Internal guard in surveyStruct: the survey field (referenced by surveyFieldName) is missing from the SurveyConfig reflect.Type while building the config struct index for survey-related `skaffold config set` operations. Indicates a version mismatch between the compiled schema and the reflection code, not user input error.","triggerScenarios":"Thrown at cmd/skaffold/app/cmd/config/set.go:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade skaffold to the latest release to ensure schema and code are in sync","Reinstall the skaffold binary in case of a corrupted or mixed-version installation","Report to skaffold maintainers if it persists on the latest version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}