Skip to content

Add provider compatibility matrix generator - #539

Draft
nikatza wants to merge 1 commit into
mainfrom
provider-matrix-markers
Draft

Add provider compatibility matrix generator#539
nikatza wants to merge 1 commit into
mainfrom
provider-matrix-markers

Conversation

@nikatza

@nikatza nikatza commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Add a code generator under hack/provider-compatibility-matrix that statically analyzes provider packages to produce a Markdown compatibility matrix at docs/provider-compatibility.md.

The tool loads provider packages via go/packages, discovers XProvider interfaces from the provider root, checks which concrete types implement them, and AST-walks each EnsureX method to find apistatus.NewUnsupportedFieldError() calls. It follows same-package call chains to collect unsupported field paths, handling inline FieldViolation literals, slice-collected helpers, and fmt.Sprintf format verbs.

The rendered output is a Markdown table with per-resource rows and per-provider columns showing full (✓), partial (~), or unimplemented. Partial cells link to footnotes listing the unsupported spec fields. Resource names link into the API reference when a matching heading exists.

Split the existing docs Makefile target into api-reference and compatibility-matrix, with docs depending on both. Update the api-reference config to include AccessControlList.

@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label Sep 1, 2026
@hardikdr hardikdr added this to Roadmap Sep 1, 2026
Add a code generator under hack/provider-compatibility-matrix that
statically analyzes provider packages to produce a Markdown
compatibility matrix at docs/provider-compatibility.md.

The tool loads provider packages via go/packages, discovers XProvider
interfaces from the provider root, checks which concrete types
implement them, and AST-walks each EnsureX method to find
apistatus.NewUnsupportedFieldError() calls. It follows same-package
call chains to collect unsupported field paths, handling inline
FieldViolation literals, slice-collected helpers, and fmt.Sprintf
format verbs.

The rendered output is a Markdown table with per-resource rows and
per-provider columns showing full (✓), partial (~), or unimplemented.
Partial cells link to footnotes listing the unsupported spec fields.
Resource names link into the API reference when a matching heading
exists.

Split the existing docs Makefile target into api-reference and
compatibility-matrix, with docs depending on both. Update the
api-reference config to include AccessControlList.

Signed-off-by: Pujol <enric.pujol@sap.com>
@nikatza
nikatza force-pushed the provider-matrix-markers branch from dbee63b to d3fb490 Compare September 1, 2026 07:33
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix 64.04% (+64.04%) 🌟

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/build.go 0.00% (ø) 76 (+76) 0 76 (+76)
github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/main.go 0.00% (ø) 8 (+8) 0 8 (+8)
github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/parse.go 84.92% (+84.92%) 126 (+126) 107 (+107) 19 (+19) 🌟
github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/render.go 97.56% (+97.56%) 82 (+82) 80 (+80) 2 (+2) 🌟

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.

Changed unit test files

  • github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/parse_test.go
  • github.com/ironcore-dev/network-operator/hack/provider-compatibility-matrix/render_test.go

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants