Skip to content

Conversation

@cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Jul 18, 2023

This is the main feature branch for the evaluation engine. All pieces have been reviewed individually.

Perhaps due to Github rate limiting, not all lints are showing up in the UI - so I'll address them as they appear until I hit diminishing returns.

This commit adds new `EvaluationReason` constructors used within the
evaluation engine.
Adds `<`, `>`, `<=`, and `>=` to `Value`. These are used within rule
match logic in the evaluation engine. Non-numbers always return false.
Adds the ability to parse timestamps from string or numeric `Value`s. 

This uses the same RFC3339 parser from the C Server SDK, so results
should be consistent.
Adds a new `sha1` hash function, implemented similar to the existing
`sha256`.

Moved the hex encoding routine from sha256's tests into a
dedicated header so it can be reused in sha1's tests or elsewhere.
Adds a `SemVer` class to perform semantic version parsing. 

This is implemented natively instead of pulling a 3rd party
dependency like C Server mainly because string manipulation is doable in
C++, and because we have to patch those libraries anyways (to accept omitted minor/patch versions.)
Adds a data structure for detecting circular references during
evaluation. It is called `EvaluationStack` and uses RAII to
notice/forget keys.
Adds bucketing logic to be used in evaluation engine. 

Buckets are computed based on a hash value comprised of context
attributes and prefixes derived from flag rules.
This PR contains the main evaluation engine and associated tests.
@cwaldren-ld cwaldren-ld requested a review from kinyoklion July 18, 2023 19:19
@cwaldren-ld cwaldren-ld marked this pull request as ready for review July 18, 2023 19:19
@cwaldren-ld cwaldren-ld requested a review from a team July 18, 2023 19:19
@cwaldren-ld cwaldren-ld merged commit e5992ef into server-side Jul 18, 2023
@cwaldren-ld cwaldren-ld deleted the evaluator branch July 18, 2023 23:37
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