{"record":{"id":"4f0c8e3571f3b386","repo":"GoogleContainerTools/skaffold","slug":"statuscheck-config-connector-resources-fetch-err","errorCode":"STATUSCHECK_CONFIG_CONNECTOR_RESOURCES_FETCH_ERR","errorMessage":"could not fetch config connector resources: %w","messagePattern":"could not fetch config connector resources: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/kubernetes/status/status_check.go","lineNumber":220,"sourceCode":"\t\t\tresources = append(resources, d)\n\t\t\ts.seenResources.Add(d)\n\t\t}\n\n\t\tnewStandalonePods, err := getStandalonePods(ctx, client, n, s.labeller, getDeadline((s.deadlineSeconds)), s.tolerateFailures)\n\t\tif err != nil {\n\t\t\treturn proto.StatusCode_STATUSCHECK_STANDALONE_PODS_FETCH_ERR, fmt.Errorf(\"could not fetch standalone pods: %w\", err)\n\t\t}\n\t\tfor _, pods := range newStandalonePods {\n\t\t\tif s.seenResources.Contains(pods) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tresources = append(resources, pods)\n\t\t\ts.seenResources.Add(pods)\n\t\t}\n\n\t\tnewConfigConnectorResources, err := getConfigConnectorResources(client, dynClient, s.manifests, n, s.labeller, getDeadline(s.deadlineSeconds), s.tolerateFailures)\n\t\tif err != nil {\n\t\t\treturn proto.StatusCode_STATUSCHECK_CONFIG_CONNECTOR_RESOURCES_FETCH_ERR, fmt.Errorf(\"could not fetch config connector resources: %w\", err)\n\t\t}\n\t\tfor _, d := range newConfigConnectorResources {\n\t\t\tif s.seenResources.Contains(d) {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tresources = append(resources, d)\n\t\t\ts.seenResources.Add(d)\n\t\t}\n\n\t\tfor _, selector := range s.crSelectors {\n\t\t\tcustomResources, err := getCustomResources(client, dynClient, s.manifests, n, getDeadline(s.deadlineSeconds), s.tolerateFailures, selector)\n\t\t\tif err != nil {\n\t\t\t\treturn proto.StatusCode_STATUSCHECK_CUSTOM_RESOURCE_FETCH_ERR, fmt.Errorf(\"could not fetch custom resources: %w\", err)\n\t\t\t}\n\n\t\t\tfor _, d := range customResources {\n\t\t\t\tif s.seenResources.Contains(d) {\n\t\t\t\t\tcontinue","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/status/status_check.go#L202-L238","documentation":"statusCheck wraps failures from getConfigConnectorResources with STATUSCHECK_CONFIG_CONNECTOR_RESOURCES_FETCH_ERR. Notably, this specific error is raised before any cluster call: it comes from manifest.ManifestList.SelectResources(manifest.ConfigConnectorResourceSelector...) failing to parse/select resources from the rendered manifests.","triggerScenarios":"m.SelectResources(manifest.ConfigConnectorResourceSelector...) returns an error while selecting Config Connector (CNRM) resources from the manifest list — malformed/unparseable manifest YAML, or a selector/predicate error on GVK filtering.","commonSituations":"Manifests containing invalid or partially-rendered YAML; annotation-based resource injection producing duplicate keys; using Config Connector resources with a manifest pipeline that fails schema-free selection; hand-edited manifests with wrong GVK fields.","solutions":["Inspect the rendered manifests ('skaffold render') and validate YAML with 'kubectl apply --dry-run=client' or yamllint","Fix malformed manifests referenced by skaffold.yaml (indentation, duplicate keys, bad GVK)","Update skaffold if the ConfigConnectorResourceSelector GVK list no longer matches your CNRM version","Isolate the failing manifest by bisecting the manifest list","Re-run the deploy+status check after manifest fixes"],"exampleFix":"// before: malformed manifest (missing GVK)\n//   apiVersion: cnrm.cloud.google.com/v1beta1\n//   kind: \"\"\n// after:\n//   apiVersion: cnrm.cloud.google.com/v1beta1\n//   kind: SQLInstance\n//   metadata: { name: my-db }","handlingStrategy":"validation","validationCode":"// validate manifests before deploy\nconst rendered = execSync('skaffold render --stdout').toString();\ntry { YAML.parseAllDocuments(rendered, { uniqueKeys: true }); }\ncatch (e) { throw new Error('manifest parse error will break config-connector selection: ' + e.message); }","typeGuard":null,"tryCatchPattern":"try {\n  await statusCheck();\n} catch (err) {\n  if (err.message.includes('could not fetch config connector resources')) {\n    // manifest-side failure: re-render and lint manifests\n  }\n  throw err;\n}","preventionTips":["Run skaffold render + YAML lint in CI before deploy","Keep CNRM resource GVKs aligned with your skaffold version","Avoid hand-editing rendered manifests","Use uniqueKeys in YAML parsing to catch duplicate keys early"],"tags":["kubernetes","config-connector","manifest","yaml"],"backgroundTag":"manifest-selection-failed","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"}