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

[Bug]: korifi is flooding API server with unnecessary PATCH requests #3807

Open
c0d1ngm0nk3y opened this issue Feb 14, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@c0d1ngm0nk3y
Copy link
Contributor

c0d1ngm0nk3y commented Feb 14, 2025

What happened?

Korifi uses its own "high level reconciiler" that unlike controller runtime does PATCH requests if the resource did not change. This will be ignored in the storage layer, but the request is unnecessary and the storage layer has to perform a Get to check that the cached object is up-to-date.

To give some perspective: A single cf push results in nearly 200 PATCH requests that will be ignored by the storage layer.

What you expected to happen

If the client (korifi api) realizes that no changes are needed, no PATCH request is sent.

Acceptance Criteria

No unnecessary PATCH requests are sent to the storage layer just to be ignored there after getting the latest state and comparing it.

How to reproduce it (as minimally and precisely as possible)

Basically any api request will show this. A simple cf push results in many such calls.

Anything else we need to know?

The measuring is the tricky part. In case of etcd, the code in question has no leg message or event to check for.

In case of an extension api server, it can easily be spotted.

korifi code in question that does the (potential unnecessary) patch requests.

Environment

Revision of codebase: 0.14.0
Kubernetes version (use kubectl version):

client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.31.0
WARNING: version difference between client (1.29) and server (1.31) exceeds the supported minor version skew of +/-1

Cloud provider or hardware configuration: Kind
Others:

@c0d1ngm0nk3y c0d1ngm0nk3y added the bug Something isn't working label Feb 14, 2025
@github-project-automation github-project-automation bot moved this to 🧊 Icebox in Korifi - Backlog Feb 14, 2025
@georgethebeatle georgethebeatle moved this from 🧊 Icebox to 🇪🇺 To do in Korifi - Backlog Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🇪🇺 To do
Development

No branches or pull requests

1 participant