Skip to content

Commit

Permalink
fix: upgrades yggdrasil to 0.8.0, this fixes an issue with constraint…
Browse files Browse the repository at this point in the history
…s not parsing correctly with free quotes (#337)
  • Loading branch information
sighphyre authored Nov 13, 2023
1 parent 0b1380a commit 7a9c453
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tracing = { version = "0.1.40", features = ["log"] }
tracing-subscriber = { version = "0.3.17", features = ["json", "env-filter"] }
ulid = "1.1.0"
unleash-types = { version = "0.10", features = ["openapi", "hashes"] }
unleash-yggdrasil = { version = "0.7.0" }
unleash-yggdrasil = { version = "0.8.0" }
utoipa = { version = "4", features = ["actix_extras", "chrono"] }
utoipa-swagger-ui = { version = "4", features = ["actix-web"] }
[dev-dependencies]
Expand Down
10 changes: 5 additions & 5 deletions server/src/frontend_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn post_all_features(
let engine = engine_cache.get(&key).ok_or_else(|| {
EdgeError::FrontendNotYetHydrated(FrontendHydrationMissing::from(&edge_token))
})?;
let feature_results = engine.resolve_all(&context_with_ip).unwrap();
let feature_results = engine.resolve_all(&context_with_ip, &None).unwrap();
Ok(Json(frontend_from_yggdrasil(feature_results, true, &token)))
}

Expand Down Expand Up @@ -256,7 +256,7 @@ fn get_enabled_features(
let engine = engine_cache.get(&key).ok_or_else(|| {
EdgeError::FrontendNotYetHydrated(FrontendHydrationMissing::from(&edge_token))
})?;
let feature_results = engine.resolve_all(&context_with_ip).unwrap();
let feature_results = engine.resolve_all(&context_with_ip, &None).unwrap();
Ok(Json(frontend_from_yggdrasil(
feature_results,
false,
Expand Down Expand Up @@ -405,7 +405,7 @@ pub fn evaluate_feature(
.clone();
engine_cache
.get(&cache_key(&validated_token))
.and_then(|engine| engine.resolve(&feature_name, &context_with_ip))
.and_then(|engine| engine.resolve(&feature_name, &context_with_ip, &None))
.and_then(|resolved_toggle| {
if validated_token.projects.contains(&"*".into())
|| validated_token.projects.contains(&resolved_toggle.project)
Expand Down Expand Up @@ -453,7 +453,7 @@ async fn post_enabled_features(
.ok_or_else(|| {
EdgeError::FrontendNotYetHydrated(FrontendHydrationMissing::from(&edge_token))
})?;
let feature_results = engine.resolve_all(&context_with_ip).unwrap();
let feature_results = engine.resolve_all(&context_with_ip, &None).unwrap();
Ok(Json(frontend_from_yggdrasil(
feature_results,
false,
Expand Down Expand Up @@ -696,7 +696,7 @@ pub fn get_all_features(
let engine = engine_cache.get(&key).ok_or_else(|| {
EdgeError::FrontendNotYetHydrated(FrontendHydrationMissing::from(&edge_token))
})?;
let feature_results = engine.resolve_all(&context_with_ip).unwrap();
let feature_results = engine.resolve_all(&context_with_ip, &None).unwrap();
Ok(Json(frontend_from_yggdrasil(feature_results, true, &token)))
}

Expand Down

0 comments on commit 7a9c453

Please sign in to comment.