[discourse] More segment information uppon rollout deletion #4311
-
Originally posted by crossy-l on Discourse Currently when a rollout is deleted an audit log like this is created:
Now we use the audit logs to monitor changes made and also provide a diff between the current state and the previous state. Now as far as I am aware there is no easy way to get the data corresponding to the “id” field and it would be much easier if the rollout deletion would carry at least information like this:
Basically like the audit log for rollout creation or updates. ToDo:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Reply from erka on Discourse: Hey @crossy-l I’d like to include the segment data in the delete audit record, but that isn’t straightforward with the current audit architecture. Rules for variant flags include their Will it work for you? |
Beta Was this translation helpful? Give feedback.
-
Reply from crossy-l on Discourse: Hey erka, thanks for looking into this. So I am not sure what you mean by ‘Rules for variant flags include their id in the audit log’, as when creating a rule for a variant flag that has a Segment On an unrelated note: In order to compare old to new we use a flipt export of the previous state. |
Beta Was this translation helpful? Give feedback.
-
Reply from erka on Discourse: when you start the Flipt with debug log level, it shows the list of events enabled for specific sink type. For example,
With latest Flipt, when rule/rollout is created or update it will include the
If I delete that rollout, I will get the record like
Both of them has id What sink type do you use in your configuration? |
Beta Was this translation helpful? Give feedback.
-
@erka Thanks for your reply. I have now setup my sink correctly to receive all kinds of audit logs: This is my audit config:
Or you just emit all the configs:
This works and I get the logs that are expected. But my issue still stands, even if I have the ids, how can I get the previous state of that object? The webhook is an isolated runner that right now doesn't perform any web requests (the flipt export is passed), so it's only got the current audit log. Sadly the flipt export (the one you get with ./bin/flipt export) doesn't have any mention of these Rollout ids, if they were included in the export, then that would also be a solution. The only other idea I got right now, is to build some sort of audit log cache, which I can then look up the previous audit state for an object (this feels like overkill and introduces a lot of complexity). |
Beta Was this translation helpful? Give feedback.
Yes, this resolves the issue and works exactly as expected. Thank you very much!