-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(flags): Store options changes in the audit log #78622
base: master
Are you sure you want to change the base?
feat(flags): Store options changes in the audit log #78622
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #78622 +/- ##
===========================================
+ Coverage 52.06% 78.15% +26.08%
===========================================
Files 7073 7093 +20
Lines 311488 312433 +945
Branches 50885 51036 +151
===========================================
+ Hits 162182 244177 +81995
+ Misses 147776 61883 -85893
- Partials 1530 6373 +4843 |
((flag, "created", {"value": v}) for flag, v in self.set_options), | ||
((flag, "deleted", {}) for flag in self.unset_options), | ||
((flag, "updated", {"value": v}) for flag, _, v in self.updated_options), | ||
((flag, "updated", {}) for flag, _ in self.drifted_options), |
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.
what does a drifted option mean?
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.
Internal lingo. Basically the value was updated but the existing value in the db was unexpected.
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.
we don't care about the new updated value in this case?
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.
We still do. The value is changed in the db. Its just that the old value was not what we expected (someone manually changed it).
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.
Oh I see the tags. The drifted options don't contain the new value (just the old...) which is why it was omitted. This is a legacy event any way. I could probably remove it.
When an option is added, updated, or removed record that action in the audit log.