konpyutaika / nifikop

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
https://konpyutaika.github.io/nifikop/
Apache License 2.0
122 stars 39 forks source link

Change NifiUser sync logic to reduce api calls on UserGroup endpoint #397

Closed juldrixx closed 3 months ago

juldrixx commented 4 months ago
Q A
Bug fix? no
New feature? no
API breaks? no
Deprecations? no
Related tickets -
License Apache 2.0

What's in this PR?

Update of the NifiUser sync logic to reduce the number of API call on the UserGroup endpoint.

Why?

Because if we have a lot of user or node, we will spam NiFi to retrieve the group information.

Additional context

Checklist

mh013370 commented 3 months ago

I have also noticed these endpoints in particular getting hammered while inspecting NiFi logs. This is a much needed change.

mh013370 commented 3 months ago

This looks fine on the surface. I just want to carefully walk through the logic to make sure there aren't unintended consequences. You've tested this, yeah?

juldrixx commented 3 months ago

This looks fine on the surface. I just want to carefully walk through the logic to make sure there aren't unintended consequences. You've tested this, yeah?

I tested it and it seems to good. But if you want to retry to be sure, you can 😁.

mh013370 commented 3 months ago

After review, i don't see anything glaringly incorrect about this.