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

chore(env): add ttl as env variable #2653

Merged
merged 2 commits into from
Oct 30, 2023
Merged

chore(env): add ttl as env variable #2653

merged 2 commits into from
Oct 30, 2023

Conversation

dracarys18
Copy link
Member

Type of Change

  • Enhancement

Description

Add TTL for KV as environment variable.

Additional Changes

  • This PR modifies application configuration/environment variables

Motivation and Context

Add TTL for KV as environment variable.

How did you test it?

  • Run the application
  • Check the startup config debug log
Screenshot 2023-10-20 at 4 44 53 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@dracarys18 dracarys18 added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed M-configuration-changes Metadata: This PR involves configuration changes labels Oct 20, 2023
@dracarys18 dracarys18 added this to the October 2023 Milestone milestone Oct 20, 2023
@dracarys18 dracarys18 self-assigned this Oct 20, 2023
@dracarys18 dracarys18 requested a review from a team as a code owner October 20, 2023 11:15
SanchithHegde
SanchithHegde previously approved these changes Oct 22, 2023
jarnura
jarnura previously approved these changes Oct 25, 2023
@dracarys18 dracarys18 dismissed stale reviews from jarnura and SanchithHegde via 66abe63 October 26, 2023 10:26
[kv_config]
# TTL for KV in seconds
ttl = 900
Copy link
Contributor

Choose a reason for hiding this comment

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

Authentication of client secret is done based on merchant_intent_fullfillment time, so shouldn't data live in KV for merchant_intent_fullfillment time interval.

Will failing to fetch from KV fallback to DB ?
Will the data be found in DB always as soon as it is expired in Redis ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We will have a bigger TTL in prod env so this problem won't occur

Copy link
Contributor

@Abhicodes-crypto Abhicodes-crypto left a comment

Choose a reason for hiding this comment

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

Few questions apart from that LGTM

@jarnura jarnura added this pull request to the merge queue Oct 30, 2023
Merged via the queue into main with commit 8b1499e Oct 30, 2023
8 of 10 checks passed
@jarnura jarnura deleted the kv_config_env branch October 30, 2023 14:03
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows M-configuration-changes Metadata: This PR involves configuration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants