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

[#IOPID-2343] Introducing Redis cache for PDV Tokenizer calls #92

Merged
merged 11 commits into from
Oct 14, 2024

Conversation

arcogabbo
Copy link
Contributor

@arcogabbo arcogabbo commented Oct 10, 2024

⚠️ This PR depends on pagopa/io-infra#1239

List of Changes

  • Introduced Redis Singleton and Env vars (including optional TTL for PDV keys)
  • Updated unit tests
  • Updated docker-compose config

Motivation and Context

Introducing Redis cache for PDV Tokenizer calls

How Has This Been Tested?

Unit tests, manual integration tests via docker engine

Screenshots (if appropriate):

Types of changes

  • Chore (nothing changes by a user perspective)
  • 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)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@arcogabbo arcogabbo requested a review from a team as a code owner October 10, 2024 08:54
Copy link

github-actions bot commented Oct 10, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOPID-2343

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 60.81081% with 29 lines in your changes missing coverage. Please review.

Project coverage is 91.37%. Comparing base (1d81d4b) to head (df7b75f).
Report is 55 commits behind head on main.

Files with missing lines Patch % Lines
utils/redis.ts 46.00% 27 Missing ⚠️
utils/config.ts 86.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   93.06%   91.37%   -1.70%     
==========================================
  Files          25       31       +6     
  Lines         548      684     +136     
  Branches       61       88      +27     
==========================================
+ Hits          510      625     +115     
- Misses         35       54      +19     
- Partials        3        5       +2     

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

package.json Outdated
@@ -71,6 +71,7 @@
"kafkajs": "^1.15.0",
"lodash": "^4.17.21",
"node-fetch": "^2.6.0",
"redis": "~4.5.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can safely use ^4.6.10 like fn-fast-login

Copy link
Contributor Author

Choose a reason for hiding this comment

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

upgraded in ff00dfd

Copy link
Contributor

@gquadrati gquadrati left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Copy link

dpulls bot commented Oct 14, 2024

🎉 All dependencies have been resolved !

@arcogabbo arcogabbo merged commit 25a0c46 into main Oct 14, 2024
6 checks passed
@arcogabbo arcogabbo deleted the IOPID-2343 branch October 14, 2024 15:43
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