Skip to content

Conversation

@adhurjaty
Copy link

@adhurjaty adhurjaty commented Mar 27, 2025

What this PR does / why we need it:

As the number of clients in our realms increases, we noticed that the time to run the configuration job increased as well, even though we were omitting the clients from the config JSON. We noticed that the RoleImportService step was taking a much longer time than the other steps.

This change updates the RealmCompositeRepository to instead get the realm composites and query the clients based on that, instead of getting all the clients and checking against the RoleResource to see if it is a composite. This results in a much faster execution of the role import step.

This change updates the ClientCompositeImport services to more efficiently remove composites that need to be removed. The current method gets all clients and excludes config import client composites, then gets the intersection between that and the existing client composites. The proposed change simply retrieves the existing client composites and excludes the config client composites

Current

Screenshot 2025-04-21 at 7 56 23 AM

Proposed

Screenshot 2025-04-21 at 7 56 30 AM

Special notes for your reviewer:

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@sonarqubecloud
Copy link

@adhurjaty adhurjaty changed the title Prevent querying all clients on searching matching client composites Prevent querying all clients in client composite import Apr 21, 2025
@AssahBismarkabah AssahBismarkabah added enhancement java Pull requests that update Java code pr contribution welcome A PR contribution is welcome. labels Sep 18, 2025
@adhurjaty adhurjaty force-pushed the improve-client-composite-import-runtime branch from 8692fb4 to 3ec707e Compare September 23, 2025 16:54
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement java Pull requests that update Java code pr contribution welcome A PR contribution is welcome.

Projects

Development

Successfully merging this pull request may close these issues.

2 participants