-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(jmcagent): JMC Agent Feature Parity #375
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Probe Template handlers work, tested via ./mvnw quarkus:dev Just need to test with a target with the agent deployed to make sure insertion/removal of probes works as expected. (Testing without an active agent throws the expected error since the AgentController bean isn't registered) |
Probe handlers work as expected curl -F [email protected] -X POST http://localhost:8181/api/v3/probes/template2 web UI still isn't quite working, looking at the network requests they're succeeding and returning the expected results, but the card shows an error "e.data is undefined" |
/build_test |
Workflow started at 4/18/2024, 3:28:30 PM. View Actions Run. |
OpenAPI schema change detected: diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index b7db9ef..ae68add 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -1235,20 +1235,60 @@ paths:
application/json:
schema:
additionalProperties:
additionalProperties:
type: string
type: object
type: object
description: OK
tags:
- Discovery
+ /api/v2/probes:
+ get:
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ /api/v2/probes/{probeTemplateName}:
+ delete:
+ parameters:
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ post:
+ parameters:
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ probeTemplate:
+ $ref: '#/components/schemas/FileUpload'
+ type: object
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
/api/v2/rules:
get:
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/V2Response'
description: OK
"401":
@@ -1512,20 +1552,66 @@ paths:
$ref: '#/components/schemas/V2Response'
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Events
+ /api/v2/targets/{connectUrl}/probes:
+ delete:
+ parameters:
+ - in: path
+ name: connectUrl
+ required: true
+ schema:
+ format: uri
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ get:
+ parameters:
+ - in: path
+ name: connectUrl
+ required: true
+ schema:
+ format: uri
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ /api/v2/targets/{connectUrl}/probes/{probeTemplateName}:
+ post:
+ parameters:
+ - in: path
+ name: connectUrl
+ required: true
+ schema:
+ format: uri
+ type: string
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
/api/v2/targets/{connectUrl}/snapshot:
post:
parameters:
- in: path
name: connectUrl
required: true
schema:
format: uri
type: string
responses:
@@ -1716,20 +1802,64 @@ paths:
type: string
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Recordings
+ /api/v3/probes:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/V2Response'
+ description: OK
+ tags:
+ - JMC Agent
+ /api/v3/probes/{probeTemplateName}:
+ delete:
+ parameters:
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ post:
+ parameters:
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ properties:
+ probeTemplate:
+ $ref: '#/components/schemas/FileUpload'
+ type: object
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
/api/v3/reports/{encodedKey}:
get:
parameters:
- in: path
name: encodedKey
required: true
schema:
type: string
responses:
"200":
@@ -1889,20 +2019,70 @@ paths:
type: array
description: OK
"401":
description: Not Authorized
"403":
description: Not Allowed
security:
- SecurityScheme: []
tags:
- Events
+ /api/v3/targets/{id}/probes:
+ delete:
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ format: int64
+ type: integer
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
+ get:
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ format: int64
+ type: integer
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/V2Response'
+ description: OK
+ tags:
+ - JMC Agent
+ /api/v3/targets/{id}/probes/{probeTemplateName}:
+ post:
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ format: int64
+ type: integer
+ - in: path
+ name: probeTemplateName
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: OK
+ tags:
+ - JMC Agent
/api/v3/targets/{id}/recordingOptions:
get:
parameters:
- in: path
name: id
required: true
schema:
format: int64
type: integer
responses:
|
CI build and push: All tests pass ✅ (JDK17) |
No luck with a newer Agent version (1.0.1-SNAPSHOT just built from master), still getting the class file version 61 error. Any advice? |
You need to make sure it builds with 17 and bump the asm version up to 9.1, try the following patch for the agent pom.xml:
|
Nice, that worked! However now after inserting probes, switching to the Live Configuration tab shows an empty state. If I navigate away and back, or refresh the page, then I see the expected content: This is probably just a web-client bug - it seems like the Live Configuration tab/table isn't reacting to the notification. If it is the case that it's on the web-client side then I think this PR is good to go. Could you help check that out, ie. make sure it isn't some other notification that is missing or has a different category than the client expects etc.? |
/build_test |
Workflow started at 4/19/2024, 4:08:11 PM. View Actions Run. |
Also, are there any upstream JMC plans to update the Agent to use a newer asm? |
No OpenAPI schema changes detected. |
It looks like the client only expects which matches what you've implemented here. So I think it's probably OK and the client just needs to react to the notifications. |
CI build and push: At least one test failed ❌ (JDK17) |
One spotbugs detection:
I'm not sure why the GraphQL schema job is failing, but that should be unrelated to this PR so I will ignore it for now. |
I have a bug open for that as well https://bugs.openjdk.org/browse/JMC-7948 , I'll look into it as well as fixing the other upstream bug. |
cryostatio/cryostat-core#374 goes alongside the last commit to make the ProbeDefinitionException visible so it can be caught explicitly fixing the spotbugs issue |
I approved and merged that commit and kicked off a new |
sounds good |
/build_test |
Workflow started at 4/19/2024, 5:14:57 PM. View Actions Run. |
No GraphQL schema changes detected. |
No OpenAPI schema changes detected. |
CI build and push: All tests pass ✅ (JDK17) |
Fixes #14
Depends on cryostatio/cryostat-core#373
Depends on #385
This PR re-implements the JMC Agent functionality for Cryostat 3.0.
I took inspiration from how the event templates system was rewritten for rewriting the probe template service.
Opening as draft for the moment as it doesn't quite run properly yet and I still need to re add the notifications. There will likely need to be some cleanup done in core as well.