-
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
[Task] Allow ArchivedRecordings to include target field in archivedRecording notifications #986
Comments
@andrewazores It feels like there's a couple ways to go about this but I'm not sure what is the most optimal or if any are.
Am I missing something here? |
I think you're diving really deep into specific files already, like The root of the problem is that there is a WebSocket notification that gets emitted when ex. an archived recording is deleted from disk, but that notification only includes information about the name of the file and not the directory that it was stored within. Have you determined where in the codebase this notification is emitted? Once you know what it is that sends the notification, you can figure out if that class or anything around it already knows about the directory that the file was stored in. |
The notification is being emitted from and I just need to add an extra map entry with ("target", something) I misunderstood the problem I think then, because I just need the directory it was stored under? I thought I needed the targetId like connectionDescriptor.targetId() Then all I would need is ("target", parentPath.toString()) right? |
Right,
Are you sure those aren't already the same thing? ;-) |
For some reason, I'm having trouble decoding the base32 String back into readable characters, when I do this I get a bunch of but I'm supposed to get EDIT: It seems like maybe the forward slash maybe why "/" i will try later |
$ tree archive/
archive/
├── file-uploads
└── ONSXE5TJMNSTU2TNPA5HE3LJHIXS6L3KNZSGSL3SNVUTULZPMNZHS33TORQXIORZGA4TCL3KNV4HE3LJ
└── io-cryostat-Cryostat_foo_20220609T205456Z.jfr echo -n ONSXE5TJMNSTU2TNPA5HE3LJHIXS6L3KNZSGSL3SNVUTULZPMNZHS33TORQXIORZGA4TCL3KNV4HE3LJ | base32 -d
service:jmx:rmi:///jndi/rmi://cryostat:9091/jmxrmi echo -n service:jmx:rmi:///jndi/rmi://cryostat:9091/jmxrmi | base32
ONSXE5TJMNSTU2TNPA5HE3LJHIXS6L3KNZSGSL3SNVUTULZPMNZHS33TORQXIORZGA4TCL3KNV4H
E3LJ Working as expected from an external perspective. Is
I don't think the leading |
Yeah, it was giving the absolute path value and then when the decode function acts on that, it messes it up because for some reason it doesn't like forward slashes to decode. So I have to use
I left that in there accidently because I was copy and pasting. Anyways it works now thanks for the help! |
I'm trying to fix the tests for the class and I get a null pointer exception like I've tried to add a line of This test also doesn't use a lot of Mocks like the others, I've been stuck on this and I'm not sure what to do here. EDIT: I fixed it. |
@maxcao13 what was the root problem and the fix? |
I think it was just cause I didn't have mock behaviour for In the example above, I accidently use |
Backend implementation of cryostatio/cryostat-web#430
The text was updated successfully, but these errors were encountered: