neonvm-controller: Use JSON patch to update status #1102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The controller's final status update often fails due to conflict. This should be totally avoidable, if we switch to patching instead of trying to
Update()
with a potentially stale VM object.Extracted this from #1009, modified to use JSON patch instead merge patch, as it means we don't have to do an extra
Get()
before updating the status.Notes for review: When combined with #1103, I think we can potentially cause some consistency issues — specifically, we've previously seen that the controller can sometimes operate on out-of-date VM objects, which normally would fail to update the status because they're outdated, but this would allow that to continue.
I'm not sure how big of an issue that is... WDYT?