fix #43819 - partial import fails to overwrite existing groups#43924
Merged
vmuzikar merged 2 commits intokeycloak:mainfrom Nov 25, 2025
Merged
Conversation
4be2b3d to
57bb318
Compare
Contributor
|
We could consider using Rather than individually flushing with each delete. |
d985b88 to
c2a1767
Compare
Contributor
|
@MartinNowak updated the pr with a test and more general fix. Should be good for inclusion now. |
- when removal is delayed until insertion of the newly imported group this causes a duplicate key constrain violation (`Key (realm_id, parent_group, name)`) - fixed by flushing group removals Signed-off-by: Martin Nowak <code@dawg.eu>
Signed-off-by: Steve Hawkins <shawkins@redhat.com> # Conflicts: # services/src/main/java/org/keycloak/partialimport/PartialImportManager.java
c2a1767 to
dafb95f
Compare
Jonaka3385
pushed a commit
to Jonaka3385/keycloak
that referenced
this pull request
Nov 26, 2025
keycloak#43924) * fix keycloak#43819 - partial import fails to overwrite existing groups - when removal is delayed until insertion of the newly imported group this causes a duplicate key constrain violation (`Key (realm_id, parent_group, name)`) - fixed by flushing group removals Signed-off-by: Martin Nowak <code@dawg.eu> * adding a test and using a general fix Signed-off-by: Steve Hawkins <shawkins@redhat.com> # Conflicts: # services/src/main/java/org/keycloak/partialimport/PartialImportManager.java --------- Signed-off-by: Martin Nowak <code@dawg.eu> Signed-off-by: Steve Hawkins <shawkins@redhat.com> Co-authored-by: Steve Hawkins <shawkins@redhat.com>
Jonaka3385
pushed a commit
to Jonaka3385/keycloak
that referenced
this pull request
Nov 26, 2025
# This is the 1st commit message: Fix race condition in SAML DocumentBuilderFactory creation Closes keycloak#44438 Signed-off-by: martins <martin.soderstrom@aurorainnovation.com> Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com> Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com> # The commit message keycloak#2 will be skipped: # fix keycloak#43819 - partial import fails to overwrite existing groups (keycloak#43924) # # * fix keycloak#43819 - partial import fails to overwrite existing groups # # - when removal is delayed until insertion of the newly imported group # this causes a duplicate key constrain violation (`Key (realm_id, parent_group, name)`) # - fixed by flushing group removals # # Signed-off-by: Martin Nowak <code@dawg.eu> # # * adding a test and using a general fix # # Signed-off-by: Steve Hawkins <shawkins@redhat.com> # # Conflicts: # # services/src/main/java/org/keycloak/partialimport/PartialImportManager.java # # --------- # # Signed-off-by: Martin Nowak <code@dawg.eu> # Signed-off-by: Steve Hawkins <shawkins@redhat.com> # Co-authored-by: Steve Hawkins <shawkins@redhat.com> # The commit message keycloak#3 will be skipped: # Always allow to setup JWKS URL in oidc idp # # Closes keycloak#44217 # # Signed-off-by: Giuseppe Graziano <g.graziano94@gmail.com> # The commit message keycloak#4 will be skipped: # Update translation files (keycloak#44444) # # Updated by "Cleanup translation files" hook in Weblate. # # Signed-off-by: Hosted Weblate <hosted@weblate.org> # The commit message keycloak#5 will be skipped: # Promote MDC Logging Feature to Supported State # # Closes keycloak#41205 # # Signed-off-by: Ruchika Jha <ruchika@li-0551ffcc-341d-11b2-a85c-a28deda416be.ibm.com> # Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com> # Co-authored-by: Ruchika Jha <ruchika@li-0551ffcc-341d-11b2-a85c-a28deda416be.ibm.com> # Co-authored-by: Alexander Schwartz <alexander.schwartz@ibm.com> # The commit message keycloak#6 will be skipped: # Stop looking up client in ClientAssertionState to prevent lookup by clientId in federated client authentication (keycloak#44448) # # Closes keycloak#44447 # # Signed-off-by: stianst <stianst@gmail.com> # The commit message keycloak#7 will be skipped: # When joining a group, don't rely on cached values if user has already been updated # # Closes keycloak#44480 # # Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key (realm_id, parent_group, name))It seems that even when testing with
KC_TEST_DATABASE=postgresthe realm provider is not actually used by the admin tests.keycloak/tests/base/src/test/java/org/keycloak/tests/admin/partialimport/PartialImportGroupTest.java
Lines 45 to 49 in 2fc5419
fixes #43819