-
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(agent): enable Agent HTTP communications #342
Conversation
f80adbc
to
8ae5b50
Compare
This PR/issue depends on: |
4ef597e
to
c3def0a
Compare
95ce9fe
to
6f00a7c
Compare
/build_test |
Workflow started at 4/2/2024, 2:47:43 PM. View Actions Run. |
CI build and push: All tests pass ✅ (JDK21) |
OpenAPI schema change detected: diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index b7db9ef..21cc2e9 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -2015,20 +2015,21 @@ paths:
type: integer
metadata:
nullable: true
type: string
recordingName:
type: string
replace:
nullable: true
type: string
restart:
+ deprecated: true
nullable: true
type: boolean
toDisk:
nullable: true
type: boolean
type: object
responses:
"200":
description: OK
"401":
|
CI build and push: All tests pass ✅ (JDK17) |
50c4d03
to
abe33e1
Compare
/build_test |
Workflow started at 4/9/2024, 4:11:36 PM. View Actions Run. |
CI build and push: All tests pass ✅ (JDK21) |
OpenAPI schema change detected: diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index b7db9ef..21cc2e9 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -2015,20 +2015,21 @@ paths:
type: integer
metadata:
nullable: true
type: string
recordingName:
type: string
replace:
nullable: true
type: string
restart:
+ deprecated: true
nullable: true
type: boolean
toDisk:
nullable: true
type: boolean
type: object
responses:
"200":
description: OK
"401":
|
CI build and push: All tests pass ✅ (JDK17) |
The 30 second snapshots/archives are expected, those are from the Agent's Harvester which the sample app in the smoke test is configured for. But IIRC they're supposed to be closed (deleted) on the Agent side and probably shouldn't show up in Cryostat's recording listing... But if you hit the timing right I suppose you would see it while it exists, and then the Agent deletes it and Cryostat wouldn't know. Then by the time you ask to interact with that recording it has already been deleted by the Harvester so your request fails. Maybe there's some better handling for it I can apply somehow. My first thought is that the Agent can apply a label to the snapshots to tag them in the listing results, and Cryostat can filter those out (or the Agent can just not report about them). |
/build_test |
Workflow started at 4/19/2024, 4:23:28 PM. View Actions Run. |
No OpenAPI schema changes detected. |
CI build and push: All tests pass ✅ (JDK17) |
/build_test |
Workflow started at 4/19/2024, 4:30:45 PM. View Actions Run. |
No GraphQL schema changes detected. |
No OpenAPI schema changes detected. |
CI build and push: All tests pass ✅ (JDK17) |
/build_test |
Workflow started at 4/22/2024, 11:06:28 AM. View Actions Run. |
No OpenAPI schema changes detected. |
No GraphQL schema changes detected. |
CI build and push: All tests pass ✅ (JDK17) |
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.
lgtm
/build_test |
Workflow started at 4/23/2024, 2:21:25 PM. View Actions Run. |
No GraphQL schema changes detected. |
No OpenAPI schema changes detected. |
CI build and push: All tests pass ✅ (JDK17) |
Welcome to Cryostat3! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to #2
Depends on cryostatio/cryostat-core#363
Depends on #343
Description of the change:
Reimplements Agent HTTP communications. AgentConnection and AgentJFRService are basically copy-pasted from the 2.4 codebase. AgentClient is mostly a copy-paste but needed a little more touching up. Overall within these classes there are relatively minor adjustments to use Uni rather than CompletableFuture, and to use Jackson serialization instead of Gson.
There is also other refactoring and cleanup:
Current bugs:Motivation for the change:
#2 feature parity, 3.0 should be able to interact with Agent HTTP targets with full feature parity as JMX connections.
How to manually test:
./mvnw clean package
./bash smoketest.bash -Ot
localhost:0
andcryostat3:9091
targets. They should now both list the same two startup recordings. Select one of them and create a new recording, observe that it is listed in the recordings table, then switch targets and observe that the recording is also listed in this table. There is a minor bug here: if the recording is fixed-duration and has "archive on stop" selected, then the recording table state will only update if the selected target definition is the one where the recording was created, not for other aliases. The real fix for this bug would be [Epic] Redefine Target data model to allow multiple Connection URLs #71. Navigating away and back or otherwise refreshing the view will result in an updated table content anyway.http://
Agent targets. Thequarkus-test-agent
one is configured withAPI_WRITES_ENABLED
, the others are not. All of the Agent targets should allow you to list event templates and event types, and list active recordings. Only thequarkus-test-agent
should also allow creating new custom recordings and new snapshots. You should also be able to archive, generate reports, view in Grafana, etc. on these active recordings from Agent HTTP targets.