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 #50

Merged
merged 115 commits into from
Nov 30, 2023
Merged

Config v6 #50

merged 115 commits into from
Nov 30, 2023

Conversation

kp-cat
Copy link
Contributor

@kp-cat kp-cat commented May 15, 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.matched_targeting_rule/matched_percentage_option 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.matched_targeting_rule/matched_percentage_option properties (rename + set combinations correctly)

Related improvements/fixes:

Related issues (only if applicable)

https://trello.com/c/ouF7r4UP/19-sdk-fejleszt%C3%A9s-doksi-v%C3%A9gleges%C3%ADt%C3%A9se-python-fejleszt%C3%A9sek-alatt

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.

noirbizarre and others added 30 commits March 30, 2023 11:35
- run test and coverage in a single pass
- use official codecov action to upload coverage
- add typing analysis
- run flake8 once and rely on settings
# Conflicts:
#	.github/workflows/python-ci.yml
# Conflicts:
#	configcatclient/configcatclient.py
#	configcatclient/configservice.py
#	configcatclient/rolloutevaluator.py
Copy link
Contributor

@adams85 adams85 left a comment

Choose a reason for hiding this comment

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

Hope you don't mind, I put the detailed checklist in the PR description so we can track its status more easily. Plus I reviewed the recent changes.

Based on this, these are the items which seem to be still missing:

configcatclient/rolloutevaluator.py Outdated Show resolved Hide resolved
@kp-cat kp-cat force-pushed the config-v6 branch 2 times, most recently from c522f99 to 09e9d3a Compare November 27, 2023 00:53
Copy link
Contributor

@adams85 adams85 left a comment

Choose a reason for hiding this comment

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

It's almost ready. There are a few minor issues left to address.

Also, probably it would be a good idea to request a review on this commit from @z4kn4fein .

configcatclient/configcatclient.py Show resolved Hide resolved
configcatclient/localfiledatasource.py Outdated Show resolved Hide resolved
configcatclient/localdictionarydatasource.py Outdated Show resolved Hide resolved
configcatclient/user.py Outdated Show resolved Hide resolved
configcatclient/evaluationdetails.py Outdated Show resolved Hide resolved
configcatclient/evaluationdetails.py Outdated Show resolved Hide resolved
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 3 Security Hotspots
Code Smell A 26 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@kp-cat kp-cat merged commit 1aed3cb into master Nov 30, 2023
31 of 32 checks passed
@kp-cat kp-cat deleted the config-v6 branch November 30, 2023 09:38
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.

5 participants