{"record":{"id":"d3a78d002e4975cd","repo":"GoogleContainerTools/skaffold","slug":"config-multi-import-profile-conflict-err","errorCode":"CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR","errorMessage":"config %q defined in file %q imported multiple times with different set of profiles","messagePattern":"config %q defined in file %q imported multiple times with different set of profiles","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/schema/errors/errors.go","lineNumber":176,"sourceCode":"func 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,\n\t\t\tErrCode: proto.StatusCode_CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR,\n\t\t\tSuggestions: []*proto.Suggestion{\n\t\t\t\t{\n\t\t\t\t\tSuggestionCode: proto.SuggestionCode_CONFIG_CHECK_DEPENDENCY_PROFILES_SELECTION,\n\t\t\t\t\tAction:         \"Check that all occurrences of the specified config dependency use the same set of profiles; refer to the documentation on how to author config dependencies: https://skaffold.dev/docs/design/config/#configuration-dependencies\",\n\t\t\t\t},\n\t\t\t},\n\t\t})\n}\n\n// ConfigUnknownAPIVersionErr specifies that the config API version doesn't match any known versions.\nfunc ConfigUnknownAPIVersionErr(version string) error {\n\tmsg := fmt.Sprintf(\"unknown skaffold config API version %q\", version)\n\treturn sErrors.NewError(errors.New(msg),\n\t\t&proto.ActionableErr{\n\t\t\tMessage: msg,","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/schema/errors/errors.go#L158-L194","documentation":"ConfigProfileConflictErr fires when the same named config (a config dependency) is imported more than once but with different profile activations, so the imported config would resolve inconsistently. Code CONFIG_MULTI_IMPORT_PROFILE_CONFLICT_ERR, suggesting checking dependency profile selection.","triggerScenarios":"Multiple configs declare dependencies (`requires:`) on the same config name but activate different profiles of it; during dependency resolution the conflicting profile sets are detected.","commonSituations":"In multi-module monorepos, two services both require a shared base config but one activates `profiles: [staging]` while the other activates `profiles: [prod]` for the same dependency.","solutions":["Align the profile selection for the shared dependency across all `requires:` declarations that import it.","Remove the profile activation from the dependency and select profiles only at the top-level invocation.","Duplicate the dependency config under distinct names if genuinely divergent profile sets are needed."],"exampleFix":"// before: service-a/skaffold.yaml\nrequires:\n  - path: ../base\n    profiles: [staging]\n// service-b/skaffold.yaml\nrequires:\n  - path: ../base\n    profiles: [prod]\n// after: both use the same profiles\nrequires:\n  - path: ../base\n    profiles: [staging]","handlingStrategy":"validation","validationCode":"# ensure every `requires:` on the same dependency activates the same profiles\ngrep -A3 'requires:' */skaffold.yaml | grep -B1 -A2 'path: ../base'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize dependency profile activation: select profiles only at the top-level command, not per import.","Standardize one profile set for shared base configs across all consuming modules.","Review `requires:` blocks in code review whenever a new module is added to the monorepo."],"tags":["config","profiles","dependencies"],"backgroundTag":"config-import-profile-conflict","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"}