Skip to content
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

Include thing_value in payload of Instrumented#enable and #disable #417

Conversation

rafaelmillan
Copy link

@rafaelmillan rafaelmillan commented May 27, 2019

When subscribing to notifications it can be useful to know the value of the gate being enabled/disabled. For example, that way you could set up notifications and output the name of the group or the percentage being changed.

This adds a new thing_value attribute to the payload of Instrumented#enable and Instrumented#disable.

Thanks for the great gem!

@jnunemaker
Copy link
Collaborator

For some reason I am on the fence about this, but I can't come up with a strong reason why not to and the PR is simple and tested so I'm going to merge. Thanks!

I think part of it might be that one could just do Flipper[feature_name].gate_values[gate_name] to get the value and it should be memoized (to avoid the extra read lookup).

@jnunemaker jnunemaker merged commit d1a726f into flippercloud:master May 28, 2019
@rafaelmillan
Copy link
Author

rafaelmillan commented May 29, 2019

Thank you for the approval 🙌

I think part of it might be that one could just do Flipper[feature_name].gate_values[gate_name] to get the value and it should be memoized (to avoid the extra read lookup).

I hadn't thought of that. I could be missing something but I think using your suggestion it still wouldn't be possible to find out which value was disabled for gates that use sets (groups and actors).

@rafaelmillan rafaelmillan deleted the add-thing-valud-to-enable-disable-instrumented branch May 29, 2019 08:13
@jnunemaker
Copy link
Collaborator

I could be missing something but I think using your suggestion it still wouldn't be possible to find out which value was disabled for gates that use sets (groups and actors).

Great point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants