You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contextual properties should be evaluated in the same way regardless of the routing /api/proxy/all, /api/proxy or /api/frontend
Steps to reproduce the bug
Create a strategy that uses context properties such as the ones defined in the test file with_custom_constraint.json
Call the API using /api/proxy/all?properties[companyId]=bricks
The strategy will not match the output of /api/frontend?properties[companyId]=bricks or /api/proxy?properties[companyId]=bricks
Expected behavior
Contextual properties from /api/proxy/all should be evaluated in the same way than /api/frontend and /api/proxy.
In that case the flag should be enabled when companyId=bricks
Logs, error output, etc.
No response
Screenshots
No response
Additional context
Client impact
/api/proxy/all is mandatory for Dart SDK users to be able to rely on edge to fetch unleash flags and ensure metrics propagation
How to reproduce the issue usings tests
The test can_handle_custom_context_fields in frontend_api.rs does not check the flag enabled property.
This code allows to see the difference between the different endpoints.
let req = test::TestRequest::get()
.uri("/api/frontend?properties[companyId]=bricks")
.insert_header(ContentType::json())
.insert_header(("Authorization", auth_key.clone()))
.to_request();
let no_escape: FrontendResult = test::call_and_read_body_json(&app, req).await;
assert!(no_escape.toggles.iter().all(|toggle| toggle.enabled));
let req = test::TestRequest::get()
.uri("/api/proxy?properties[companyId]=bricks")
.insert_header(ContentType::json())
.insert_header(("Authorization", auth_key.clone()))
.to_request();
let no_escape: FrontendResult = test::call_and_read_body_json(&app, req).await;
assert!(no_escape.toggles.iter().all(|toggle| toggle.enabled));
let req = test::TestRequest::get()
.uri("/api/proxy/all?properties[companyId]=bricks")
.insert_header(ContentType::json())
.insert_header(("Authorization", auth_key.clone()))
.to_request();
let no_escape: FrontendResult = test::call_and_read_body_json(&app, req).await;
assert!(no_escape.toggles.iter().all(|toggle| toggle.enabled));
Note: The flags are evaluated correctly with the custom properties using POST calls but not on the ones that rely on GET such as the ones from the Flutter / Dart SDK.
Unleash version
v19.5.0
Subscription type
Enterprise
Hosting type
Self-hosted
SDK information (language and version)
curl and Dart SDK
The text was updated successfully, but these errors were encountered:
Describe the bug
Contextual properties should be evaluated in the same way regardless of the routing /api/proxy/all, /api/proxy or /api/frontend
Steps to reproduce the bug
Create a strategy that uses context properties such as the ones defined in the test file
with_custom_constraint.json
Call the API using
/api/proxy/all?properties[companyId]=bricks
The strategy will not match the output of
/api/frontend?properties[companyId]=bricks
or/api/proxy?properties[companyId]=bricks
Expected behavior
Contextual properties from /api/proxy/all should be evaluated in the same way than /api/frontend and /api/proxy.
In that case the flag should be
enabled
whencompanyId=bricks
Logs, error output, etc.
No response
Screenshots
No response
Additional context
Client impact
/api/proxy/all is mandatory for Dart SDK users to be able to rely on edge to fetch unleash flags and ensure metrics propagation
How to reproduce the issue usings tests
The test
can_handle_custom_context_fields
infrontend_api.rs
does not check the flagenabled
property.This code allows to see the difference between the different endpoints.
Note: The flags are evaluated correctly with the custom properties using POST calls but not on the ones that rely on GET such as the ones from the Flutter / Dart SDK.
Unleash version
v19.5.0
Subscription type
Enterprise
Hosting type
Self-hosted
SDK information (language and version)
curl and Dart SDK
The text was updated successfully, but these errors were encountered: