-
Notifications
You must be signed in to change notification settings - Fork 73
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
[WIP] feat: new assertion engine #1378
Merged
Merged
Conversation
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
* fix: opensearch example by pinning docker image versions (#1358) pin docker image versions * add parsing rules * add filters to the parser * add more test cases for filters * add basic comparisons * add attributes support * remove dead code * support duration comparisons * fix string interpolation * add more tests for interpolation * add support for filters and add json_path filter * support meta attributes * fix meta attributes and duration precision bug * update assertion engine to use new expression engine * update cli to use new assertion format * fix examples * patch tracetesting tests * fix duration conversion * fix regex to detect id field in definition file * remove dead code from assertions * improve filters and add regex filters * add new test to assert spaces are allowed in filter args * improve filter implementation to use typed values * use const instead of string Co-authored-by: Sebastian Choren <[email protected]> * rename types and use iota * remove github actions branch filter for pr pipelines Co-authored-by: Sebastian Choren <[email protected]>
* docs: new expressions * apply Julianne changes Co-authored-by: Julianne Fermi <[email protected]> * Update docs/expressions.md Co-authored-by: Julianne Fermi <[email protected]> * Apply suggestions from code review Co-authored-by: Julianne Fermi <[email protected]> Co-authored-by: Julianne Fermi <[email protected]>
mathnogueira
changed the title
[WIPfeat: new assertion engine
[WIP] feat: new assertion engine
Oct 13, 2022
* feat: add count filter * update docs
* feat: allow 'last' as arg for get_index filter * update documentation
#1372 describes a problem that will be solved by the new assertion engine introduced in this PR |
* feat: support variables in expressions * docs: add documentation about variables in expressions * docs: fix variables title * add benchmark * Update docs/expressions.md Co-authored-by: Julianne Fermi <[email protected]> Co-authored-by: Julianne Fermi <[email protected]>
* fix: opensearch example by pinning docker image versions (#1358) pin docker image versions * add parsing rules * add filters to the parser * add more test cases for filters * add basic comparisons * add attributes support * remove dead code * support duration comparisons * fix string interpolation * add more tests for interpolation * add support for filters and add json_path filter * support meta attributes * fix meta attributes and duration precision bug * update assertion engine to use new expression engine * update cli to use new assertion format * fix examples * patch tracetesting tests * fix duration conversion * fix regex to detect id field in definition file * remove dead code from assertions * improve filters and add regex filters * add new test to assert spaces are allowed in filter args * improve filter implementation to use typed values * use const instead of string Co-authored-by: Sebastian Choren <[email protected]> * rename types and use iota * remove github actions branch filter for pr pipelines Co-authored-by: Sebastian Choren <[email protected]>
* docs: new expressions * apply Julianne changes Co-authored-by: Julianne Fermi <[email protected]> * Update docs/expressions.md Co-authored-by: Julianne Fermi <[email protected]> * Apply suggestions from code review Co-authored-by: Julianne Fermi <[email protected]> Co-authored-by: Julianne Fermi <[email protected]>
* feat: add count filter * update docs
* feat: allow 'last' as arg for get_index filter * update documentation
* feat: support variables in expressions * docs: add documentation about variables in expressions * docs: fix variables title * add benchmark * Update docs/expressions.md Co-authored-by: Julianne Fermi <[email protected]> Co-authored-by: Julianne Fermi <[email protected]>
* remove old replacer implementation * add function calls to expression engine parser * add full support for function calls in expresions * remove old functions package and fix tests * docs: update generator functions docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <[email protected]> * Apply suggestions from code review Co-authored-by: Sebastian Choren <[email protected]> * merge count and length filters into a single length filter Co-authored-by: Julianne Fermi <[email protected]> Co-authored-by: Sebastian Choren <[email protected]>
* feat: array support and type filter * update docs * add test case * extract value to its own package * make expression engine use value.Value instead of string * add Type function to value.Value * overload contains operator to work with arrays * add example of array contains in docs * add chaining type filter example
xoscar
approved these changes
Oct 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the new assertion engine to allow users to write more complex assertions.
Related material:
#1315 #1350
Checklist