Notes for Reviewers:
When the error is nil in errors.Wrap the final out of errors.Wrap is nil. This issue existed in v0.0.10 as well, but was caught in the next step failing to get token to initialize the kv client. In v0.0.11 this became more evident as we also check if the vault url is not nil. So by wrapping the nil error and returning from getVaultURL() the err is nil (when it's not) and the vault url is nil because there was an error. Since that check was again wrapping an error which was nil, kubelet gets nil error and assumes a success.
Reason for Change:
errors.Wrap
is always nil because it's the wrong var.Issue Fixed:
Fixes https://github.com/Azure/kubernetes-keyvault-flexvol/issues/115
Notes for Reviewers: When the error is nil in
errors.Wrap
the final out oferrors.Wrap
is nil. This issue existed inv0.0.10
as well, but was caught in the next step failing to get token to initialize the kv client. Inv0.0.11
this became more evident as we also check if the vault url is not nil. So by wrapping the nil error and returning fromgetVaultURL()
the err is nil (when it's not) and the vault url is nil because there was an error. Since that check was again wrapping an error which was nil, kubelet gets nil error and assumes a success.