Skip to content
New issue

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

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

Already on GitHub? # to your account

Prevent empty Patch updates #3245

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Prevent empty Patch updates #3245

merged 1 commit into from
Jan 24, 2025

Conversation

aruiz14
Copy link
Contributor

@aruiz14 aruiz14 commented Jan 23, 2025

Refers to #3163

By adding additional logging to the BundleReconciler, I realized that (in my experiment), every operation was taking ~2.5s, and most of it was on the updateStatus function. It seems that the client implementation will perform the call besides producing an empty JSON patch (which BTW is correct in my opinion).

In order to prevent those spurious requests, we need to skip calling Patch(). This can be done at the cost of generating the diff twice, but it's still worth it.

@aruiz14
Copy link
Contributor Author

aruiz14 commented Jan 24, 2025

@kkaempf this PR targets main, so it should have a v2.11 milestone, right? I've created a backport issue for 2.10 and set the v2.10.3 milestone there.

@aruiz14 aruiz14 merged commit a2f9cd9 into rancher:main Jan 24, 2025
12 checks passed
@aruiz14 aruiz14 deleted the skip-empty-patch branch January 24, 2025 15:23
aruiz14 added a commit to aruiz14/fleet that referenced this pull request Jan 24, 2025
aruiz14 added a commit to aruiz14/fleet that referenced this pull request Jan 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants