feat: add support for required keys on entity attributes#105
Merged
aaron-steinfeld merged 2 commits intomainfrom Apr 16, 2021
Merged
feat: add support for required keys on entity attributes#105aaron-steinfeld merged 2 commits intomainfrom
aaron-steinfeld merged 2 commits intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## main #105 +/- ##
============================================
+ Coverage 59.43% 59.47% +0.04%
- Complexity 289 290 +1
============================================
Files 39 39
Lines 2931 2949 +18
Branches 370 371 +1
============================================
+ Hits 1742 1754 +12
- Misses 1019 1024 +5
- Partials 170 171 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
tim-mwangi
approved these changes
Apr 16, 2021
3 tasks
suddendust
pushed a commit
to suddendust/entity-service
that referenced
this pull request
Sep 5, 2025
* test update * test update * updated test case in mongo * removed unnecessary dependencies * changed idea file
This file contains hidden or 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
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.
Description
This adds support for requiring keys on v2 entity types that are ingested based on config during enrichment. Previously, any time a valid ID can be generated, an entity would be formed (so, for example, if an id is based on a hash of several attributes and only one is present, it would still form an entity). Now, we can require any number of attributes to be present to give more control over entity definition. A better version of this would be full blown predicate support, but given that entity type service doesn't have those constructs today, it felt like overkill to build that out just yet... instead, I wrapped the concept such that other types of conditions could be added in the future.
Testing
Updated UTs, validated behavior e2e
Checklist: