Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neonvm-controller: Use JSON patch to update status #1102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sharnoff
Copy link
Member

@sharnoff sharnoff commented Oct 10, 2024

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?

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.

Co-authored-by: Artur Gadelshin <[email protected]>
Copy link

github-actions bot commented Oct 10, 2024

Merging this branch will increase overall coverage

Impacted Packages Coverage Δ 🤖
github.com/neondatabase/autoscaling/pkg/neonvm/controllers 11.74% (+0.23%) 👍

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/neondatabase/autoscaling/pkg/neonvm/controllers/vm_controller.go 25.64% (+0.41%) 667 (+5) 171 (+4) 496 (+1) 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

HTML Report

Click to open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant