-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(flags): cleaning up some flags stuff #26444
Conversation
@@ -96,4 +96,4 @@ ahash = "0.8.11" | |||
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } | |||
aws-sdk-s3 = "1.58.0" | |||
mockall = "0.13.0" | |||
moka = { version = "0.12.8", features = ["sync"] } | |||
moka = { version = "0.12.8", features = ["sync", "future"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added this feature to the workspace version of moka because I need it for flags
@@ -40,7 +40,7 @@ common-metrics = { path = "../common/metrics" } | |||
tower = { workspace = true } | |||
derive_builder = "0.20.1" | |||
petgraph = "0.6.5" | |||
moka = { version = "0.12.8", features = ["future"] } | |||
moka = { workspace = true } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the workspace version
rust/feature-flags/src/config.rs
Outdated
@@ -98,6 +98,12 @@ pub struct Config { | |||
|
|||
#[envconfig(from = "TEAM_IDS_TO_TRACK", default = "all")] | |||
pub team_ids_to_track: TeamIdsToTrack, | |||
|
|||
#[envconfig(from = "CACHE_MAX_CAPACITY", default = "100000")] | |||
pub cache_max_capacity: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: adding a unit to the name like cache_ttl_seconds
has would be better? e.g. cache_max_bytes_capacity
/ cache_max_teams_capacity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v good point, will do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG! Just one nit
…/posthog into chore/optimize-new-flags-service
Problem
Olly left a bunch of comments on my cohorts PRs, so I implemented them here as to not clutter other PRs too much.
Here's the list of comments I addressed:
This shouldn't have any functional changes, and all the existing tests passed.