You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a generic class inherited from ValidationWebhook class which contains some shared functionality for multiple entities, it's being processed by the AssemblyLoader as if it was the final webhook. When resolving the entity type, it runs into an error "Value cannot be null. (Parameter 'name')".
To reproduce
Let's have a class like:
public class V1EntityValidator<TEntity> : ValidationWebhook<TEntity> where TEntity : CustomKubernetesEntity<V1Spec>
{
protected V1EntityValidator()
{
}
public override ValidationResult Create(TEntity entity, bool dryRun)
{
// do some basic validation
}
...
}
Let's have an inherited class like:
[ValidationWebhook(typeof(V1MyResource))]
public class V1MyResourceValidator : V1EntityValidator<V1MyResource>
{
}
Compile the project. The GenerateOperatorResources target fails with the following error:
An error occurred whiled executing Command: operator
Value cannot be null. (Parameter 'name')
Expected behavior
Compilation runs without an error and the operator resources get generated.
Screenshots
No response
Additional Context
I've prepared a Pull Request that fixes the issue, please see #816.
The text was updated successfully, but these errors were encountered:
Describe the bug
If there is a generic class inherited from ValidationWebhook class which contains some shared functionality for multiple entities, it's being processed by the AssemblyLoader as if it was the final webhook. When resolving the entity type, it runs into an error "Value cannot be null. (Parameter 'name')".
To reproduce
GenerateOperatorResources
target fails with the following error:Expected behavior
Compilation runs without an error and the operator resources get generated.
Screenshots
No response
Additional Context
I've prepared a Pull Request that fixes the issue, please see #816.
The text was updated successfully, but these errors were encountered: