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

add(clientStore): try to speed up things #558

Merged
merged 5 commits into from
Dec 18, 2024
Merged

add(clientStore): try to speed up things #558

merged 5 commits into from
Dec 18, 2024

Conversation

ybelMekk
Copy link
Contributor

@ybelMekk ybelMekk commented Dec 4, 2024

workflows:

  • update runs-on

code:

  • instead of looking up the clientId 2 times with find we bulk with both in same lookup, like a lazy lookup, if the audience is not present, the code fails like before.
  • URL is deprecated, use URI().toURL()
  • add findClients to clientRegistry
  • add findClients to ClientStore, to map
  • update upserQuery to only do update if there is changes to data

mock:

  • update mocks

Tests

  • tests new behaviour for storeClients
  • add test for findClients
  • simple benchmark, comparing find and findClients

consider:
validating audience input
cache of client data , either inmem or redis
cache of jwks is 6 hours, should it be longer?

workflows:
* update runs-on

code:
* instead of looking up the clientId 2 find
we bulk with both in same lookup
* URL is deprecated, use URI().toURL()
* add findClients to clientRegistry
* add findClients to ClientStore, to map
* update upserQuery to only do update if there is changes to data

mock:
* update mocks

Tests
* tests new behaviour to storeClients
* add test for findClients
* simple benchmark, comparing find and findClients

consider:
validating audience input
@ybelMekk
Copy link
Contributor Author

ybelMekk commented Dec 4, 2024

ikke bry om den detekt, skal fjerne det å bruke jmailen.kotlinter men tar det i en egen PR etter denne

Copy link
Contributor

@tronghn tronghn left a comment

Choose a reason for hiding this comment

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

Some nitpicks, otherwise lgtm! 🎉

* setup clientId in tokenRequestContext

* split up tests make them a little more robust with a warmup method
@ybelMekk ybelMekk requested a review from tronghn December 12, 2024 12:06
@ybelMekk ybelMekk merged commit 808d76e into master Dec 18, 2024
1 of 2 checks passed
@ybelMekk ybelMekk deleted the optimize branch December 18, 2024 11:48
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