{"record":{"id":"c53ad6f1f3d0c3d3","repo":"GoogleContainerTools/skaffold","slug":"config-profiles-not-found-err","errorCode":"CONFIG_PROFILES_NOT_FOUND_ERR","errorMessage":"profile selection %q did not match those defined in any configurations","messagePattern":"profile selection %q did not match those defined in any configurations","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/errors/errors.go","lineNumber":160,"sourceCode":"\t\t&proto.ActionableErr{\n\t\t\tMessage: fmt.Sprintf(\"failed to set default values for config %q defined in file %q: %v\", config, file, err),\n\t\t\tErrCode: proto.StatusCode_CONFIG_DEFAULT_VALUES_ERR,\n\t\t})\n}\n\n// ConfigSetAbsFilePathsErr specifies that substituting absolute filepaths failed for this config\nfunc ConfigSetAbsFilePathsErr(config, file string, err error) error {\n\treturn sErrors.NewError(err,\n\t\t&proto.ActionableErr{\n\t\t\tMessage: fmt.Sprintf(\"failed to set absolute filepaths for config %q defined in file %q: %v\", config, file, err),\n\t\t\tErrCode: proto.StatusCode_CONFIG_FILE_PATHS_SUBSTITUTION_ERR,\n\t\t})\n}\n\n// ConfigProfilesNotMatchedErr specifies that the profiles selected via the `--profile` flag could not be matched against any config\nfunc ConfigProfilesNotMatchedErr(profiles []string) error {\n\tmsg := fmt.Sprintf(\"profile selection %q did not match those defined in any configurations\", profiles)\n\treturn sErrors.NewError(errors.New(msg),\n\t\t&proto.ActionableErr{\n\t\t\tMessage: msg,\n\t\t\tErrCode: proto.StatusCode_CONFIG_PROFILES_NOT_FOUND_ERR,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_CONFIG_CHECK_PROFILE_SELECTION,\n\t\t\t\t\tAction:         `Check that values specified in the \"--profile\" or \"-p\" flags are valid profile names`,\n\t\t\t\t},\n\t\t\t},\n\t\t})\n}\n\n// ConfigProfileConflictErr specifies that the same config is imported with different set of profiles.\nfunc ConfigProfileConflictErr(config, file string) error {\n\tmsg := fmt.Sprintf(\"config %q defined in file %q imported multiple times with different set of profiles\", config, file)\n\treturn sErrors.NewError(errors.New(msg),\n\t\t&proto.ActionableErr{\n\t\t\tMessage: msg,","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/errors/errors.go#L142-L178","documentation":"ConfigProfilesNotMatchedErr is returned when profiles passed via the `--profile` flag do not match any profile defined in any loaded configuration. Code CONFIG_PROFILES_NOT_FOUND_ERR, suggesting checking profile selection.","triggerScenarios":"Running any command with `--profile name1,name2` where at least one requested name has no matching `profiles:` entry in skaffold.yaml (or imported configs).","commonSituations":"Typo in profile name; profile exists only in a different config file not being loaded; running the same command in another repo/branch where the profile was never defined or was renamed.","solutions":["Verify each `--profile` value against the `profiles:` list in your skaffold.yaml.","Remove profiles that no longer exist from the command, scripts, or CI pipeline.","Add the missing profile definition if it is genuinely required."],"exampleFix":"// before\nskaffold dev --profile prod\n// after (profile defined in skaffold.yaml as 'production')\nskaffold dev --profile production","handlingStrategy":"validation","validationCode":"for p in $(echo \"$PROFILES\" | tr ',' ' '); do\n  grep -q \"name: $p$\" skaffold.yaml || { echo \"profile '$p' not defined\"; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document available profiles in the repo README and keep flag usage in scripts in sync.","Use `skaffold dev --profile=<tab>` shell completion instead of typing names.","After renaming/removing a profile, grep CI pipelines and wrapper scripts for references."],"tags":["config","profiles","cli-flag"],"backgroundTag":"profile-not-found","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"}