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

Config v6 #75

Merged
merged 50 commits into from
Nov 21, 2023
Merged

Config v6 #75

merged 50 commits into from
Nov 21, 2023

Conversation

adams85
Copy link
Contributor

@adams85 adams85 commented Jun 24, 2023

Describe the purpose of your pull request

Implements config v6 support.

Features/improvements:

  • Fetch new config json version (config_v6.json) and update config model
  • SDK key format validation (when client is not set up to use local-only flag overrides)
  • AND conditions
  • New condition types
    • Prerequisite flag condition
    • Segment condition
  • Changed comparison operators
    • (NOT) CONTAINS ANY OF
  • New comparison operators
    • BEFORE/AFTER
    • TEXT (NOT) EQUALS (both hashed and cleartext)
    • TEXT (NOT) STARTS/ENDS WITH ANY OF (both hashed and cleartext)
    • ARRAY CONTAINS ANY OF (both hashed and cleartext)
  • Percentage options within targeting rules
  • Percentage options based on custom attributes
  • Custom User Object attribute handling (don't force string values + autoconversions under the hood)
  • User Object attribute/comparison value trimming
  • Comparison value hashing changes (SHA256, salting)
  • Flag overrides vs. config json salt and segments
  • EvaluationDetails.MatchedTargetingRule/MatchedPercentageOption properties (rename + set combinations correctly)

Tests:

  • Evaluation matrix tests
  • Evaluation log tests
  • SDK key format validation
  • Custom User Object attribute handling (don't force string values + autoconversions under the hood)
  • Flag overrides vs. prerequisite flags (circular dependency, comparison value type mismatch, dependent/prereq flag overriding)
  • Flag overrides vs. config json salt and segments
  • EvaluationDetails.MatchedTargetingRule/MatchedPercentageOption properties (rename + set combinations correctly)

Related improvements/fixes:

Breaking changes:

  • Rename the MatchedEvaluationRule property to MatchedTargetingRule and the MatchedEvaluationPercentageRule property to MatchedPercentageOption in EvaluationDetails.
  • Change config model (IConfig and related interfaces/enums).
  • Change nullability of User.Custom to disallow null values.
  • Change the User.AllAttributes property into a method (GetAllAttributes) as it allocates under the hood.

Requirement checklist (only if applicable)

  • I have covered the applied changes with automated tests.
  • I have executed the full automated test set against my changes.
  • I have validated my changes against all supported platform versions.
  • I have read and accepted the contribution agreement.

@adams85 adams85 requested a review from a team as a code owner June 24, 2023 13:58
@adams85 adams85 marked this pull request as draft June 24, 2023 13:58
@adams85 adams85 force-pushed the config-v6 branch 7 times, most recently from 098326c to e3a71e3 Compare July 1, 2023 07:20
@adams85 adams85 force-pushed the config-v6 branch 2 times, most recently from 4d58bbd to 3c1e539 Compare July 3, 2023 15:58
@adams85 adams85 force-pushed the config-v6 branch 5 times, most recently from 0de33ca to eefe660 Compare July 27, 2023 09:05
@adams85 adams85 force-pushed the config-v6 branch 11 times, most recently from ad0bd21 to 6f91bd4 Compare August 3, 2023 15:11
@adams85 adams85 force-pushed the config-v6 branch 2 times, most recently from c175c7d to 3841ea0 Compare October 27, 2023 18:27
Copy link
Member

@laliconfigcat laliconfigcat left a comment

Choose a reason for hiding this comment

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

hero-cat-only

Copy link
Contributor

@endret endret left a comment

Choose a reason for hiding this comment

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

it would be nice to ensure some explicit unit tests for new utils functions.

Copy link

sonarcloud bot commented Nov 20, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 15 Code Smells

91.6% 91.6% Coverage
0.0% 0.0% Duplication

@adams85 adams85 merged commit b6361d0 into master Nov 21, 2023
7 checks passed
@adams85 adams85 deleted the config-v6 branch November 21, 2023 07:43
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.

6 participants