Skip to content

Conversation

zmotso
Copy link
Member

@zmotso zmotso commented Oct 16, 2024

Pull Request Template

Description

Problem:
If we delete the subgroup before deleting the resources that contain this subgroup
(Example: KeycloakRealmGroup.spec.subGroup/KeycloakRealmUser.spec.groups) deletion of KeycloakRealmGroup/KeycloakRealmUser blocks with an error. This happens because we are syncing KeycloakRealmUser/KeycloakRealmGroup before deletion, and syncing can't be processed without a subgroup.
Solution:
Moved deletion of KeycloakRealmUser/KeycloakRealmGroup before syncing. We don't need to sync objects that are marked for deletion.

Fixes #95

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Integration tests
  • Manual testing

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • [ x I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Pull Request contain one commit. I squash my commits

Problem:
If we delete the subgroup before deleting the resources
that contain this subgroup
(Example: KeycloakRealmGroup.spec.subGroup/KeycloakRealmUser.spec.groups)
deletion of KeycloakRealmGroup/KeycloakRealmUser blocks with an error.
This happens because we are syncing KeycloakRealmUser/KeycloakRealmGroup
before deletion, and syncing can't be processed without a subgroup.
Solution:
Moved deletion of KeycloakRealmUser/KeycloakRealmGroup before syncing.
We don't need to sync objects that are marked for deletion.
@zmotso zmotso added the bug Something isn't working label Oct 16, 2024
@zmotso zmotso self-assigned this Oct 16, 2024
@zmotso zmotso requested a review from a team as a code owner October 16, 2024 09:31
@SergK SergK merged commit 6447eb4 into master Oct 16, 2024
11 checks passed
@SergK SergK deleted the i/95 branch October 16, 2024 10:01
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: Done
Development

Successfully merging this pull request may close these issues.

Subgroup for users
2 participants