{"record":{"id":"3f2b4d9a93748679","repo":"GoogleContainerTools/skaffold","slug":"config-bad-filter-err","errorCode":"CONFIG_BAD_FILTER_ERR","errorMessage":"did not find any configs matching selection %v","messagePattern":"did not find any configs matching selection (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/errors/errors.go","lineNumber":69,"sourceCode":"// DependencyConfigFileNotFoundErr specifies dependency configuration file not found\nfunc DependencyConfigFileNotFoundErr(depFile, parentFile string, err error) error {\n\treturn sErrors.NewError(err,\n\t\t&proto.ActionableErr{\n\t\t\tMessage: fmt.Sprintf(\"could not find skaffold config file %q that is referenced as a dependency in config file %q: %v\", depFile, parentFile, err),\n\t\t\tErrCode: proto.StatusCode_CONFIG_DEPENDENCY_NOT_FOUND_ERR,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_CONFIG_CHECK_DEPENDENCY_DEFINITION,\n\t\t\t\t\tAction:         fmt.Sprintf(\"Modify the `requires` definition in the configuration file %q to point to the correct path for the dependency %q\", parentFile, depFile),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n}\n\n// BadConfigFilterErr specifies no configs matched the configs filter\nfunc BadConfigFilterErr(filter []string) error {\n\tmsg := fmt.Sprintf(\"did not find any configs matching selection %v\", filter)\n\treturn sErrors.NewError(errors.New(msg),\n\t\t&proto.ActionableErr{\n\t\t\tMessage: msg,\n\t\t\tErrCode: proto.StatusCode_CONFIG_BAD_FILTER_ERR,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_CONFIG_CHECK_FILTER,\n\t\t\t\t\tAction:         \"Check that the arguments to the `-m` or `--module` flag are valid config names\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n}\n\n// ZeroConfigsParsedErr specifies that the config file is empty\nfunc ZeroConfigsParsedErr(file string) error {\n\tmsg := fmt.Sprintf(\"failed to get any valid configs from file %q\", file)\n\treturn sErrors.NewError(errors.New(msg),\n\t\t&proto.ActionableErr{\n\t\t\tMessage: msg,","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/errors/errors.go#L51-L87","documentation":"BadConfigFilterErr is thrown when a configs filter (e.g. `--profile`, module names, or `--config` selection) matched zero configurations in the parsed skaffold config set. It is a structured actionable error (code CONFIG_BAD_FILTER_ERR) with a suggestion to check the filter.","triggerScenarios":"Calling config loading with a selection filter (e.g. `skaffold dev --profile foo` or module selection) where no config in any file defines a matching name/profile.","commonSituations":"Typos in `--profile` or module names; renaming a named config or profile but running an old command from shell history or CI scripts.","solutions":["Check the filter values against `profiles:` and `metadata.name:` entries defined in your skaffold config files.","Run `skaffold config list` / inspect skaffold.yaml to confirm the profile or module name exists.","Remove or correct the filter flag if you intend to use the default config."],"exampleFix":"// before\nskaffold dev --profile prodction\n// after\nskaffold dev --profile production","handlingStrategy":"validation","validationCode":"grep -E '^\\s*- name:' skaffold.yaml   # list available profiles/modules\nskaffold dev --profile \"$P\" --dry-run 2>/dev/null || echo \"profile $P not found\"","typeGuard":null,"tryCatchPattern":"if err != nil {\n    var sErr *sErrors.Error\n    if errors.As(err, &sErr) && sErr.ErrCode == proto.StatusCode_CONFIG_BAD_FILTER_ERR {\n        log.Fatalf(\"filter %v matched nothing; check profiles/modules: %v\", filter, err)\n    }\n    return err\n}","preventionTips":["Keep profile/module names in a checked-in list and validate CLI flags in CI scripts against it.","Use shell completion for --profile to avoid typos.","After renaming a profile or config, grep scripts/CI for the old name."],"tags":["config","filter","cli-flag"],"backgroundTag":"config-filter-no-match","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"}