-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: dependent feature toggles #168
Conversation
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.
Overall it looks very good. Just some questions:
- why do we have to write all the tests inside this repo. Isn't the specification covering everything that we need?
- can we add a test that shows that metrics are not called on the dependent features
- do we have impression events in .net SDK? If so, how do they behave on the dependent features?
Good questions @kwasniew!
it's been convention so far to also add local unit tests, helps with development and debugging etc, I'll rope @sighphyre in for opinions though
Coming right up!
Yes there's support for impression events, I'll test it and get back to you! |
@daveleek in node SDK I made a decision to have impression events for dependent features (parents) to make debugging easier. However metrics are not reported for the parent to avoid skewing the results. |
I'd lean towards reducing the tests here. This is a really well covered feature in the client specs, I don't see much in your tests that aren't doing what the spec is doing. Usually I'm fussy about having tests that cover cases the spec doesn't for your particular implementation or in cases where a unit test is much easier to deal with than the spec. This is a pretty simple feature though Things I'd like to see tested:
|
…t feature), test impressiondata
Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
I guess I could trim some tests, but they've been valuable to verify understanding at development time and as debug tools so I'd like to keep a few in
Added a test for that and moved the counting around to fit the use case (@kwasniew)
Also added a test for this. As @kwasniew noted and contrary to metrics this should be invoked for every evaluation
This should be covered, I have attempted to at least
👍 |
If you find them useful I'm happy for them to stay. At some point we should get to the point where it's nice to use the client spec but that's definitely out of scope here (JS and Ruby are pretty good at this) |
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.
Happy if you are
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'm curious if you used client spec in development? You said that manually written tests were useful in development, but in Node SDK I used client spec for that. On the other hand I had to wade through hundreds lines of test code to find the metrics test I wanted to check. I'm trying to understand what exactly are we missing from the shared client spec tests. Are the .net tests easier to work with?
I did use that as well, but mostly after being done with large portions of code. And whenever something was wrong I could repro it with a specific unit test and debug from there.
I'm not going to say the .NET tests are awesome, but for me it boils down to a combination of two things:
I'm also less comfortable around the implementation of the spec parsing and knowing what might be missing there but still providing false positives - so I use Unit tests as a way of reassuring myself With that said I find the spec massively useful as an overview into where I'm at with the implementation 30/40/90% "done" / green board check off, and also as a source of knowledge/insight into the feature and how it's expected to work |
Description
Adds support for dependent features in .NET SDK. Also adds a warn once component
Type of change
How Has This Been Tested?
Checklist: