Refactor configuration module to use confique for environment variable management#267
Conversation
omer9564
left a comment
There was a problem hiding this comment.
approved with one concern about the maintenance of the new crate
| pub struct CacheConfig { | ||
| /// Cache TTL in seconds (default: 1 hour) | ||
| #[serde(default)] | ||
| #[config(env = "PDP_CACHE_TTL", default = 3600)] |
There was a problem hiding this comment.
there isn't a prefix implementation or auto env generation here ?
| /// In-memory cache specific configuration | ||
| #[serde(default)] | ||
| #[config(nested)] | ||
| pub memory: InMemoryConfig, |
There was a problem hiding this comment.
you used to have default of ::default() here, what will happen here ?
| /// In-memory cache specific configuration | ||
| #[serde(default)] | ||
| #[config(nested)] | ||
| pub memory: InMemoryConfig, |
There was a problem hiding this comment.
you used to have default of ::default() here, what will happen here ?
| /// Debug mode (injects debug attributes to OPA requests) | ||
| #[serde(default)] | ||
| #[config(env = "PDP_DEBUG")] | ||
| pub debug: Option<bool>, |
There was a problem hiding this comment.
I guess it automatically inject None ?
There was a problem hiding this comment.
I agree that confique has a more elegant interface ( in some cases ).
Not sure what I think about it tho due to its lack of many features such as prefix, auto env var creation, and most importantly a maintenance, the last commit was 8 months ago.
- Updated the health check test setup to use the provided configuration directly instead of cloning it. - Added a new test for health check success timing to validate the behavior with an increased timeout. - Enhanced logging setup for better visibility during test execution.
…e management (#267) * Refactor configuration module to use confique for environment variable management * Fixed health check tests - Updated the health check test setup to use the provided configuration directly instead of cloning it. - Added a new test for health check success timing to validate the behavior with an increased timeout. - Enhanced logging setup for better visibility during test execution.
No description provided.