-
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
feat(archives): add size field to archived recordings #1077
feat(archives): add size field to archived recordings #1077
Conversation
Looks like both queries on archived recordings are working. I made one tiny change locally: diff --git a/src/main/resources/queries.graphqls b/src/main/resources/queries.graphqls
index 176e24ad..1a90bc0f 100644
--- a/src/main/resources/queries.graphqls
+++ b/src/main/resources/queries.graphqls
@@ -2,5 +2,5 @@ type Query {
rootNode: EnvironmentNode!
environmentNodes(filter: EnvironmentNodeFilterInput): [EnvironmentNode!]!
targetNodes(filter: TargetNodesFilterInput): [TargetNode!]!
- archivedRecordings(filter: ArchivedRecordingFilterInput): [Archived!]!
+ archivedRecordings(filter: ArchivedRecordingFilterInput): Archived!
} :-) I briefly reviewed the implementation and it's looking good so far. LMK when you're ready for full review. |
Thank you for finding the issue! |
Rebase the branch and resolve the merge conflict listed below in the automated checks, please. |
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.
I think some of the other example GraphQL queries in https://github.com/cryostatio/cryostat/tree/main/docs/graphql will also need to be updated to match the new data / aggregate
structure
src/main/java/io/cryostat/net/web/http/api/v2/graph/ArchivedRecordingsFetcher.java
Outdated
Show resolved
Hide resolved
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.
Looks great other than that one small adjustment to a sample query!
Sorry, one last thing I just thought of. Could you update the |
I updated the archived classes in |
I think it's fine as it is, no need to split it into a separate test. |
I forgot to pass the size to query in the last test. I think it is fine now. |
Fixes #964
ArchivedRecordingInfo
;$ https :8181/api/v1/recordings
http :8181/api/v2.2/graphql query="query { targetNodes { name nodeType labels recordings { archived { data { name metadata {labels} size } aggregate {count size} } } } }"
http :8181/api/v2.2/graphql query="query { archivedRecordings { name downloadUrl reportUrl metadata { labels } size } }"
http :8181/api/v2.2/graphql query="query { targetNodes { name nodeType labels recordings { archived (filter:{sizeBytesGreaterThanEqual:2578134}) { data { name metadata {labels} size } aggregate {count size} } } } }"
http :8181/api/v2.2/graphql query="query { archivedRecordings (filter:{sizeBytesGreaterThanEqual:2578134}) { name downloadUrl reportUrl metadata { labels } size } }"