{"record":{"id":"053799b3a4a7da25","repo":"GoogleContainerTools/skaffold","slug":"could-not-fetch-config-connector-resources-w","errorCode":null,"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":308,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not fetch standalone pods: %w\", err)\n\t}\n\tif len(pods) == 0 {\n\t\treturn result, nil\n\t}\n\tpd := diag.New([]string{ns}).\n\t\tWithLabel(label.RunIDLabel, l.Labels()[label.RunIDLabel]).\n\t\tWithValidators([]validator.Validator{validator.NewPodValidator(client, selector)})\n\tresult = append(result, resource.NewResource(string(resource.ResourceTypes.StandalonePods), resource.ResourceTypes.StandalonePods, ns, deadlineDuration, tolerateFailures).WithValidator(pd))\n\n\treturn result, nil\n}\n\nfunc getConfigConnectorResources(client kubernetes.Interface, dynClient dynamic.Interface, m manifest.ManifestList, ns string, l *label.DefaultLabeller, deadlineDuration time.Duration, tolerateFailures bool) ([]*resource.Resource, error) {\n\tvar result []*resource.Resource\n\tuRes, err := m.SelectResources(manifest.ConfigConnectorResourceSelector...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not fetch config connector resources: %w\", err)\n\t}\n\tfor _, r := range uRes {\n\t\tresName := r.GroupVersionKind().String()\n\t\tif r.GetName() != \"\" {\n\t\t\tresName = fmt.Sprintf(\"%s, Name=%s\", resName, r.GetName())\n\t\t}\n\t\tpd := diag.New([]string{ns}).\n\t\t\tWithLabel(label.RunIDLabel, l.Labels()[label.RunIDLabel]).\n\t\t\tWithValidators([]validator.Validator{validator.NewConfigConnectorValidator(client, dynClient, r.GroupVersionKind())})\n\t\tresult = append(result, resource.NewResource(resName, resource.ResourceTypes.ConfigConnector, ns, deadlineDuration, tolerateFailures).WithValidator(pd))\n\t}\n\n\treturn result, nil\n}\n\nfunc getCustomResources(client kubernetes.Interface, dynClient dynamic.Interface, m manifest.ManifestList, ns string, deadlineDuration time.Duration, tolerateFailures bool, selector manifest.GroupKindSelector) ([]*resource.Resource, error) {\n\tvar result []*resource.Resource\n\tuRes, err := m.SelectResources(selector)","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/kubernetes/status/status_check.go#L290-L326","documentation":"getConfigConnectorResources wraps any error from selecting Config Connector resources out of the rendered manifest list with this message. This is a manifest-selection error, not a cluster API error — the failure happens in SelectResources before any client call.","triggerScenarios":"manifest.ManifestList.SelectResources(manifest.ConfigConnectorResourceSelector...) returns an error: manifests fail to unmarshal/parse, or the GVK-based predicate rejects/mis-parses a resource during filtering.","commonSituations":"Rendered manifests with duplicate YAML keys or invalid types; CRD-like CNRM resources with unexpected fields; annotation injection duplicating entries; upgrading skaffold while manifests use deprecated fields.","solutions":["Render and lint manifests: 'skaffold render' then yamllint / 'kubectl apply --dry-run=client -f -'","Fix parse errors in the offending YAML (indentation, duplicate keys, bad types)","Confirm Config Connector resource GVKs match manifest.ConfigConnectorResourceSelector for your CNRM version","Bisect the manifest list to isolate the failing document","Upgrade/downgrade skaffold to align selector GVKs with your manifests"],"exampleFix":"// before: duplicate key breaks YAML parsing\n//   metadata:\n//     name: a\n//     name: a2\n// after:\n//   metadata:\n//     name: a","handlingStrategy":"validation","validationCode":"const docs = YAML.parseAllDocuments(renderedManifests, { uniqueKeys: true });\nfor (const d of docs) {\n  if (d.errors.length) throw new Error('YAML errors will fail config-connector selection: ' + d.errors);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await statusCheck();\n} catch (err) {\n  if (err.message.includes('could not fetch config connector resources')) {\n    // parse/selection failure in manifests — re-render and lint\n  }\n  throw err;\n}","preventionTips":["Lint rendered manifests (yamllint with unique-keys) in CI","Pin skaffold + Config Connector versions compatible with your CRD GVKs","Catch duplicate keys at render time","Test the full render->deploy->status loop on a scratch namespace"],"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"}