Non-nil default AzureMachine spec.diagnostics breaks v1alpha4 -> v1beta1 upgrade test #2952
Labels
kind/bug
Categorizes issue or PR as related to a bug.
kind/failing-test
Categorizes issue or PR as related to a consistently or frequently failing test.
/kind bug
/kind failing-test
What steps did you take and what happened:
The capz-periodic-apiversion-upgrade-main test has been failing consistently the past couple of days (example), timing out waiting for the cluster to be deleted. The capz-controller-manager logs show a few instances of this error:
What did you expect to happen:
Anything else you would like to add:
It looks like the changes in #2528 are responsible for the new failures. I think the issue is that a v1alpha4 AzureMachine will be created with an empty
spec.diagnostics
since that field is doesn't exist there, but the default value added by the v1beta1 webhook is not empty and the validating webhook enforces thatspec.diagnostics
is immutable.I was able to reproduce the error locally and after removing the defaulting here, the test passes:
cluster-api-provider-azure/api/v1beta1/azuremachine_default.go
Line 127 in c1b8d85
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: