-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Identity overrides in local evaluation mode (#34)
* feat: Add Environment.identity_overrides, remove integrations config attributes * feat: Identity overrides in local evaluation mode - Rename `Identity.flags` to `Identity.identity_features` - Store identity overrides by identifier - Use stored identities when evaluating identity flags - Use a JSON file fixture for tests * chore: Bump version
- Loading branch information
Showing
10 changed files
with
248 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
{ | ||
"api_key": "cU3oztxgvRgZifpLepQJTX", | ||
"feature_states": [ | ||
{ | ||
"django_id": 72267, | ||
"enabled": false, | ||
"feature": { | ||
"id": 13534, | ||
"name": "header_size", | ||
"type": "MULTIVARIATE" | ||
}, | ||
"feature_state_value": "24px", | ||
"featurestate_uuid": "16c5a45c-1d9c-4f44-bebe-5b73d60f897d", | ||
"multivariate_feature_state_values": [ | ||
{ | ||
"id": 2915, | ||
"multivariate_feature_option": { | ||
"id": 849, | ||
"value": "34px" | ||
}, | ||
"mv_fs_value_uuid": "448a7777-91cf-47b0-bf16-a4d566ef7745", | ||
"percentage_allocation": 60.0 | ||
} | ||
] | ||
}, | ||
{ | ||
"django_id": 72269, | ||
"enabled": false, | ||
"feature": { | ||
"id": 13535, | ||
"name": "body_size", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "18px", | ||
"featurestate_uuid": "c3c61a9a-f153-46b2-8e9e-dd80d6529201", | ||
"multivariate_feature_state_values": [] | ||
}, | ||
{ | ||
"django_id": 92461, | ||
"enabled": true, | ||
"feature": { | ||
"id": 17985, | ||
"name": "secret_button", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "{\"colour\": \"#ababab\"}", | ||
"featurestate_uuid": "d6bbf961-1752-4548-97d1-02d60cc1ab44", | ||
"multivariate_feature_state_values": [] | ||
}, | ||
{ | ||
"django_id": 94235, | ||
"enabled": true, | ||
"feature": { | ||
"id": 18382, | ||
"name": "test_identity", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "very_yes", | ||
"featurestate_uuid": "aa1a4512-b1c7-44d3-a263-c21676852a52", | ||
"multivariate_feature_state_values": [] | ||
} | ||
], | ||
"id": 11278, | ||
"identity_overrides": [ | ||
{ | ||
"identifier": "overridden-id", | ||
"identity_uuid": "0f21cde8-63c5-4e50-baca-87897fa6cd01", | ||
"created_date": "2019-08-27T14:53:45.698555Z", | ||
"updated_at": "2023-07-14 16:12:00.000000", | ||
"environment_api_key": "cU3oztxgvRgZifpLepQJTX", | ||
"identity_features": [ | ||
{ | ||
"feature": { | ||
"id": 18382, | ||
"name": "test_identity", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "some-overridden-value", | ||
"enabled": false | ||
} | ||
] | ||
} | ||
], | ||
"project": { | ||
"hide_disabled_flags": false, | ||
"id": 4732, | ||
"name": "testing-api", | ||
"organisation": { | ||
"feature_analytics": false, | ||
"id": 4131, | ||
"name": "Mr. Bojangles Inc", | ||
"persist_trait_data": true, | ||
"stop_serving_flags": false | ||
}, | ||
"segments": [ | ||
{ | ||
"feature_states": [ | ||
{ | ||
"django_id": 95632, | ||
"enabled": true, | ||
"feature": { | ||
"id": 17985, | ||
"name": "secret_button", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "", | ||
"featurestate_uuid": "3b58d149-fdb3-4815-b537-6583291523dd", | ||
"multivariate_feature_state_values": [] | ||
} | ||
], | ||
"id": 5241, | ||
"name": "test_segment", | ||
"rules": [ | ||
{ | ||
"conditions": [], | ||
"rules": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"operator": "EQUAL", | ||
"property_": "show_popup", | ||
"value": "false" | ||
} | ||
], | ||
"rules": [], | ||
"type": "ANY" | ||
} | ||
], | ||
"type": "ALL" | ||
} | ||
] | ||
}, | ||
{ | ||
"feature_states": [ | ||
{ | ||
"django_id": 95631, | ||
"enabled": true, | ||
"feature": { | ||
"id": 17985, | ||
"name": "secret_button", | ||
"type": "STANDARD" | ||
}, | ||
"feature_state_value": "", | ||
"featurestate_uuid": "adb486aa-563d-4b1d-9f72-bf5b210bf94f", | ||
"multivariate_feature_state_values": [] | ||
} | ||
], | ||
"id": 5243, | ||
"name": "test_perc", | ||
"rules": [ | ||
{ | ||
"conditions": [], | ||
"rules": [ | ||
{ | ||
"conditions": [ | ||
{ | ||
"operator": "PERCENTAGE_SPLIT", | ||
"property_": "", | ||
"value": "20" | ||
} | ||
], | ||
"rules": [], | ||
"type": "ANY" | ||
} | ||
], | ||
"type": "ALL" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.