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(snapshot): do not issue a Recording Deleted notification when empty snapshots are deleted #912

Merged
merged 2 commits into from
Apr 27, 2022
Merged

fix(snapshot): do not issue a Recording Deleted notification when empty snapshots are deleted #912

merged 2 commits into from
Apr 27, 2022

Conversation

hareetd
Copy link
Contributor

@hareetd hareetd commented Apr 26, 2022

Fixes #911

…ion is not an unreadable (i.e. likely empty) snapshot
@hareetd hareetd added the fix label Apr 26, 2022
@hareetd hareetd requested a review from andrewazores April 26, 2022 22:50
@andrewazores
Copy link
Member

Change looks good. I think there's another half to this problem though. If I make an API request to create a snapshot recording, and that snapshot ends up being empty, then this prevents a notification from being emitted when that snapshot is automatically deleted due to being detected as empty. But I'm still going to receive a notification that the recording was created, right? However, when I go looking in the active recordings list for that recording, I won't find it there. The web-client that uses notifications to update state might also create a UI entry representing the snapshot based on that notification and then not automatically remove it since there is no corresponding deletion notification.

@hareetd
Copy link
Contributor Author

hareetd commented Apr 27, 2022

We're good on that end, the backend doesn't actually issue any notifications when creating snapshot recordings. Instead, the frontend is doing the notification handling in ApiService#createSnapshot, where a Recording Creation snapshot is only issued if the backend response is a 200, meaning the snapshot was created and passed verification.

It's been a while so I don't remember why I decided to do it this way, I could move the notification handling to the backend to make it more consistent with how notifications are handled for other recording-related actions?

@andrewazores
Copy link
Member

Oh, interesting. Yes I think that would be a good enhancement as well to bring that behaviour in line with everything else. I'll approve and merge this one on its own for now, but please file an issue for that.

@andrewazores andrewazores merged commit 00fc838 into cryostatio:main Apr 27, 2022
@hareetd hareetd deleted the fix-empty-snapshot-handling-notifications branch April 27, 2022 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recording Deleted notification issued during empty snapshot handling
2 participants