Closed akutz closed 3 weeks ago
/ok-to-test
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: akutz, bryanv, divyenpatel
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it:
This patch fixes a possible race condition that occurs when using patch to update the volumes list in a VM Op VirtualMachine. It is possible with a vanilla patch that in between calculating and applying the patch the original object changed.
CRDs cannot use the strategic merge strategy, so instead this fix switches to an optimistic merge, which acts like update and refuses to make changes if the object has changed, but unlike update, does not drop fields.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged):This fixes an internal bug blocking a vSphere Kubernetes Release. Please find us in Slack.
Testing done:
Special notes for your reviewer:
Ideally we would use
StrategicMergeFrom
, but it does not support CRDs.Release note: