{"record":{"id":"214c9a97d439b3af","repo":"GoogleContainerTools/skaffold","slug":"could-not-expand-the-glob-raw-manifests-w","errorCode":null,"errorMessage":"could not expand the glob raw manifests: %w","messagePattern":"could not expand the glob raw manifests: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/render/generate/generate.go","lineNumber":125,"sourceCode":"\tif len(urlManifests) != 0 {\n\t\tpaths, err := manifest.DownloadFromURL(urlManifests)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tlist = append(list, paths...)\n\t}\n\treturn list, nil\n}\n\n// Generate parses the config resources from the paths in .Generate.Manifests. This path can be the path to raw manifest,\n// kustomize manifests, helm charts or kpt function configs. All should be file-watched.\nfunc (g Generator) Generate(ctx context.Context, out io.Writer) (manifest.ManifestList, error) {\n\tvar manifests manifest.ManifestList\n\n\t// Generate Raw Manifests\n\tsourceManifests, err := resolveRemoteAndLocal(g.config.RawK8s, g.workingDir)\n\tif err != nil {\n\t\tevent.DeployInfoEvent(fmt.Errorf(\"could not expand the glob raw manifests: %w\", err))\n\t\treturn nil, err\n\t}\n\n\tfor _, nkPath := range sourceManifests {\n\t\tif !kubernetes.HasKubernetesFileExtension(nkPath) {\n\t\t\tif !stringslice.Contains(g.config.RawK8s, nkPath) {\n\t\t\t\tlog.Entry(ctx).Infof(\"refusing to deploy/delete non {json, yaml} file %s\", nkPath)\n\t\t\t\tlog.Entry(ctx).Info(\"If you still wish to deploy this file, please specify it directly, outside a glob pattern.\")\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\t\tmanifestFileContent, err := os.ReadFile(nkPath)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tmanifests.Append(manifestFileContent)\n\t}\n","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/render/generate/generate.go#L107-L143","documentation":"Generate wraps resolveRemoteAndLocal failures: before returning it emits a DeployInfoEvent carrying 'could not expand the glob raw manifests'. It is the top-level signal that expanding the rawK8s globs (local paths, gs:// or http URLs) failed during render generation.","triggerScenarios":"Calling Generator.Generate (via skaffold render/dev/deploy) where rawK8s contains a glob that matches nothing, points outside the working dir, or whose remote download failed — resolveRemoteAndLocal returns err and this event fires.","commonSituations":"Typo in a rawK8s glob pattern; manifests directory deleted or wrong relative path (workingDir mismatch); missing file-extension filter causing path checks to fail; referenced remote manifest unreachable.","solutions":["Check every rawK8s path/glob resolves from the skaffold.yaml directory: ls the pattern yourself","Fix relative paths or set the correct working dir when invoking skaffold","Ensure matched files have Kubernetes extensions (.yaml/.yml/.json)","Inspect the emitted DeployInfoEvent/underlying error for the root cause (GCS vs local glob)"],"exampleFix":"// before\nrawK8s:\n  - ./k8s/*.yamml   # typo\n// after\nrawK8s:\n  - ./k8s/*.yaml","handlingStrategy":"validation","validationCode":"for p in $(yq '.render.generate.rawK8s[]' skaffold.yaml); do ls $p || echo \"unresolvable: $p\"; done","typeGuard":null,"tryCatchPattern":"manifests, err := gen.Generate(ctx, out)\nif err != nil {\n    event.Subscribe(func(e event.DeployInfoEvent) { log.Printf(\"generate issue: %v\", e.Err) })\n}","preventionTips":["Test every rawK8s glob from the skaffold.yaml directory with ls before committing","Use absolute paths or verify the invocation workingDir","Ensure matched files use .yaml/.yml/.json extensions"],"tags":["glob","manifests","path-resolution","render"],"backgroundTag":"manifest-glob-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"}