Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure percentage split evaluations are consistent in Core API and Local Evaluation #171

Merged
merged 7 commits into from
Jun 28, 2023

Conversation

matthewelwell
Copy link
Contributor

@matthewelwell matthewelwell commented Jun 27, 2023

Replaces use_mv_v2_evaluation with use_identity_composite_key_for_hashing to ensure that percentage split evaluations are also consistent between Core, Edge and Local Evaluation.

@github-actions
Copy link

github-actions bot commented Jun 27, 2023

File Coverage
All files 100%

Minimum allowed coverage is 100%

Generated by 🐒 cobertura-action against 39bb81a

@@ -271,3 +271,63 @@ def test_build_environment_api_key_model():

# Then
assert environment_key_model.key == environment_key_dict["key"]


def test_build_environment_model_with_deprecated_field():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being a pedant, but the more -> None annotations are added now, the less we'll suffer when enforcing strict typing later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, sorry! Will add now!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and never apologise for pedantry!)

@khvn26 khvn26 mentioned this pull request Jun 28, 2023
# When/ Then
assert identity.get_hash_key(use_mv_v2_evaluations) == identity.composite_key

def test_get_hash_key_with_use_identity_composite_key_for_hashing_enabled(identity):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def test_get_hash_key_with_use_identity_composite_key_for_hashing_enabled(identity):
def test_get_hash_key_with_use_identity_composite_key_for_hashing_enabled(
identity: IdentityModel,
) -> None:


# When/ Then
assert identity.get_hash_key(use_mv_v2_evaluations) == identity.identifier
def test_get_hash_key_with_use_identity_composite_key_for_hashing_disabled(identity):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def test_get_hash_key_with_use_identity_composite_key_for_hashing_disabled(identity):
def test_get_hash_key_with_use_identity_composite_key_for_hashing_disabled(
identity: IdentityModel,
) -> None:

@khvn26 khvn26 merged commit 7f5d318 into main Jun 28, 2023
@khvn26 khvn26 deleted the 2186-consistent-percentage-split-evaluation branch June 28, 2023 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants