I'm getting:
$ opm alpha render-template basic
Error: creating template by type: unknown template schema: basic
In the code, it looks like GetSupportedTypes() is returning the last portion of the schema:
|
types = append(types, schema[strings.LastIndex(schema, ".")+1:]) |
But then the factory is just returning the schema, which is the full path rather than just the last portion:
|
r.factories[factory.Schema()] = factory |
|
const schema string = "olm.template.basic" |
So then GetTemplateByType() is trying to index by the full path, which doesn't match the shorter type:
|
factory, exists := r.factories[schema] |
Perhaps this PR introduced the regression?
I'm getting:
In the code, it looks like
GetSupportedTypes()is returning the last portion of the schema:operator-registry/alpha/template/registry.go
Line 121 in 783862a
But then the factory is just returning the schema, which is the full path rather than just the last portion:
operator-registry/alpha/template/registry.go
Line 68 in 783862a
operator-registry/alpha/template/basic/basic.go
Line 16 in 783862a
So then
GetTemplateByType()is trying to index by the full path, which doesn't match the shorter type:operator-registry/alpha/template/registry.go
Line 81 in 783862a
Perhaps this PR introduced the regression?