-
Notifications
You must be signed in to change notification settings - Fork 2
add entity_id to flags in UFC #122
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
Open
petzel
wants to merge
1
commit into
main
Choose a base branch
from
eric/entity-id-to-flags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
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.
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.
Can you please share some context on what the
entityId
is? Also, I would expect it to be a string, rather than an number as identifiers aren't typically used for math operations.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.
An entity is the randomization unit of an experiment. An Eppo customer could randomize/experiment on users, companies, accounts, geographies, etc.
The reason why we now need the entity in the UFC is for automating the assignment source creation process for customers who use the
EppoAssignmentLogger
. Assignment sources require an entity, and the SQL query of the source should only return subjects which are of the same type as the configured entity. Having the entity ID in the UFC allows us to include it in the event we log from our SDK. Then when we automatically generate the assignment source, we can filter on the entity ID.There's a lot of details I left out on the pipeline/how those tables are created. Let me know if you want to huddle and I can walk through some of the pipeline code/whiteboard some of this to help illustrate the data flow.
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.
ok, cool! Thank you for the details. I really appreciate the context. Should the value be obfuscated in client-type configurations? Or is it not that sensitive.
Orthogonal question:
Is the entity ID something that could be used to determine whether an Assignment Log entry is an experiment vs a feature flag? Context: we have some customers who don't want to log simple feature flag assignments as it impacts their warehouse costs.
Uh oh!
There was an error while loading. Please reload this page.
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.
I could see the case be made that we should obfuscate it. However, I imagine that might be tricky to support a field which is either a number/integer or a string depending on whether or not it is obfuscated. Do we have such instances of this today?
As for logging, this is a common ask and I think a mistake we need to correct with our logging. I can't imagine why anyone would want to have a callback for every flag evaluation (and it is every evaluation as we are not applying the assignment cache for non-experiment flags). To answer your question, they wouldn't be able to rely on it just yet, as we are only requiring the entity ID to be set on feature flags (which then flows through here on the UFC) if SDK event logging is enabled for a customer.
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.
That is good foresight and indeed it is tricky - we do have a couple of spots where this is the case and it only works because it's the
EppoValue
field which can already be anumber | string | boolean
. In those cases though, the value is needed as a number for calculations which is not the case for entity ID.I guess I'm still confused why this needs to be plumbed through as a number instead of a string (obfuscated or not). If it's user-entered, could theyhave non-numeric identifiers?
On the case of whether or not to obfuscate (setting aside the technical limitations), perhaps we could avoid it with sufficient notice and explanation to the user about data visibility on clients (primarily web where it is easiest to see network activity). I don't know what, if any, messaging we have about data exposure on clients