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

fix: 🐛 reapply storage policy errors out after a failed delete #2674

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

lisbet-alvarez
Copy link
Collaborator

@lisbet-alvarez lisbet-alvarez commented Feb 1, 2025

Description

When a delete fails on a session-recording, the isDeleted attribute is set to true but isDestroyed is set to false so when we try to use this.save on model it sends another DELETE request instead of a POST request for the reapply-storage-policy method. Solution was to rollbackAttributes after a failed DELETE.

Additionally, hide delete button when storage policy is retain "forever" on a session recording.

Screenshots (if appropriate)

BEFORE:

Screen.Recording.2025-01-31.at.5.45.52.PM.mov

AFTER:

Screen.Recording.2025-01-31.at.5.42.04.PM.mov

hide delete button when retain policy is "Forever"

Screen.Recording.2025-02-04.at.1.23.35.PM.mov

How to Test

Checklist

  • I have added before and after screenshots for UI changes
  • I have added JSON response output for API changes
  • I have added steps to reproduce and test for bug fixes in the description
  • I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link

vercel bot commented Feb 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 9:59pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 9:59pm

ZedLi
ZedLi previously approved these changes Feb 4, 2025
Copy link
Collaborator

@ZedLi ZedLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works great, thanks for the fix!

cameronperera
cameronperera previously approved these changes Feb 4, 2025
cameronperera
cameronperera previously approved these changes Feb 4, 2025
ZedLi
ZedLi previously approved these changes Feb 4, 2025
Copy link
Collaborator

@ZedLi ZedLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left a non blocking comment

ui/admin/app/abilities/session-recording.js Outdated Show resolved Hide resolved
calcaide
calcaide previously approved these changes Feb 4, 2025
DhariniJeeva
DhariniJeeva previously approved these changes Feb 4, 2025
Copy link
Collaborator

@DhariniJeeva DhariniJeeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix, looks great!

Copy link
Collaborator

@ZedLi ZedLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@cameronperera cameronperera added this to the 0.19.0 milestone Feb 4, 2025
@lisbet-alvarez lisbet-alvarez merged commit c9a74f2 into main Feb 4, 2025
12 checks passed
@lisbet-alvarez lisbet-alvarez deleted the fix-reapply-storage-policy-causing-error branch February 4, 2025 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants