You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
audit: Two entries created for adding a auto-stop time of 1 hour #4317
changed the title [-]bug: 2 entries created in audit logs for adding a auto-stop time of 1 hour[/-][+]Two entries created in audit logs for adding a auto-stop time of 1 hour[/+]on Oct 3, 2022
changed the title [-]Two entries created in audit logs for adding a auto-stop time of 1 hour[/-][+]audit: Two entries created for adding a auto-stop time of 1 hour[/+]on Oct 10, 2022
This is happening because we send down two requests when we update the workspace schedule form: 1) to /autostart, with an empty payload and 2) to /ttl with our updated auto-off. This is creating two audit logs, one without a diff.
There are a couple things we should do here:
clean up that errant, empty API call on the FE
only record diffs if they are actually diffs on the BE
filter out audit logs with 0 diffs on the FE so that users don't see these old, nonsense records
Turns out we may, in the future, have audit logs with empty diffs for valid use cases.
Therefore, we are only going to fix 1. in the above comment.
If anyone needs an audit log cleanup, we should delete invalid records for them. Shouldn't be an issue as audit logs have only been enabled on our deploy.
Activity
kylecarbs commentedon Oct 3, 2022
@coadler why does this happen?
[-]bug: 2 entries created in audit logs for adding a auto-stop time of 1 hour[/-][+]Two entries created in audit logs for adding a auto-stop time of 1 hour[/+][-]Two entries created in audit logs for adding a auto-stop time of 1 hour[/-][+]audit: Two entries created for adding a auto-stop time of 1 hour[/+]Kira-Pilot commentedon Oct 11, 2022
This is happening because we send down two requests when we update the workspace schedule form: 1) to
/autostart, with an empty payload and 2) to/ttlwith our updated auto-off. This is creating two audit logs, one without a diff.There are a couple things we should do here:
Working on a PR for this now.
Kira-Pilot commentedon Oct 14, 2022
Turns out we may, in the future, have audit logs with empty diffs for valid use cases.
Therefore, we are only going to fix 1. in the above comment.
If anyone needs an audit log cleanup, we should delete invalid records for them. Shouldn't be an issue as audit logs have only been enabled on our deploy.