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

Token issuer cache improvement #2734

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mpmadhavig
Copy link
Contributor

@mpmadhavig mpmadhavig commented Feb 24, 2025

$subject

This fix will,

  • Stop adding the same token to the cache, which leading to cache invalidation due to cache renewal.
  • Adds the entries to the cache, retrieved from the DB during a cache miss.

Test fix:

  • For invalid JWTs, the token retrieval should fail -> hence changed the test data to cater this

Resolves wso2/product-is#23149

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 14.28571% with 18 lines in your changes missing coverage. Please review.

Project coverage is 56.91%. Comparing base (28a1b03) to head (b6e9c0f).

Files with missing lines Patch % Lines
...arbon/identity/oauth2/token/AccessTokenIssuer.java 0.00% 15 Missing ⚠️
.../identity/oauth/cache/AuthorizationGrantCache.java 50.00% 2 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (14.28%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2734      +/-   ##
============================================
- Coverage     56.92%   56.91%   -0.02%     
+ Complexity     8576     8565      -11     
============================================
  Files           654      654              
  Lines         48424    48436      +12     
  Branches      10252    10257       +5     
============================================
- Hits          27567    27565       -2     
- Misses        16957    16970      +13     
- Partials       3900     3901       +1     
Flag Coverage Δ
unit 39.97% <14.28%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/13564819603

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/13564819603
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/13564819603

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.

Unnecessary retrieval of SessionContextData due to improper cache handling
2 participants