-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Bug] Topology start recording action should not silently restart all recordings #1035
Comments
This would be a -web feature since it involves a UI component state,
This I think probably can and should be done server-side. Currently, when requesting to start a recording, the client can use a query parameter or GraphQL argument I think this behaviour makes sense to retain, and it is already part of published API so it would be nice to be able to enhance this while keeping the same request format. I would propose that the query parameter |
That would be a much better idea! Open backend issue: https://github.com/cryostatio/cryostat/issues/1492 |
@andrewazores @tthvo I think this has been solved? I tried reproducing and all seems good. Recording with the same name wont start and it will produce and error saying recording with than name exists. if restart is always it restarts the recording in stopped or running mode. ?? Any suggestions? |
I think this probably is solved - your https://github.com/cryostatio/cryostat/pull/1587 would have been the backend fix. |
Can we do something like: If there is at least 1 target that has the active recording in For this action, we can reuse the following with additional filter (i.e. state == RUNNING).
Of course, if allowed, we can do the same for |
And not prompt if all the targets have no recordings... ? I think if a prompt is shown at all on this action, it should always be shown (until the user checks the "don't ask again" box), and the request to the backend should use If we're displaying a modal we could also ask the user which event template they want to use...
Yes, I think the Stop and Delete actions here should have a confirmation modal. |
Oh yess this sounds good!! Was just concerned about a bunch of error notifications when recordings exist. I am thinking if we go in this direction, why not make it into a modal for interactive recording creation. Basically, CreateRecording view, so users can create any recording, not just a special predefine one. As for other actions, there can be a list of recordings to choose from. All should be supported neatly with GraphQl? It should fit our goal for multi target design later on. Wdyt? |
I don't think there should be error notifications if we use
See last point below for more detail - but I think this could be a good idea, with some refinement. My first thought is that this might just feel like it gets in the way of achieving the user's goal of just getting some JFR data from their applications. Maybe instead of launching a full custom dialog every time, this uses a configuration that is tucked away in the client-side settings, similar to what the Automated Analysis Dashboard card does.
You mean for the stop/delete/archive actions? I think just always (re)starting a recording with a common name/label and then doing the stop/delete/archive actions based on that name/label is good enough for this case. Otherwise, there's a whole lot of extra complexity about which recordings show up in that list since it has to reflect the various options available across all of the targets in the selection, and how those actions behave depending on which recordings we display and if the chosen recording is actually present in all of the targets, etc. I think this is already a bit of a pain point in our Automated Rules UX when the user has to enter a matchExpression that matches a set of targets in order to select a Target-provided Event Template, but it isn't necessarily clear what is happening there, and JMX auth/SSL misconfigurations also get in the way, etc.
I think so, but we need to be careful about our designs so that the UX isn't just throwing more and more endless possibilities and options at the user. It would probably be better to have two or three different simpler workflows all built around this idea and on top of these backend capabilities, rather than to build one giant generic interface that lets the user do everything but requires them to deeply study every option to figure out what makes sense. |
Ah sorry I was looking at this: Looks like it errors out if return false on line 151. And error will be extracted and notifications will send as here.
The function can just be refined to recognize "recording exists" error and silent it. What do u think @andrewazores?
Right! I didn't think through enough. Looks likes the idea complicated things even more, especially the archive/stop/delete action.
The idea with AA Card sounds fit for this case. |
Another simpler way to achieve this could be after we have a design for multi-target UI: The group action can just redirect to corresponding view (i.e. create recording) with descendant targets pre-selected. |
Better to have the server return some distinct status code or perhaps use a response header to indicate this particular "failure" case then, and check those conditions on the frontend rather than relying on parsing the message string. |
Sounds good! Tho, we are using GraphQL in this case so status code will still be 200? Looks like we can refine the |
Hmm. Yes, something like that makes sense, but I'd need to look into it more deeply. Could you or @aali309 do some researching on GraphQL error statuses and see if there is a best practice around this before we dive into code changes? |
Current Behavior:
Commented by Scott.
Expected Behavior:
Suggested by Andrew.
Anything else:
Reference: #906
Depends on: https://github.com/cryostatio/cryostat/issues/1492
The text was updated successfully, but these errors were encountered: