Problem
When attempting to delete a recording, an error is presented and the recording cannot be deleted.
Symptom
- When trying to delete a recording, you are getting an error message similar to the below, regardless of doing it over CLI or UI:
session_recordings.(EntService).deleteFromRepo: unable to delete session recording: recording.(Repository).DeleteSessionRecording: delete failed for <recording_id>: db.DoTx: recording.(Repository).DeleteSessionRecording: db.Exec: delete_time_null_or_after_retain_until constraint failed: check constraint violated: integrity violation: error #1000
- Reading the recording details (
$ boundary session-recordings read -id <recording_id>
) shows information similar to this:
{ ... "authorized_actions": [ "no-op", "read", "download", "delete", "reapply-storage-policy" ], "retain_until": "9999-12-31T23:23:23.999999999Z" }
Solution
Since existing recordings within a scope or its children do not automatically have new or updated policies applied to them, policies must be re-applied to existing recordings to take effect. Refer to the Update storage bucket policies page for more details.
- Create a storage policy with a retention period less than the age of the session recording;
- Set that storage policy on the organization the session recording was created from or the global scope (Make sure the
storage_policy_id
is assigned on the scope/organization); - Reapply the storage policy on the session recording;
