Add provider implementation matrix - #261
Conversation
729ef5a to
66addaa
Compare
94693fc to
49722b9
Compare
49722b9 to
8bbf68c
Compare
Add a Go tool (hack/generate-provider-matrix.go) that produces a Markdown compatibility matrix showing which core API types each provider implements. How it works: - Uses reflect.Type.Implements() to test each provider against the provider.*Provider interfaces defined in internal/provider/ - Self-validates by parsing Go AST of the provider package to ensure the hardcoded interfaceMap stays in sync with source interfaces - Discovers provider-specific types (config extensions and standalone CRDs) by scanning provider API directories for Register*Dependency calls and SchemeBuilder.Register calls - Resolves interface names to Kubernetes Kind names by correlating core _types.go filenames with Register*Dependency function names, then validating against the runtime scheme - Writes docs/provider-compatibility.md (full matrix) and updates a summary table in README.md between sentinel markers The new `make provider-matrix` target is also wired as a dependency of `make docs`, so the matrix is always regenerated with the API reference docs.
8bbf68c to
b93e76e
Compare
There was a problem hiding this comment.
There is no navigation entry for this page. How would I navigate to it from the Documentation? 😅
|
|
||
| // interfaceMap maps provider interface names to their reflect.Type. | ||
| // generate-provider-matrix fails if it finds a different set of Provider interfaces in the source code. | ||
| var interfaceMap = map[string]reflect.Type{ |
There was a problem hiding this comment.
The reflect.Type returned by reflect.TypeFor has a Name() func, couldn't we just use that instead of having to define the string names ourselves? If so, this could just become a list, no?
| exts, err := scanConfigExtensions(prov.apiDir) | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "Warning: failed to scan config configurations for %s: %v\n", prov.name, err) | ||
| } | ||
| configurations[prov.name] = exts | ||
|
|
||
| standalone, err := scanStandaloneTypes(prov.apiDir) | ||
| if err != nil { | ||
| fmt.Fprintf(os.Stderr, "Warning: failed to scan standalone types for %s: %v\n", prov.name, err) | ||
| } | ||
| standaloneTypes[prov.name] = standalone | ||
| } |
There was a problem hiding this comment.
Are we sure we want to list the provider configurations and standalone types in this documentation page? I thought it was just concerned with the compatibility of the core types with the different providers.
12313f1 to
e1bdab5
Compare
Merging this branch will not change overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
4ba99c5 to
bc42aa6
Compare
- remove hack script - remove entrypoint from Makefile - add skill for LLM generate compatibility matrix - improve table format to include partial support Co-authored-by: Claude <claude@anthropic.com> Signed-off-by: Robert Gildein <rgildein@users.noreply.github.com>
bc42aa6 to
b580f5b
Compare
Generated with Claude Code assistance