{"record":{"id":"cb506416921e3de6","repo":"kubernetes/kops","slug":"found-no-matching-assets-for-expr-q","errorCode":null,"errorMessage":"found no matching assets for expr: %q","messagePattern":"found no matching assets for expr: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/assetstore.go","lineNumber":125,"sourceCode":"\tmatches := make(map[string]Resource)\n\n\tklog.Infof(\"Matching assets for %q:\", expr.String())\n\tfor _, a := range a.assets {\n\t\tif expr.MatchString(a.AssetPath) {\n\t\t\tklog.Infof(\"    %s\", a.AssetPath)\n\t\t\tmatches[a.Key] = &assetResource{Asset: a}\n\t\t}\n\t}\n\n\treturn matches\n}\n\nfunc (a *AssetStore) FindMatch(expr *regexp.Regexp) (name string, res Resource, err error) {\n\tmatches := a.FindMatches(expr)\n\n\tswitch len(matches) {\n\tcase 0:\n\t\treturn \"\", nil, fmt.Errorf(\"found no matching assets for expr: %q\", expr.String())\n\tcase 1:\n\t\tvar n string\n\t\tvar r Resource\n\t\tfor k, v := range matches {\n\t\t\tklog.Infof(\"Found single matching asset for expr %q: %q\", expr.String(), k)\n\t\t\tn = k\n\t\t\tr = v\n\t\t}\n\t\treturn n, r, nil\n\tdefault:\n\t\treturn \"\", nil, fmt.Errorf(\"found multiple matching assets for expr: %q\", expr.String())\n\t}\n}\n\nfunc (a *AssetStore) Find(key string, assetPath string) (Resource, error) {\n\tvar matches []*asset\n\tfor _, asset := range a.assets {\n\t\tif asset.Key != key {","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/assetstore.go#L107-L143","documentation":"AssetStore.FindMatch ran the regexp over every registered asset and got zero hits — the requested asset was never added to the store (wrong key in the spec, or the file is missing from the kops binary/image assets).","triggerScenarios":"Thrown at upup/pkg/fi/assetstore.go:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the asset expression/key against the files actually bundled with your kops build","Rebuild or reinstall kOps so the expected asset files are embedded","Fix the referencing spec field so it names an asset that exists"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}