The search operation of the user resource of the Kelvin API service is inefficient and slow, when the search is not narrowed down to one OU. It then iterates over all OUs, searching for the queries user objects. This requires one UDM REST API query per OU. When there are lots of OUs this takes a lot of time. Make the user resource search operation more efficient.
The user search is now done using only one UDM REST API query. Even in small installations it is now at least 4 times faster. The logging code was improved to additionally. It now detects when the FastAPI server ist started from the command line (when developing) and adds a console logger. I accidentally commited directly to feature/kelvin, instead of a feature branch. If this impedes a release, it must be reverted. Sorry. [feature/kelvin] 2f081a11d Bug #51813: also log to stderr when started from a terminal [feature/kelvin] 38b25be70 Bug #51813: find all matching users with one lookup
The code was moved to git branch dtroeder/51828_reuse_exam_users_kelvin as it was in the way of a release.
Looks like we didn't make a release in the meantime and the code stayed in features/kelvin. I added the changelog entry that was forgotten for the 1.1.2 release: [feature/kelvin 943fe7e41] Bug #51813: add changelog entry for previous release 1.1.2
QA -> All OK -> build & Upload to testapp center Code - the amount of calls to the udm rest api is significantly reduced - code looks good - loglevel is set to debug, if started from terminal The tests are green (or rather flaky as before). To test the increase of speed, I created four more schools and compared the runtime of test_route_user before and after the patch. After the patch the code executed about a minute faster. Changelog -> OK
The Docker image could not be built, because the linters found problems. [feature/kelvin 3ff9e8577] Bug #51813: fix build (make linters happy) [feature/kelvin e05cf254f] Bug #51813: bump version to 1.2.0 The version was raised to "1.2.0" and the image built. REPOSITORY TAG IMAGE ID CREATED SIZE docker-upload.software-univention.de/ucsschool-kelvin-rest-api 1.2.0 10b9749ab7ba 35 seconds ago 390MB
QA -> All OK -> VERIFY Tests are passing -> OK Code (code formatting) -> OK New version 1.2.0 in testapp center -> OK installed from testapp center -> OK
A Kelvin API app with the changes in this bug has been published.