-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add a context manager object and a method to call said object #357
Open
ajtran
wants to merge
32
commits into
master
Choose a base branch
from
context-manager-ld
base: master
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 21 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8d1ae15
quick context manager prototype
529f0a4
adding some defaults
5bac851
default param added
4eeed1a
assignment, duh
4714ba4
debugging
021661d
dont delete feature flag data if exception was raise
2401f78
some quick refactoring to flush data when getting out of scope
00e4967
adding user default params
9c51dcc
Utilize linked list structure for scope of context manager
642cc20
Create watch wrapper method and rename FeatureFlags
ea80652
Revert renamte of FeatureFlags
83b77b5
Generalize FeatureFlags context manager
9e4c34a
Remove unnecessary re-assignment
5b63fc0
Clear out scopes after report_exc_info is called
0483523
Merge branch 'master' into context-manager-ld
ae692bf
Clear scope on exit only
fa6cf69
Change reference to scope to tag and force extra_data to be a dict
e7c0b5c
Attach the tag to the exception on exit
8d89888
Refactor tags check
9ca6df6
Implement specific feature flags interface
48eaa57
change context manager object to take in dict
e5fb916
Make feature flags stack thread safe
5bae76e
Use tags instead of feature flags
7378835
Add check for attr
69b035e
Model feature flags with tags
430fd29
Fix typo in comment
5eb2da2
Add test cases for the feature_flag context manager
00c89ec
Use [0][0] to index mocked object
25045f9
Remove feature_flag.data.order
bcece26
use self.tags rather than self.tag
1153529
Initialize _tags in thread_local on append and value
d3894db
Move flattening to _LocalTags and rename _tags
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 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
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.
Could be that we have repeated feature flags here? I am thinking if we should use
set()
for this, but in that case we need to add aFeatureVariation
class or similar in order to generate a unique__hash__
sincedict
is not hashable.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.
Hm. I think it's alright to have repeated feature flags here, right? Are you thinking of a case like:
where the exception happens in the deepest level of code