Azure / azure-service-operator

Azure Service Operator allows you to create Azure resources using kubectl
https://azure.github.io/azure-service-operator/
MIT License
716 stars 194 forks source link

Detection of missing version-specific extension implementations #3986

Open theunrepentantgeek opened 4 months ago

theunrepentantgeek commented 4 months ago

Describe the current behavior

Some of our extensions need to be implemented on every version of a resource, or none at all.

For example, the genruntime.Defaulter interface was implemented for API version 2021-05-15 of documentdb.SqlRoleAssignment and therefore should also have been implemented for API version 2023-11-15 when that was imported.

Failing to implement that lead to some hairy errors that required considerable debugging.

Describe the improvement

I'm wondering if we can write a convention-test that checks all our resources to verify that if one version implements genruntime.Defaulter, all versions do? Can we generalize this to other interface implementations?