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

Event Templates with multi-word Labels cannot be used #890

Closed
andrewazores opened this issue Apr 12, 2022 · 2 comments
Closed

Event Templates with multi-word Labels cannot be used #890

andrewazores opened this issue Apr 12, 2022 · 2 comments
Labels
bug Something isn't working high-priority

Comments

@andrewazores
Copy link
Member

Steps to reproduce:

  1. Open web-client
  2. Navigate to Events
  3. Download Profiling event template
  4. Edit Profiling event template and change label attribute to ex. Broken Template, or some other multi-word string, save file as Broken.jfc
  5. Click Upload button in web-client
  6. Select and upload Broken.jfc
  7. "Broken Template" appears in Event Templates list, as expected
  8. Click "Broken Template" overflow menu and select "Create Recording..."
  9. Enter a recording name and try to start the new recording
  10. Observe recording start failure due to 400 Bad Request / IllegalArgumentException

Expected behaviour:
Step 10 should succeed, the recording should be created despite the template having a multi-word label/name.

@andrewazores andrewazores added bug Something isn't working high-priority labels Apr 12, 2022
@andrewazores
Copy link
Member Author

WARNING: HTTP 400: template=Failure Template,type=CUSTOM
io.vertx.ext.web.handler.impl.HttpStatusException: Bad Request
Caused by: java.lang.IllegalArgumentException: template=Failure Template,type=CUSTOM
	at io.cryostat.recordings.RecordingTargetHelper.parseEventSpecifierToTemplate(RecordingTargetHelper.java:437)
	at io.cryostat.net.web.http.api.v1.TargetRecordingsPostHandler.lambda$handleAuthenticated$0(TargetRecordingsPostHandler.java:200)
	at io.cryostat.net.TargetConnectionManager.executeConnectedTask(TargetConnectionManager.java:148)
	at io.cryostat.net.TargetConnectionManager.executeConnectedTask(TargetConnectionManager.java:126)
	at io.cryostat.net.web.http.api.v1.TargetRecordingsPostHandler.handleAuthenticated(TargetRecordingsPostHandler.java:160)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:99)
	at io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler.handle(AbstractAuthenticatedRequestHandler.java:69)
	at io.vertx.ext.web.impl.BlockingHandlerDecorator.lambda$handle$0(BlockingHandlerDecorator.java:48)
	at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
	at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:829)

@andrewazores
Copy link
Member Author

Closed by #898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant