Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Store deleted users in a table #14

Merged
merged 6 commits into from
Mar 24, 2024
Merged

feat: Store deleted users in a table #14

merged 6 commits into from
Mar 24, 2024

Conversation

hangy
Copy link
Member

@hangy hangy commented Mar 24, 2024

What

  • Store limited information about deleted users in a separate table

Part of

@hangy hangy self-assigned this Mar 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 47.22222% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 42.50%. Comparing base (4cd963a) to head (9377817).

Files Patch % Lines
...ersistDeletedUserEventListenerProviderFactory.java 0.00% 28 Missing ⚠️
...odfacts/github/keycloak/jpa/DeletedUserEntity.java 79.31% 3 Missing and 3 partials ⚠️
...loak/events/RedisEventListenerProviderFactory.java 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #14      +/-   ##
============================================
+ Coverage     40.96%   42.50%   +1.53%     
- Complexity       24       51      +27     
============================================
  Files            13       17       +4     
  Lines           249      320      +71     
  Branches         11       15       +4     
============================================
+ Hits            102      136      +34     
- Misses          138      172      +34     
- Partials          9       12       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hangy hangy requested a review from john-gom March 24, 2024 12:51
@hangy hangy marked this pull request as ready for review March 24, 2024 12:51
Copy link
Collaborator

@john-gom john-gom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Any reason why you added an extra event handler rather than putting the code in the existing one?

@hangy
Copy link
Member Author

hangy commented Mar 24, 2024

Any reason why you added an extra event handler rather than putting the code in the existing one?

In my mind, one issue is that they'll never be totally transactional. All of this happens as the account has been removed from the store already. I started with all of the code in one handler, but having to try..catch..log and continuing with the next (ie. Redis or JPA) didn't feel too good.

@hangy hangy merged commit d4c6abc into main Mar 24, 2024
5 checks passed
@hangy hangy deleted the persist-events branch March 24, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants