-
Notifications
You must be signed in to change notification settings - Fork 31
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): Cleanly handle empty snapshots #743
fix(snapshot): Cleanly handle empty snapshots #743
Conversation
src/main/java/io/cryostat/net/web/http/api/v1/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
Nice work here so far. This is exactly how I would have done it. |
Thanks, once tests are updated I'll open it up for a full review. |
This PR should be ready to go with just a couple of tweaks. The first issue is that when an empty Snapshot is created and subsequently deleted, the user shouldn't receive any recording creation or deletion notifications. I was able to separate the recording deletion notification process from the empty Snapshot handling but when it comes to the creation notification it looks like I'll have to change the API handling for Snapshot creation in The second issue is that the -web PR I submitted to display a warning for empty Snapshots (cryostatio/cryostat-web#329) is outdated now. The warning modal should instead say something along the lines of "Snapshot failed to create....". I'll open a -web issue to take care of those. Feel free to review this PR whenever you have time as the only remaining change will be to bump the web client version once the -web issue is resolved. |
src/main/java/io/cryostat/net/web/http/api/v1/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v1/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v2/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingTargetHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v2/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/net/web/http/api/v1/TargetSnapshotPostHandler.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingTargetHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingTargetHelper.java
Outdated
Show resolved
Hide resolved
src/main/java/io/cryostat/recordings/RecordingTargetHelper.java
Outdated
Show resolved
Hide resolved
🎉 Great news! Looks like all the dependencies have been resolved: 💡 To add or remove a dependency please update this issue/PR description. Brought to you by Dependent Issues (:robot: ). Happy coding! |
Please add a commit updating the web-client submodule as well now that the relevant frontend feature PR has been merged. |
…or proper code re-use
…actual delete operation into RecordingTargetHelper; create RecordingTargetHelperTest
… reflect extraction of the actual get operation into RecordingTargetHelper
…cordingTargetHelper
…ception-wrapped ConnectionException due to an invalid target
…dd a javadoc comment for proper usage of snapshotIsReadable(...)
…riptor instead of a JFRConnection
….lang.IllegalStateException: Response head already sent'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here, thanks
Fixes #715
Depends on cryostatio/cryostat-web#346