Skip to content

Add provider implementation matrix - #261

Draft
nikatza wants to merge 4 commits into
mainfrom
compatibility-matrix
Draft

Add provider implementation matrix#261
nikatza wants to merge 4 commits into
mainfrom
compatibility-matrix

Conversation

@nikatza

@nikatza nikatza commented Mar 26, 2026

Copy link
Copy Markdown
Contributor
  • Add Go script to generate compatibility matrix
  • Add make target 'provider-matrix'
  • Update README with provider implementation table
  • Update go-makefile-maker and regenerate configs

Generated with Claude Code assistance

@nikatza
nikatza force-pushed the compatibility-matrix branch 5 times, most recently from 729ef5a to 66addaa Compare March 26, 2026 16:11
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Mar 27, 2026
@hardikdr hardikdr added this to Roadmap Mar 27, 2026
@nikatza
nikatza force-pushed the compatibility-matrix branch 12 times, most recently from 94693fc to 49722b9 Compare March 27, 2026 15:31
@nikatza
nikatza marked this pull request as ready for review March 27, 2026 15:32
@nikatza
nikatza requested a review from a team March 27, 2026 15:32
@nikatza
nikatza force-pushed the compatibility-matrix branch from 49722b9 to 8bbf68c Compare March 27, 2026 16:06
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.
@nikatza
nikatza force-pushed the compatibility-matrix branch from 8bbf68c to b93e76e Compare March 27, 2026 16:07
Comment thread README.md Outdated
Comment thread docs/provider-compatibility.md
Comment thread docs/provider-compatibility.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no navigation entry for this page. How would I navigate to it from the Documentation? 😅

Comment thread hack/generate-provider-matrix.go Outdated

// 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{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread hack/generate-provider-matrix.go Outdated
Comment on lines +142 to +153
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
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread hack/generate-provider-matrix.go Outdated
Comment thread hack/generate-provider-matrix.go Outdated
Comment thread hack/generate-provider-matrix.go Outdated
Comment thread hack/generate-provider-matrix.go Outdated
@github-actions

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/hack 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/hack/generate-provider-matrix.go 0.00% (ø) 520 (+520) 0 520 (+520)

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.

@rgildein
rgildein force-pushed the compatibility-matrix branch from 4ba99c5 to bc42aa6 Compare August 21, 2026 10:15
@github-actions github-actions Bot added size/XL and removed size/XXL labels Aug 21, 2026
- 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>
@rgildein
rgildein force-pushed the compatibility-matrix branch from bc42aa6 to b580f5b Compare August 21, 2026 10:20
@github-actions github-actions Bot added size/L and removed size/XL labels Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/L

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants