Skip to content

Commit

Permalink
chore: remove compiler flag for delta
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Jan 16, 2025
1 parent ade0071 commit 7a8e80f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
3 changes: 0 additions & 3 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,3 @@ tracing-test = "0.2.5"

[build-dependencies]
shadow-rs = "0.37.0"

[features]
delta = []
4 changes: 2 additions & 2 deletions server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ pub struct EdgeArgs {
#[clap(long, env, default_value_t = false, requires = "strict")]
pub delta: bool,

/// If set to true, it compares features payload with delta payload and logs diff. This is experimental feature and might change. Requires strict mode
#[clap(long, env, default_value_t = false, requires = "strict")]
/// If set to true, it compares features payload with delta payload and logs diff. This is experimental feature and might change.
#[clap(long, env, default_value_t = false, conflicts_with = "delta")]
pub delta_diff: bool,

/// Sets a remote write url for prometheus metrics, if this is set, prometheus metrics will be written upstream
Expand Down
2 changes: 0 additions & 2 deletions server/src/http/refresher/delta_refresher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ impl FeatureRefresher {
}
}


#[cfg(feature = "delta")]
#[cfg(test)]
mod tests {
use actix_http::header::IF_NONE_MATCH;
Expand Down
6 changes: 3 additions & 3 deletions server/src/http/refresher/feature_refresher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ impl FeatureRefresher {
pub async fn hydrate_new_tokens(&self) {
let hydrations = self.get_tokens_never_refreshed();
for hydration in hydrations {
if cfg!(feature = "delta") && self.delta {
if self.delta {
self.refresh_single_delta(hydration).await;
} else {
self.refresh_single(hydration).await;
Expand All @@ -461,7 +461,7 @@ impl FeatureRefresher {
pub async fn refresh_features(&self) {
let refreshes = self.get_tokens_due_for_refresh();
for refresh in refreshes {
if cfg!(feature = "delta") && self.delta {
if self.delta {
self.refresh_single_delta(refresh).await;
} else {
self.refresh_single(refresh).await;
Expand Down Expand Up @@ -522,7 +522,7 @@ impl FeatureRefresher {
ClientFeaturesResponse::Updated(features, etag) => {
self.handle_client_features_updated(&refresh.token, features, etag)
.await;
if cfg!(feature = "delta") && self.delta_diff {
if self.delta_diff {
self.compare_delta_cache(&refresh).await;
}
}
Expand Down

0 comments on commit 7a8e80f

Please sign in to comment.